跳转至
For the complete DHIS2 documentation index, see llms.txt.

Configure metadata (Maintenance App)

Note

This page documents the legacy Maintenance app. If you are using the Metadata Management app see Configure metadata in the Metadata Management app available from the DHIS2 App Hub and compatible from version 41.

关于维护应用

在**维护**应用项目中,您可以配置所需的所有元数据对象。 收集和分析数据所需的所有元数据对象:

  • Table: Dimensions and dimension items

  • startDateendDate 参数允许获取链接的数据 到这些日期之间的任何时间段。这避免了定义所有 期间明确在 要求:

  • 数据集和数据输入表格

  • 指标

  • E7229

  • CATEGORY_OPTION

  • createdAtClient

  • 常数

  • 选项集

  • 传说

  • 预测变量

  • 推送报告

  • 外部地图图层

  • SQL views

  • Locales

  • Analytics table hooks

注意

您有权访问的功能取决于用户角色的访问权限 权限。

元数据对象以列表的形式显示,其中包含与每个对象相关的预定义列。 您可以自定义当前对象列表中显示的列。这些自定义是针对每个用户的,因此不会影响其他用户。请注意,这些更改不会编辑任何元数据,只会编辑列表的显示方式。

管理可见列

  1. Click the icon to the top right of the list of objects you want to configure.
  2. A dropdown-menu will appear, select Manage columns.
  3. 将出现一个对话框,并选择默认列。
  4. Click any column-name in the list of Available columns to add them to the list of selected columns.
  5. You may reorder the selected columns by drag-and-dropping the icon.
  6. 您也可以通过单击名称旁边的X图标,从视图中删除任何列。
  7. Click Save once you are satisfied with your changes.

You may easily reset to the default values by clicking the Reset to default button.

下载元数据

您可以下载当前正在查看的对象的元数据。元数据下载将遵守您对该列表有效的所有过滤器。

  1. Click the icon to the top right of the list of objects you want to configure.
  2. 将会出现一个下拉菜单,选择**下载**。
  3. 将出现一个对话框,您可以在其中选择所需的格式和压缩率。
  4. 可以选择**具有共享**以包括元数据的共享数据。

管理类别

关于类别

类别通常是一个概念,例如“性别”,“年龄”或“ “疾病状态”。数据元素,例如“已确认病例数 疟疾”通常分为较小的组成部分,以便确定 例如,已确认的特定年龄组的疟疾病例数。

使用类别将数据元素分解为单个组件。 您还可以使用类别为所有数据分配元数据属性 记录在特定的数据集中,例如“实施伙伴”或 “资金代理机构。”

创建三个类别:“ 1岁以下”,“ 1-5”和“ 5岁以上”。将它们分配为 数据元素的类别。这将为创建三个单独的字段 此数据以数据输入形式:

  • 确诊的疟疾病例数(1岁以下)

  • 确诊的疟疾病例数(1-5)

  • 确诊的疟疾病例数(5例以上)

没有类别,您将不得不创建每个数据 上面单独列出的元素。

在**维护**应用项目中,您可以管理以下对象和类别 对象:

表格:维护应用项目中的类别对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
Send PUT request to api/dataElements/{dataElementUID} with full object payload as below: Create, edit, clone, share, delete, show details and translate
The status code will be 204 No Content if the data value was successfully saved or updated, or 409 Conflict if there was a validation error (e.g. more than one SHORT_NAME for the same locale). Create, edit, clone, share, delete, show details and translate
Create, edit, clone, share, delete, show details and translate
Category option combination Edit and show details
Category option group Create, edit, clone, share, delete, show details and translate
Category option group set Create, edit, clone, share, delete, show details and translate

工作流程

  1. 创建所有类别选项。

  2. 创建由您拥有的多个类别选项组成的类别 创建。

  3. 创建由一个或多个组成的类别组合 类别。

  4. 创建数据元素并将其分配给类别组合。

创建或编辑类别选项

如果可能,请回收类别选项。例如,可能有 可能共享特定类别选项的两个类别(对于 例如 <1岁)。创建类别时,此类别 选项可以重复使用。如果特定类别选项很重要 (或类别选项组合)需要一起分析。

  1. 打开 Maintenance 应用项目,点击 Category (> Category 选项

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称

    2. Short name (optional)

    3. Code (optional)

    4. Form name (optional) Category options can have a form name. These will be displayed in the 数据录入应用项目的列标题,而不是显示名称。 respective category option.

    5. 描述

    6. Start date (optional)

    7. End date (optional)

  4. 选择组织单位并分配它们。

    Tip

    You can automatically select all organisation units that belong to an organisation unit level or organisation unit group, for example "Chiefdom" or "Urban". To do this:

    Select an Organisation unit level or Organisation unit group and click Select.

  5. 点击**保存**。

创建或编辑类别

为特定类别创建所有类别选项后, 您可以创建该类别。

  1. Open the Maintenance app and click Category > Category.

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称

    2. 简称

    3. 描述

    4. 数据维度类型

      A category can either be of type "Disaggregation" or "Attribute". 要分解数据元素,请选择 分类。数据维度类型“属性”允许 用于将类别组合分配给的类别 通过数据集记录的数据。

    5. 数据尺寸

      If you select Data dimension, the category will be available 除了其他方面, “期间”和“组织单位”的标准尺寸。

  4. 选择类别选项并分配它们。

  5. 点击**保存**。

创建或编辑类别组合

Category combinations let you combine multiple categories into a related set.

您可以分解数据元素“新感染艾滋病毒的数量” 分为以下几类:

  • 艾滋病毒服务:“其他”,“ PMTCT”,“结核病”

  • 性别:“男”,“女”

In this example, there are two levels of disaggregation that consist of two separate data element categories. Each data element category consists of several data element category options.

在DHIS2中,根据 常见的一组类别。通过将这些不同的类别合并为一个 类别组合并将这些组合分配给数据元素, 您可以将适当的分类级别快速应用于大型 数据元素数。

  1. 打开 Maintenance 应用项目,点击 Category (> Category 组合

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称

    2. 数据维度类型

    3. 报告中的跳过类别总计

  4. 选择类别并分配它们。

  5. 点击**保存**。

创建或编辑类别选项组

您可以使用类别选项对类别选项进行分组和分类 组。类别选项组集的主要目的是添加更多 您捕获的数据的维数,以便在例如 **数据透视表**或**数据可视化器**应用。

Consider a system where data is collected by "projects", and projects are modelled as category options. The system must be able to analyse data based on which donor supports the project. In this case, create a category option group set called "Donor". Each donor can be created as a category option group, where each category option / project is put in the appropriate group. In the data analysis applications, the "Donor" group set will appear as a data dimension, while each donor appears as a dimension item, ready to be included in reports.

要创建类别选项组:

  1. 打开 Maintenance 应用项目,点击 Category (> Category 选项组

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称

    2. 短名称:为数据元素定义一个短名称。

    3. 描述

    4. 数据维度类型

  4. 选择**类别选项**并分配它们。

  5. 点击**保存**。

创建或编辑类别选项组集

您可以将类别选项组分组在类别选项组集中。的 类别选项组集的主要目的是添加更多 您捕获的数据的维数,以便在例如 **数据透视表**或**数据可视化器**应用。

  1. 打开 Maintenance 应用项目,点击 Category (> Category 选项组集

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称

    2. 简称

    3. 描述

    4. 数据尺寸

    5. 数据维度类型

  4. Select Category option groups and assign them.

  5. 点击**保存**。

对数据集使用类别组合

When categories and category combinations have the data dimension type "Attribute", they can apply a common set of attributes to a related set of data values contained in a data set. When category combinations are used as an attribute, they serve as another dimension (similar to "Period" and "Organisation unit") which you can use in your analysis.

Suppose that an NGO is providing ART services in a given facility. They would need to report each month on the "ART monthly summary", which would contain a number of data elements. The NGO and project could potentially change over time. In order to attribute data to a given NGO and project at any point in time, you need to record this information with each data value at the time of data entry.

  1. 使用数据维度类型“属性”创建两个类别: “实施伙伴”和“项目”。

  2. 创建具有数据维类型的类别组合 “属性”:“实施合作伙伴和项目”。

  3. 将您创建的类别分配给类别组合。

  4. 创建一个称为“ ART每月摘要”的数据集,然后选择 “实施合作伙伴和项目”类别组合。

When you enter data in the Data entry app, you can select an "Implementing partner" and a "Project". Each recorded data value is assigned a specific combination of these categories as an attribute. These attributes (when specified as a dimension) can be used in the analysis applications similar to other dimensions, for example the period and organisation unit.

将代码分配给类别选项组合

您可以将代码分配给类别选项组合。这使得数据 DHIS2与外部系统之间的交换更加容易。系统创建 类别选项组合自动。

  1. 打开 Maintenance 应用项目,点击 Category (> Category 选项组合

  2. 在列表中,找到要修改的对象。

  3. 点击选项菜单,然后选择**编辑**。

  4. 输入验证码。

  5. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

Some metadata objects also allow you to change the sharing setting of data entry for the object. These additional settings control who can view or enter data in form fields using the metadata.

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理数据元素

关于数据元素

数据元素是DHIS2的基础。数据元素定义什么 实际记录在系统中,例如免疫接种次数或 疟疾病例数。

诸如“确诊疟疾病例数”之类的数据元素通常 分解成较小的组成部分,例如确定 特定年龄段已确诊的疟疾病例数。

在**维护**应用项目中,您可以管理以下数据元素 对象:

表:维护应用项目中的数据元素对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
描述 Create, edit, clone, share, delete, show details and translate
dx尺寸 { #webapi_analytics_dx_dimension } Create, edit, clone, share, delete, show details and translate
Object short name Create, edit, clone, share, delete, show details and translate

工作流程

  1. 创建所有类别选项。

  2. 创建由您拥有的多个类别选项组成的类别 创建。

  3. 创建由一个或多个组成的类别组合 类别。

  4. 创建数据元素并将其分配给类别组合。

创建或编辑数据元素

  1. 打开**维护**应用项目,点击**数据元素** > 数据 元件

  2. 点击添加按钮。

  3. In the Name field, define the precise name of the data element.

    每个数据元素必须具有唯一的名称。

  4. In the Short name field, define a short name for the data 元件。

    通常,简称是完整数据的缩写 元素名称。此属性通常用于报表中以显示 数据元素的名称,其中空间有限。

  5. (可选)在 Code 字段中,分配一个代码。

    在许多国家/地区,为数据元素分配了代码。

  6. (Optional) In the Color field, assign a color which will be used 数据捕获应用项目中的此数据元素。

  7. (Optional) In the Icon field, assign an icon which will be used 数据捕获应用项目中的此数据元素。

  8. In the Description field, type a description of the data 元件。尽可能精确并包含完整的信息 关于如何测量数据元素以及其目的是什么。

  9. (Optional) In the Field mask field, you may type a template that's used to provide 提示数据元素的正确格式。

    NOTE

    So far this is only implemented in the DHIS2 Android Capture app; not in the Capture web app.

以下是可在遮罩中使用的特殊字符。特殊字符与给定类型的一个字符完全匹配。

性格匹配
\ d 数字
\ x 小写字母
\ X 大写字母
\ w 任何字母数字字符

例如,该模式可用于在数据元素的输入字段中根据需要显示连字符。例如“ d d d- d d d- d d d, 每三位数显示一个连字符。

  1. In the Form name field, type an alternative name of the data 元件。此名称可以在部分或自动数据中使用 报名表。表单名称将自动应用。

  2. In the Domain type field, select whether the data element is an 数据元素的聚合或跟踪器类型。

  3. In the Value type field, select the type of data that the data 元素将记录。

    Value types
    Value type Description
    Age Dates rendered as calendar widget OR by entering number of years, months and/or days which calculates the date value based on current date. The date will be saved in the backend.
    Coordinate A point coordinate specified as longitude and latitude in decimal degrees. All coordinate should be specified in the format [-19.23 , 56.42] with brackets and a comma separating the longitude and latitude.
    Date Dates rendered as calendar widget in data entry.
    Date & time Is a combination of the DATE and TIME data elements.
    Email Email.
    File A file resource where you can store external files, for example documents and photos.
    Image A file resource where you can store photos.

    Unlike the FILE data element, the IMAGE data element can display the uploaded image directly in forms.
    Integer Any whole number (positive and negative), including zero.
    Letter A single letter.
    Long text Textual value. Renders as text area with no length constraint in forms.
    Negative integer Any whole number less than (but not including) zero.
    Number Any real numeric value with a single decimal point. Thousands separators and scientific notation is not supported.
    Percentage Whole numbers inclusive between 0 and 100.
    Phone number Phone number.
    Positive integer Any whole number greater than (but not including) zero.
    Positive or zero integer Any positive whole number, including zero.
    Organisation unit Organisation units rendered as a hierarchy tree widget.

    If the user has assigned "search organisation units", these will be displayed instead of the assigned organisation units.
    Unit interval Any real number greater than or equal to 0 and less than or equal to 1.
    Text Textual value. The maximum number of allowed characters per value is 50,000.
    Time Time is stored in HH:mm format.

    HH is a number between 0 and 23

    mm is a number between 00 and 59
    Username DHIS2 user. Rendered as a dialog with a list of users and a search field. The user will need the "View User" authority to be able to utilise this data type
    Yes/No Boolean values, renders as drop-down lists in data entry.
    Yes only True values, renders as check-boxes in data entry.
  4. In the Aggregation type field, select the default aggregation 将在数据元素上使用的操作。

    大多数数据元素应具有** Sum **运算符。这包括 所有应加在一起的数据元素。其他资料 人员等级别的元素应设置为使用 ** Average **运算符,当沿时间维度的值应 不加在一起,而是取平均值。

    Aggregation operators
    Aggregation operator Description
    Average Average the values in both the period as and the organisation unit dimensions.
    Average (sum in organisation unit hierarchy) Average of data values in the period dimension, sum in the organisation unit dimensions.
    Count Count of data values.
    Min Minimum of data values.
    Max Maximum of data values.
    None No aggregation is performed in any dimension.
    Sum Sum of data values in the period and organisation unit dimension.
    Standard deviation Standard deviation (population-based) of data values.
    Variance Variance (population-based) of data values.
  5. 如果您出于特定原因要保存零,请选择**存储 零数据值**。默认情况下,DHIS2不存储输入的零 在数据输入模块中。

  6. In the URL field, enter a link to an in-depth description of the 数据元素。

    例如,指向元数据存储库或注册表的链接 包含有关定义的详细技术信息,以及 数据元素的测量。

  7. In the Category combination field, define which category 数据元素应具有的组合。这也称为 “分类”。

  8. Select an Option set.

    选项集是选项的预定义列表,可用于 数据输入。

  9. Select an Option set for comments.

    注释的选项集是预定义的选项列表,可以 用于指定数据中数据值的标准化注释 条目。

  10. 分配一个或多个**传奇**。

    图例用于** Maps **应用中,以显示某些 带有某些图标的数据元素。

  11. Set the Aggregation levels to allow the data element to be 汇总在一个或多个级别:

    1. 在左窗格中,选择要分配给 数据元素。

    2. 单击右箭头以指定聚合级别。

    默认情况下,聚合将从分配的最低点开始 组织单位。例如,如果您选择“ Chiefdom”,则表示 “酋长”,“地区”和“国家”聚合使用 作为数据的“首要”(可用的最高聚合级别) 源,PHU数据将不包括在内。 PHU数据仍将是 可用于PHU级别,但不包括在 以上级别。

    如果您同时选择“地区”和“首席”,则表示 “地区”和“国家”级别汇总使用地区数据作为 他们的来源是“酋长”将使用“酋长国”,“ PHU”将使用PHU。

  12. 如果适用,请输入自定义属性值,例如 分类**或**收集方法

    Note

    You create custom attributes in the Maintenance app: Other > Attributes.

  13. 如果适用,请选择强制性数据元素组集,用于 例如**主数据元素组**或**基于跟踪器的数据**。

    Note

    You'll only see data element group sets in this form if you've created them and set them to Compulsory.

    You create data element group sets in the Maintenance app: Data element > Date element group set.

  14. 点击**保存**。

创建或编辑数据元素组

数据元素组可让您将相关数据元素分类为 共同的主题。例如,两个数据元素“麻疹免疫”和 “ BCG免疫”可以分组为一个数据元素组 “儿童免疫”。

要创建数据元素组:

  1. 打开**维护**应用项目,点击**数据元素** > 数据 元素组

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称

    2. 简称

  4. 选择数据元素并分配它们。

  5. 点击**保存**。

创建或编辑数据元素组集

数据元素组集可让您对多个数据元素进行分类 组成一组。系统在以下过程中使用数据元素组集 分析和报告,以将相似的数据元素组合并为一个 共同的主题。一个数据元素组可以是多个数据元素的一部分 组集。

  1. 打开**维护**应用项目,点击**数据元素** > 数据 元素组集

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称
    2. 简称
    3. 描述
    4. 必修
    5. 数据尺寸
  4. 选择数据元素组并分配它们。

    可用的数据元素组显示在左侧面板中。数据 当前是数据元素组成员的元素组 设置显示在右侧面板中。

  5. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

You can assign different sharing settings to metadata objects, for example organisation units and tracked entity attributes. These sharing settings control which users and user groups can view or edit a metadata object.

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理数据集和数据输入表单

关于数据集和数据输入表格

DHIS2 中的所有数据录入都以数据集为单位。数据集是 数据集是数据元素的集合,用于数据录入和 DHIS2 实例之间的数据导出。 DHIS2 实例之间的数据导出。要使用数据集为 要使用数据集收集特定组织单位的数据,您必须将该组织单位分配给 数据集。一旦您将数据集分配给一个组织单位 单位,该数据集就可在**数据录入**应用项目中使用。只有 数据集的组织单位才能使用该数据集进行数据录入。 数据集进行数据录入。

类别组合可以链接到数据元素和数据集。如果 您将类别组合用于数据集,类别组合 适用于整个表格。这意味着您可以使用类别 捕获整个表格共有的信息,例如 项目或拨款的名称。当数据集链接到 类别组合,这些类别将显示为下拉列表 **数据输入**应用中的框。表格中捕获的数据将被 链接到从这些下拉框中选择的类别选项。对于 有关如何创建类别和类别组合的信息, 请参阅“管理数据元素和类别”一节。确保你 将类别和类别组合的类型设置为“属性”。

A scenario for when categories are useful is when you need to capture a data entry form for an implementing partner organisation and a project. In that case:

  1. 为所有合作伙伴组织创建类别选项和类别 和项目,并将它们链接到新的类别组合中。

  2. 将类别组合分配给要为其的数据集(窗体) 需要捕获此信息。

    在数据输入模块中打开此数据集时,伙伴 组织和项目类别将自动呈现 作为下拉框,允许您选择特定的实施 合作伙伴组织和项目,然后继续进行数据输入。

您可以在**维护**应用项目中创建和编辑数据集。在这里 例如,您要在数据集中定义哪些数据元素以及数据收集频率。 和数据收集频率。

您在 Data entry 应用项目中输入数据。 **数据输入**应用项目使用 数据输入表单以显示数据集。数据分为三种 报名表格:

Data entry form types
Data entry form type Parameter name
Default form Once you have assigned a data set to an organisation unit, a default form is created automatically. The default form is then available in the Data entry app for the organisation units you have assigned it to.

A default form consists of a list of the data elements belonging to the data set together with a column for inputting the values. If your data set contains data elements with a non-default category combination, for example age groups or gender, additional columns are automatically created in the default form based on the different categories.

If you use more than one category combination you get multiple columns in the default form with different column headings for the options.
Section form 如果默认表单不能满足你的需求,你可以修改它来创建一个分节表单。在使用表格表单时,分节表单会给你更大的灵活性。

例如,在分节表单中,你可以创建带有小标题的多个表格,也可以禁用表格中的单元格(使其变灰)。

在数据集中添加分节表单后,分节表单就可以在**数据录入**应用项目中使用。
Custom form If the form you want to design is too complicated for default or section forms, you can create a custom form. A custom form takes more time to create than a section form, but you have full control over the design.

You can, for example, mimic an existing paper aggregation form with a custom form. This makes data entry easier, and should reduce the number of incorrectly entered data elements.

When you have added a custom form to a data set, the custom form is available in the Data entry app.

注意

如果数据集同时具有部分表单和自定义表单,则系统 在数据输入期间显示自定义表格。输入数据的用户不能 选择他们要使用的表格。在基于Web的数据输入中的顺序 显示首选项:

1.自定义表单(如果存在)

2.部分表格(如果存在)

3.默认格式

移动设备不支持自定义表格。在基于移动的数据输入中 显示首选项的顺序为:

1.部分表格(如果存在)

2.默认格式

In the Maintenance app, you manage the following data set objects:

表格维护应用项目中的数据集对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
<indicator-id> 创建、分配给组织单位、编辑、共享、删除、显示详细信息和翻译

编辑强制性数据元素

一次向组织单位添加和删除多个数据集
Section form Create, edit and manage grey fields
删除源指标,增加目标指标 Change display order, delete and translate
Custom form Create, edit and script

工作流程

您需要具有数据元素和类别才能创建数据集和 数据输入表格。

  1. 创建一个数据集。

  2. 将数据集分配给组织单位。

    默认形式是自动创建的。

  3. 创建节形式或自定义形式。

    Now you can register data in the Data entry app.

创建或编辑数据集

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 点击添加按钮。

  3. In the Name field, type the precise name of the data set.

  4. In the Short name field, define a short name for the data set.

    通常,简称是完整数据集的缩写 名称。此属性通常用于显示数据名称 设置空间有限的地方。

  5. (可选)在 Code 字段中,分配一个代码。

  6. In the Description field, type a description of the data set.

  7. Enter the number of Expiry days.

    到期天数控制应该持续多长时间 可以在**数据录入**应用项目中为该数据集输入数据。 到期天数指的是结束日期之后的天数 选定的数据输入期间,应打开数据输入表单 进入。天数到期后,数据集将 被锁定以进一步进入。

    您可以使用锁定异常为此设置手动异常 **数据管理**应用项目中的功能。

    Note

    To allow data entry into all possible historical time periods, set the number of expiry days to zero.

  8. 如果希望将来可以输入数据,请键入 **开放将来的数据输入期间**中的期间数 领域。

    该值是可用于 数据输入。

    对于每月数据集,值2允许您输入2的数据 提前几个月。例如,这对于人口有用, 目标和计划数据。

  9. In the Days after period to qualify for timely submission field, 输入可以输入数据的天数 考虑及时报到。

    To verify the number of timely reports submitted, go to Reports > 报告率摘要

  10. Select a Period type.

    期间类型定义了报告的频率 特定的数据集。例如,频率可以是每天 每季度或每年。

  11. Select a Category combination to assign it to the data set.

    Tip

    Click Add new to create category combinations that you're missing. In the form that opens, create the category combinations you need. When you're done, click Refresh values.

  12. If you selected a category combination other than None, 您可以在**开放时间之后输入零或正数 类别选项的结束日期**。这使您可以在此数据中输入数据 为类别选项设置最多指定的周期数 该类别选项的结束日期之后。

  13. In the Complete notification recipients list, select a user 数据集标记为时应接收消息的组 在**数据录入**应用项目中完成。

    该消息是通过DHIS2消息传递系统传递的。

  14. 如果您希望输入数据的用户在以下情况下收到消息 在**数据录入**应用项目中将数据集标记为已完成,选择 发送通知给完成用户

    该消息是通过DHIS2消息传递系统传递的。

  15. If applicable, select, a Data approval workflow.

  16. 如果您希望可以在Java中使用数据集 移动 DHIS2 应用项目时,选择 ** 启用 Java 移动客户端**。

  17. 如果您要强制填写数据元素的所有值 在数据输入中,如果已填写一个或多个值,请选择**全部 必填数据元素的字段**。

    这意味着,如果您在 输入字段(用于类别选项组合),然后您 必须输入属于该数据元素的所有字段的数据(即 是所有类别选项组合)。

  18. 如果希望将数据输入表单标记为已完成 only if the validation of that form is successful, select Complete 仅当验证通过时才允许

    如果选择此选项,则无法将表单标记为已完成 验证失败。

  19. 如果您要强制要求所有缺失值都需要一个 评论以说明其缺席,请选择**缺少值要求 评论完成**。

  20. (可选)分配一个或多个**传奇**。

  21. If applicable, select Skip offline.

    此选项控制是否应将此数据输入表单 下载并保存在用户的网络浏览器中。通常你 shouldn't select Skip offline. This is the default setting. If 您有一些很少使用的大型表格,可以考虑选择 此选项可加快数据输入模块中的初始加载速度。

  22. If applicable, select Data element decoration

    如果选择此选项,则数据元素的描述将以 脱机模式下**数据中的已下载数据集中的标注 入门**应用。

  23. If applicable, select Render sections as tabs.

    此选项仅适用于部分表格。该选项允许 you to render each section as a tab above the data set. You can choose whether to render the tabs horizontally or vertically. 这对于较长的数据集很有用,因为它允许适当的部分 无需快速浏览整个表格即可快速选择。

  24. If applicable, select Add custom title/subtitle.

    This option allows you to add a title and/or subtitle to the dataset. You can choose whether to display the title and subtitle in the center, at line start or at line end. For security reasons, only basic styling and HTML link elements are allowed, specifically these tags: a for adding a link, u for underlining a text, and b, strong or em for styling text in bold format.

  25. If applicable, select Render vertically.

    This option is only applicable for section forms that are multi-organisation unit forms.

  26. 选择数据元素并分配它们。

    您可以覆盖每个选定数据集的类别组合 通过点击所选数据列表上方的齿轮图标 元素。这使您可以利用特定的类别组合 (分解)在当前数据集中而不是类别中 直接与数据元素本身关联的组合。

  27. 选择指标并分配它们。

  28. 在组织单位树中,选择您要使用的组织单位 想要将数据集分配给。

    Tip

    • Click Organisation unit level to select all organisation units that belong to a certain organisation level.

    • Click Organisation unit group to select all organisation units that belong to a certain organisation unit group.

  29. 点击**保存**。

现在,您可以在 数据录入 应用项目中将数据集用于 组织单位的数据集。 选择的频率(周期类型)。

创建或编辑数据集通知

  1. 打开**维护**应用项目,点击**数据集** > 数据集 通知

  2. 点击添加按钮。

发送什么?

  1. In the Name field, type the precise name of the data set If either side is present, the other must not be

  2. (可选)在 Code 字段中,分配一个代码。

  3. 输入**数据集**。

    这些数据集将与此通知关联。如果有的话 他们完成了一定时期和组织单位, 通知将由系统生成。

    Note

    Nothing will happen if no data set is selected

  4. In Message template section there are two parameters.

    • **主题模板**发送的通知主题 通知。它可以具有变量列表中的值 右侧可用。

    • **消息模板**通知中发送的实际消息。它可以 具有右侧可用变量列表中的值 侧。

    Note

    Subject is only relevant in case of Email and internal DHIS2 messages. It is ignored in case of SMS.

何时发送?

  1. **数据集通知触发器**字段确定何时发送 If either side is present, the other must not be

    • **数据集完成**将立即触发通知 数据集完成。

    • **计划天数**将根据天数安排通知时间 相对于预定日期。预定日期将由 与数据集关联的期间。

      • **发送通知为**提供两种不同类型的 通知

        • **汇总摘要**以摘要心情发送通知

        • **单一通知**单一发送通知 心情

    Note

    Send notification as option is only available in case of scheduled notification. This option is set to default which is Single notification in case of completion notification

寄给谁?

  1. **“通知收件人” **字段确定 If either side is present, the other must not be

    • **组织单位联系人**将向联系人发送通知 分配给已收集数据的组织单位 从。

    • ** UserGroup **将向所有会员发送通知 选择的用户组。

    Note

    An internal DHIS2 message will be sent in case if recipient is UserGroup. Moreover user will also receive SMS/EMAIL if phone number and email address exist for that user and SMS/EMAIL notifications are enabled in SystemSettings

覆盖数据集中的数据元素的类别组合

您可以覆盖要用于数据元素的类别组合 在数据集范围内。这意味着数据元素可以使用 不同数据集内的不同类别组合。这是 当您想重复使用数据元素时很有用,因为您不必 复制数据元素以允许多个类别组合。

如果组织单位层次结构中的不同区域使用 不同的分类,或者如果分类随时间变化, 您可以通过创建不同的数据集来表示 适当的类别组合。

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要修改的数据集。

  3. 点击选项菜单,然后选择**编辑**。

  4. 转到数据元素部分,然后单击扳手图标。

  5. 选择新的类别组合,然后单击**关闭**。

  6. 点击**保存**。

编辑数据集中的强制数据元素

您可以添加或删除将被标记为强制性的数据元素 在数据输入期间。

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要编辑的数据集。

  3. Click the options menu and select Edit compulsory data elements.

  4. 分配必填数据元素。

  5. 点击**保存**。

下载PDF格式的默认数据表格

您可以从PDF格式下载默认数据以获取离线数据 条目。

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要下载的对象。

  3. Click the options menu and select Get PDF for data entry.

管理板块表格

创建部分表格

截面表单按数据元素类别自动分隔 组合,从而为每个表单生成电子表格,例如数据输入表单 部分。

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要创建节形式的数据集 为了。

  3. Click the options menu and select Manage sections.

  4. 点击添加按钮。

  5. (Optional) In the Name field, type the name of the section.

  6. (Optional) In the Description field, type a description of the 部分。

  7. (可选)在以下期间显示节表中各行的总计 数据输入,选择**显示行总计**。

  8. (可选)在显示期间在部分表格中显示列的总计 数据输入,选择**显示列总计**。

  9. (Optional) To prevent automatic grouping of data of data elements with the same category combo, select Disable automatic grouping of data elements. This is useful if you want the order of the data elements to be respected regardless of differing category combos.

  10. 将数据元素分配给该部分:

    1. (Optional) Select a Category combination filter.

      Note

      You can only use one category combination per section.

      Option Description
      None Displays all data elements that don't have a category combination.
      <No filter> Displays all data elements.
    2. Select data elements and assign them.

  11. (可选)使用向上键对部分中的数据元素进行排序 分配的数据元素字段左侧的向下箭头和向下箭头。

  12. 点击**保存**。

  13. 对您要包含的每个部分重复添加部分步骤 部分表格。

    在**数据录入**应用项目中,您现在可以使用分栏表单。表格 当部分可用时,部分表格会自动出现 选定的数据集。具有部分表格的数据集将 自动显示剖面图。

注意如何将每个数据元素类别都分为一个单独的 部分,并且数据输入表已由 系统。将节形式与数据元素类别结合使用 可以大大减少创建所需的时间 数据集的数据输入表单。

编辑部分表格

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要编辑节形式的数据集 为了。

  3. Click the options menu and select Manage sections.

  4. 在列表中,找到要编辑的部分。

  5. 点击选项菜单,然后选择**编辑**。

  6. Edit the section and click Save.

  7. 对要编辑的每个节重复编辑节的步骤。

管理分区表单中的灰色字段

You can disable data elements and category options for data entry. That means it won't be possible to enter data into these fields during data entry.

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要编辑节形式的数据集 为了。

  3. Click the options menu and select Manage sections.

  4. 在列表中,找到要编辑的部分。

  5. Click the options menu and select Manage grey fields.

  6. 选择要禁用的字段。

    Note

    If you've sections that contain data elements assigned to multiple category combinations, switch between the category combinations to view all fields.

  7. 点击**保存**。

在部分表格中更改部分显示顺序

您可以控制以节形式显示节的顺序。

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要编辑节形式的数据集 为了。

  3. Click the options menu and select Manage sections.

  4. 在列表中,找到要移动的部分。

  5. 点击选项菜单,然后选择**上移**或**下移**。

    如果您要移动的部分是菜单中的第一部分或最后部分 列表中,您只会看到其中一个移动选项。

删除部分表格中的部分

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要编辑节形式的数据集 为了。

  3. Click the options menu and select Manage sections.

  4. 在列表中,找到要删除的部分。

  5. Click the options menu and select Delete.

以节形式翻译节

  1. 打开 Maintenance 应用项目,然后单击 Data set (> Data set)。

  2. 在列表中,找到要编辑节形式的数据集 为了。

  3. Click the options menu and select Translate.

  4. 选择一个语言环境。

  5. 输入所需的信息。

  6. 点击**关闭**。

Form Configuration options

在第 41 版中,我们添加了额外的表单配置选项,这些选项可更改部分表单在新的**数据录入应用项目(测试版)**中的显示方式。这些选项允许用户应用以前没有自定义表单无法实现的功能。我们将在今后的版本中添加更多选项。

The options available in v41 are:

Transpose (pivot) functionality

在新的数据录入(测试版)应用项目中显示表单时,用户可以选择转置(透视)表单。用户既可以完全转置表单,即移动类别作为行显示,数据元素作为列显示,也可以移动某个类别作为行显示。默认显示模式是数据元素显示为行,类别显示为列。

Content before and after a section

Users are able to display custom text before and/or after a section. This is helpful for adding help text, for example. For security reasons, only basic styling and HTML link elements are allowed, specifically these tags: a for adding a link, u for underlining a text, b, strong for styling text in bold format, or em to style it in italic.

管理自定义表单

创建一个自定义表格

Note

Support for JavaScript in custom forms has changed in the new version of the Data Entry app. See Support for JavaScript in custom forms for details.

您可以在内置的WYSIWYG HTML编辑器中设计自定义表单。如果选择 来源,您可以直接将HTML代码粘贴到编辑区域中。为一个 有关如何使用编辑器的完整指南,请参阅 http://docs.ckeditor.com/

创建自定义表单:

  1. Open the Maintenance app and click Data set.

  2. 在列表中,找到要添加自定义表单的数据集。

  3. Click the options menu and select Design data entry form.

  4. 在编辑区域中,创建自定义表单。

    • 双击左侧列表中的对象以将其插入 表格。

    • 如果您已经有了表单的HTML代码,请单击 **来源**并粘贴代码。

  5. Select a Form display style.

  6. 点击**保存**。

自定义形式的脚本

在自定义数据输入表单中,您可以使用JavaScript创建动态 行为和自定义。例如,您可以隐藏表单部分 根据数据元素的特定用户输入,或显示特定 表单加载时的信息。

大事记

DHIS2数据输入模块提供了一系列事件,您可以 注册并用于在特定时间执行操作。这些事件是 注册在document元素上。 jQuery事件对象和数据 集标识符始终是提供给 回调函数。下表概述了事件 以及何时触发它们。

Table: Data entry events

| To send an email with an HTML body, you can simply provide the HTML content in the message parameter. The email client should interpret the HTML and render it accordingly. Note that the Content-Type header in the curl command should be application/x-www-form-urlencoded, as the data is sent as URL-encoded form data. The following example shows how to send an email with a simple HTML table: | Parameter name | size | |---|---|---| | dhis2.de.event.formLoaded | Triggered after the data entry form is rendered, but before data values are set in entry fields. | Event | Data set ID | | dhis2.de.event.dataValuesLoaded | Triggered after data values are set in entry fields. | Event | Data set ID | | dhis2.de.event.formReady | Triggered when the data entry form is completely rendered and loaded with all elements. | Event | Data set ID | | dhis2.de.event.dataValueSaved | Triggered when a data value is saved successfully. | Event | Data set ID | Data value object | | dhis2.de.event.completed | Triggered when a data set is successfully marked as complete. | Event | Data set ID | Complete registration object | | dhis2.de.event.validationSuccess | Triggered when validation is done and there were no violations. | Event | Data set ID |

要注册活动:

 <script type="text/javascript">

dhis2.util.on('dhis2.de.event.formReady',function(event,ds){
  console.log('ID为'+ ds +'的表单已加载!');
});

dhis2.util.on('dhis2.de.event.dataValueSaved',function(event,ds,dv){
  console.log('数据值:'+ dv.value +'与数据元素:'+ dv.de一起保存);
});

dhis2.util.on('dhis2.de.event.completed',function(event,ds,cr){
  console.log('组织单位的表格已完成:'+ cr.ou);
});

 </script>

注意

请注意仅使用“命名空间”事件,例如 上面的示例,而不是一般的示例,例如dhis2.util.on中的“ click” 方法将首先注销事件。

如果您的功能仅适用于某些数据集,则可以使用 提供的数据集标识符和快捷方式,可避免不必要的功能 像这样的数据集 这个:

dhis2.de.on('dhis2.de.event.validationSuccess',function(event,ds){
  if($ .inArray(ds,['utXOiGbEj14','Re7qzHEThSC'])== -1){
    返回false;
  }
  console.log('ID为:'+ ds +'的表单已成功验证!');
});

数据输入表单中输入字段的标识符位于 格式如下所述。此格式可用于选择输入 脚本中的字段并对其执行操作:

 <dataelementid>-<optioncomboid> -val

由于为所有事件提供了数据集标识符,因此可行 另一种方法是利用“文件” Web API资源并保留您的 回调函数在一个文件中,您可以在其中让JavaScript代码 根据当前加载的数据集采取措施。

职能

DHIS2数据输入模块包含JavaScript API函数,该函数可以 可从自定义数据输入表单访问。

** dhis2.de.api.getSelections **:此函数返回一个JavaScript 包含所有尺寸的属性以及相应属性的对象 所选选项的标识符的值。它包含 “ ds”(数据集),“ pe”(句号),“ ou”(组织单位)的属性 和所有数据集类别的标识符。

一个示例响应如下所示:

{
 + ds:“ lyLU2wR22tC”,
 + pe:“ 201605”,
 + ou:“ g8upMTyEZGZ”,
 + LFsZ8v5v7rq:“ CW81uF03hvV”,
 + yY2bQYqNt0o:“ yMj2MnmNI8L”
 +}

此功能的示例JavaScript用法:

var sel = dhis2.de.api.getSelections();
 + var orgUnit = sel [“ ou”];
 + var partner = sel [“ LFsZ8v5v7rq”];

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理指标

关于指标

指标是一个可以包含多个数据元素的公式, 常数,组织单位组数和数学运算符。 指标通常由分子和分母组成。你用 用于计算覆盖率,发生率和其他值的指标 是已输入到数据元素值的结果 系统。计算得出的总数没有分母。

注意

您永远不会直接在DHIS2中输入指标值,而是进行计算。

指标公式可以包含数学运算符,例如 加号和减号;功能(见下文);和以下元素:

Indicator elements
Indicator element Potential duplicate status Parameter name
N{<indicator-id>} 零件 Constants are numerical values which remain the same for all indicator calculations. This is useful in order to have a single place to change values that might change over time.

Constants are applied AFTER data element values have been aggregated.
startDateendDate 参数允许获取链接的数据
到这些日期之间的任何时间段。这避免了定义所有
期间明确在
要求: 零件 Data elements are substituted by the data value captured for the data element.
Days 所需值 "Days" is special operator that always provides the number of days for a given indicator calculation.

For example: if you want to calculate the "Percentage of time vaccine refrigerator was non-functional", you could define the numerator as:

("Days-"Number of days vaccine refrigerator was available"")/"Days"

If the fridge was available 25 days in June, the indicator would be calculated as:

(30-25/25)*100 = 17 %

If you want to calculate the total for Quarter 1, the number of days ("Days") would be:

31+28+31 = 90

The "Days" parameter will always be the number of days in the period of interest.
Organisation unit counts 零件 You can use organisation unit groups in formulas. They will be replaced by the number of organisation units in the group. During aggregation, the organisation units in the group will be intersected with the part of the organisation unit hierarchy being requested.

This lets you use the number of public facilities in a specific district in indicators. This is useful for example when you create facility infrastructure surveys and reports.
程式 零件 点击 计划,选择一个计划,查看与特定计划相关的所有数据元素、属性和指标。

您在公式中包含的项目组件将有一个项目标签。

您可以在指标公式中使用以下功能:

Indicator functions
Indicator Function size Parameter name
contains (expr, sub1, ...) Searches an expression for one or more substrings. Returns true if the expression contains all the substrings. For example, the following are all true: contains("abcd", "abcd"); contains("abcd", "b"); and contains("abcd", "ab", "bc"). Comparisons are case-sensitive.
containsItems (expr, item1, ...) Searches an expression for one or more items. The expression is made up of comma-separated elements. containsItems returns true if every item exactly matches an element in the expression. For example, containsItems("abcd", "abcd") and containsItems("ab,cd", "ab", "cd") are true, but containsItems("abcd", "b") and containsItems("abcd", "ab", "bc") are false. Comparisons are case-sensitive. containsItems can be used for multi-valued data elements to see if an item is contained in the data element values.
如果 (boolean-expr, true-expr, false-expr) Evaluates the boolean expression and if true returns the true expression value, if false returns the false expression value. The arguments must follow the rules for any indicator expression.
is (expr1 in expression [, expression ...]) Returns true if expr1 is equal to any of the following expressions, otherwise false.
一片空白 (element) Returns true if the element value is missing (null), otherwise false.
isNotNull (element) Returns true if the element value is not missing (not null), otherwise false.
firstNonNull (element [, element ...]) Returns the value of the first element that is not missing (not null). Can be provided any number of arguments. Any argument may also be a numeric or string literal, which will be returned if all the previous objects have missing values.
最伟大的 (expression [, expression ...]) Returns the greatest (highest) value of the expressions given. Can be provided any number of arguments.
最小 (expression [, expression ...]) Returns the least (lowest) value of the expressions given. Can be provided any number of arguments.
log (expression [, base ]) Returns the natural logarithm (base e) of the numeric expression. If an integer is given as a second argument, returns the logarithm using that base.
log10 (expression) Returns the common logarithm (base 10) of the numeric expression.
false Returns no result. For example, if( #{FH8ab5Rog83}<0, null, 1 ) returns nothing if the data element value is less than 0, otherwise 1.
removeZeros (expression) Returns nothing if the expression value is 0, otherwise returns the expression value.
subExpression (expression) Evaluates part of an expression before aggregating. See Indicator SubExpressions below.
[periodInYear] The number of this period within the year (1, 2, 3, ...). For examples, see the Indicator Year-to-date section below.
[yearlyPeriodCount] The count of periods of this type within the year. For examples, see the Indicator Year-to-date section below.
.aggregationType (aggregation type) 覆盖汇总数据(非项目数据)的默认数据元素汇总类型。
.maxDate (yyyy-mm-dd) 对于数据元素(非项目数据),最大日期当日或之前结束的期间的值。
.minDate (yyyy-mm-dd) 对于数据元素(非项目数据),最小日期当日或之后开始的期间的值。
.periodOffset (integer constant) Placed after a data value or expression, returns the value from a period offset relative to the reported period. It can be nested. Note that this shifts data only for aggregate data, not tracker or event data. See examples below.
.yearToDate() Summs the values of all periods from the start of the yaer through the current period. Note that any weekly period is considered to be part of the current year if it has four or more days in the year. For examples, see the Indicator Year-to-date section below.

Valid aggregation types:

Parameter name
AVERAGE Average value in both period and organisation unit hierarchy
AVERAGE_SUM_ORG_UNIT Average value, sum in organisation unit hierarchy
COUNT Count of values
FIRST First value, sum in organisation unit hierarchy
FIRST_AVERAGE_ORG_UNIT First value, average in organisation unit hierarchy
LAST Last value, sum in organisation unit hierarchy
LAST_AVERAGE_ORG_UNIT Last value, average in organisation unit hierarchy
LAST_IN_PERIOD Last value in period, sum in organisation unit hierarchy
LAST_IN_PERIOD_AVERAGE_ORG_UNIT Last value in period, average in organisation unit hierarchy
MAX min-max 数据元素资源允许您设置最小值和最大值
数据元素的值范围。它是独一无二的
组织单位、数据元素和类别选项组合。
MIN A sample JSON response looks like this:
Boolean No aggregation is performed in any dimension
SUM Sum of values in both period and organisation unit hierarchy
STDEEV Standard deviation (population-based) of values
VARIANCE Variance (population-based) of values

Examples of .aggregationType, .maxDate, .minDate, and .periodOffset functions:

指标表达 手段
#{FH8ab5Rog83}.aggregationType(COUNT) count of values
#{FH8ab5Rog83}.aggregationType(LAST) - #{FH8ab5Rog83}.aggregationType(FIRST) the difference between first and last values
#{FH8ab5Rog83}.maxDate(2021-6-30) values until 30-Jun-2021
#{FH8ab5Rog83}.minDate(2021-1-1) values from 1-Jan-2021 onwards
#{FH8ab5Rog83}.minDate(2021-1-1)
.maxDate(2021-6-30)
values between 1-Jan-2021 and 30-Jun-2021
value from the period before
value from the period after
value from the period after
报告期间的数据元素FH8ab5Rog83减去前一时期的项目数据元素IpHINAT79UW.uf3svrmp8Oj的两倍
(#{FH8ab5Rog83}-
#{QOlfIKgNJ3D2}).periodOffset(-2)
前2个周期的数据元素FH8ab5Rog83减去前2个周期的数据元素QOlfIKgNJ3D2
前2个周期的数据元素FH8ab5Rog83加前1个周期的值
(#{FH8ab5Rog83} .periodOffset(-1)+
#{FH8ab5Rog83}).periodOffset(-1)
前2个周期的数据元素FH8ab5Rog83加上前1个周期的值(请注意,函数是嵌套的)
N{IndicatorID}.periodOffset(-1) indicator value from the period before (applies to aggregate data in the indicator)

Indicator SubExpressions

When fetching data for a data element, indicators usually aggregate the data before evaluating it in the expression. For example, consider the indicator expression:

if( #{nYahlae7fe6} > 10, 1, 0 )

If the data element has aggregation type SUM, this will sum all the values of the data element nYahlae7fe6 for the relevant period and then test to see if the sum is greater than 10. It will return 1 if the sum of all the data element values is greater than 10, otherwise it will return 0.

Sometimes you may wish to evaluate a data value in an expression before aggregating it. For example, you may want to show at a district level how many facilities within the district have a data value greater than 10. This can be done by using the subExpression function as follows:

subExpression( if( #{nYahlae7fe6} > 10, 1, 0 ) )

This will test each data element value to see if it is greater than 10. If it is greater than 10, the if statement will return 1, otherwise 0. Then, assuming that data element nYahlae7fe6 has aggregation type SUM, it will sum the 1's and 0's, resulting in a count of how many data elements had a value greater than 10.

SubExpression notes:

  1. 仅当数据元素的聚合类型为 SUM 时,上述示例才会将 1 和 0 相加。如果数据元素具有不同的聚合类型,并且您希望将 1 和 0 相加,则可以使用 .aggregationType() 函数覆盖子表达式内的聚合类型,如下所示:

    subExpression( if( #{nYahlae7fe6} > 10, 1, 0 ) ).aggregationType(SUM)

  2. A SubExpression may reference only one data element, but it may reference it multiple times. For example:

    subExpression( if( #{nYahlae7fe6} > 10 && #{nYahlae7fe6} <= 20, 1, 0 ) )

  3. A SubExpression may reference a data element with a category option combination and/or an attribute option combination, but it must be exactly the same reference each time. For example:

    subExpression( if( #{nYahlae7fe6.beec4Dewah8} > 10 && #{nYahlae7fe6.beec4Dewah8} <= 20, 1, 0 ) )

  4. 如果您希望在聚合前评估一个表达式,该表达式涉及其他类型的数据(如项目数据),或涉及多个数据元素、类别选项组合或属性选项组合,您可以使用预测器来进行评估,并将结果存储为不同的数据元素。然后,您就可以在指标或分析中直接引用预测的数据元素。

Indicator Year-to-date

Indicators can compute year-to-date values using the expression elements yearToDate(), [periodInYear], and [yearlyPeriodCount].

In the examples below, #{a} can be: #{dataElementUID}, or any valid indicator expression item that returns a data value such as #{dataElementUID.catOptionComboUid}, I{programIndicatorUID}, N{indicatorUID}, etc.

指标表达 手段
#{a} current period value
#{a}.yearToDate() sum of values year to date. For example, if the period is March gives the value for Jan+Feb+Mar
#{a}.yearToDate() / [periodInYear] average year-to-date value. For example, if the period is March gives the value for Jan+Feb+Mar / 3
#{a} - #{a}.yearToDate() / [periodInYear] difference between current period and average year to date
#{b} * [periodInYear] / [yearlyPeriodCount] If #{b} represents the annual target population (for example, the number of people who should be vaccinated during this year), then this can show the number of people who should be vaccinated by the current period. For example, in February this gives #{b} * 2 / 12.

Notes on [yearlyPeriodCount]

For monthly periods, [yearlyPeriodCount] is always 12, for quarters is always 4, etc. There are two advantages of using [yearlyPeriodCount] rather than hard-coding numbers like 12 or 4:

  1. For weekly periods [yearlyPeriodCount] will be 52 or 53 depending on the year. For biweekly periods it will be 26 or 27.

  2. If the user chooses a different period type in analytics, [periodInYear] and [yearlyPeriodCount] will adjust accordingly. For example if monthly data is collected, the user can choose to report monthly where [periodInYear] is 1: Jan, 2: Feb, ..., and [yearlyPeriodCount] is 12; or the user can report quarterly where [periodInYear] is 1: Q1, 2: Q2, ..., and [yearlyPeriodCount] is 4.

Notes on missing data

.yearToDate() returns a value if there is any data in the year before or during the period. For example, if the values of #{a} are:

Jan: (no data)
Feb: 1
Mar: 2
Apr: (no data)
May: 3
Jun: (no data)

then the values of #{a}.yearToDate() are:

Jan: (no data)
Feb: 1
Mar: 3
Apr: 3
May: 6
Jun: 6


In the Maintenance app, you manage the following indicator objects:

表:维护应用项目中的指标对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
对于组织单位维度,您可以指定组织 Create, edit, clone, share, delete, show details and translate
Class name Create, edit, clone, delete, show details and translate
Other translatable Properties Create, edit, clone, share, delete, show details and translate
类别选项 Create, edit, clone, share, delete, show details and translate

工作流程

  1. 创建指标类型。

  2. 创建指标。

  3. 创建指标组。

  4. 创建指标组集。

创建或编辑指标类型

指标类型定义了在聚合期间应用的因素。 在数据集市导出或报告期间计算的指标值 表生成过程将显示正确的格式,并且 因此不需要额外的乘法器(例如, 百分比),以使值显示正确的格式。

注意

从DHIS2版本2.4开始,“计算数据元素”对象具有 已弃用。相反,您可以通过以下方式创建计算所得的数据元素: 创建因子类型为“ 1”的指标类型,并通过设置 “数字”选项为“是”。将“数字”选项设置为的效果 “是”将表示该指标实际上没有 分母。因此,您将只能定义一个分子, ,它将用作计算的数据元素的公式。

  1. 打开** Maintenance 应用项目,然后单击 Indicator ** > ** Indicator 类型**。

  2. 点击添加按钮。

  3. In the Name field, type the name of the indicator type, for 例如“百分比”,“每千”,“每万”。

  4. Type a Factor.

    该系数是数值系数,将乘以 指标计算过程中的指标公式。

  5. 点击**保存**。

创建或编辑指标

  1. 打开** Maintenance 应用项目,然后单击 Indicator ** > 指示符

  2. 点击添加按钮。

  3. In the Name field, type the full name of the indicator, for 例如:“每千人确诊的疟疾发病率”。

  4. In the Short name field, type an abbreviated name of the 指标,例如“每千次弹出记录的疟疾传播控制数”。

    简称必须少于或等于25个字符, 包括空格。

  5. (可选)在 Code 字段中,分配一个代码。

    在许多国家/地区,指标均分配有代码。

  6. (Optional) In the Color field, assign a color to reprersent the indicator.

  7. (Optional) In the Icon field, assign an icon to illustrate the meaning of the indicator.

  8. In the Description field, type a brief, informative description 指标及其计算方式。

  9. 如果要在计算过程中应用年化系数 of the indicator, select Annualized.

    通常,将年化指标的分子乘以 因数是12,而分母例如是每年 人口数字。这允许每月的覆盖值是 用年度人口数字计算。

  10. Select the number of Decimals in data output.

  11. 选择**指标类型**。

    该字段确定将自动应用的因子 在指标计算中。可能的选择是 由指标类型决定。例如,“百分比” 指标将自动乘以100, 导出到数据集市,以便将其显示为百分比。

  12. (可选)分配一个或多个**传奇**。

  13. In the URL field, enter a link, for example a link to an 指标注册表,其中完整的元数据描述 指示器可用。

  14. (可选)输入汇总数据的** Category选项组合 出口。**。

    您可以使用此设置将作为原始数据导出的聚合数据映射到 另一台服务器。通常,您会进行这种类型的数据交换映射 当您想根据患者数据创建匿名汇总数据时 记录在项目中(事件数据)。

  15. (可选)输入汇总的**属性选项组合 数据导出。**。

    您可以使用此设置将作为原始数据导出的聚合数据映射到 另一台服务器。通常,您会进行这种类型的数据交换映射 当您想根据患者数据创建匿名汇总数据时 记录在项目中(事件数据)。

  16. 如果适用,请输入自定义属性值,例如 分类**或**收集方法

    Note

    You create custom attributes in the Maintenance app: Other > Attributes.

  17. 点击**编辑分子**。

    1. 键入分子的清晰描述。

    2. 通过双击分子来定义分子 右侧字段。然后,这些组件将作为 左侧字段中的公式。通过添加数学运算符 双击左侧字段下方的图标。

      您的公式必须在数学上有效。这包括正确的 必要时使用括号。

    3. Click Done to save all changes to the numerator.

  18. Click Edit denominator.

    1. 键入分母的清晰描述。

    2. 通过双击组件中的组件来定义分母 右侧字段。然后,这些组件将作为 左侧字段中的公式。通过添加数学运算符 双击左侧字段下方的图标。

      您的公式必须在数学上有效。这包括正确的 必要时使用括号。

    3. Click Done to save all changes to the denominator.

  19. 如果适用,请选择强制性指标组集,例如 人力资源

    Note

    You'll only see indicator group sets in this form if you've created them and set them to Compulsory.

    You create indicator group sets in the Maintenance app: Indicator > Indicator group set.

  20. 点击**保存**。

创建或编辑指标组

  1. 打开** Maintenance 应用项目,然后单击 Indicator ** > ** Indicator 组**。

  2. 点击添加按钮。

  3. 输入名称。

  4. 选择指标并分配它们。

  5. 点击**保存**。

创建或编辑指标组集

指标组集创建相似指标的组合组。对于 例如,您可能有一组称为“疟疾”的指标, “利什曼病”。这两个组可以合并为一组 称为“媒介传播疾病”。指标组集用于 数据分析以结合指标的相似主题。

  1. 打开** Maintenance 应用项目,然后单击 Indicators ** > ** Indicator 组**。

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称
    2. 简称
    3. 描述
    4. 必修
  4. 选择指标组并分配它们。

    可用的指示器组显示在左侧面板中。 当前是指标组成员的指标组 设置显示在右侧面板中。

  5. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理组织单位

在本节中,您将学习如何:

  • 创建一个新的组织单位并建立该组织单位 等级制

  • 创建组织单位组,组集并分配组织 他们的单位

  • 修改组织单位的层次结构

关于组织单位

The organisation unit hierarchy defines the organisation structure of DHIS2, for example how health facilities, administrative areas and other geographical areas are arranged with respect to each other. It is the where dimension of DHIS2, similar to how periods represent the when dimension.

组织单位层次结构是通过父子关系建立的。 在DHIS2中,每个节点都是一个组织单位。一个国家可能 例如有八个省,每个省可能有一个 地区的儿童。通常,最低级别包括 收集数据的设施。数据收集设施也可以 位于较高的级别,例如国家或省级 医院。因此,您可以在DHIS2中创建倾斜的组织树。

  • 您一次只能拥有一个组织层次结构。

  • 层次结构中可以有任意多个级别。

    通常,公共卫生中的国家组织层次结构具有 四到六个级别。

  • 您可以通过使用组织来创建其他分类 组和组织组集。

    例如,创建与 卫生保健部门。

  • 建议使用组织单位组来创建 非地理层次结构。

  • 组织单位只能是单个组织的成员 组织单位组集中的单位组。

  • 一个组织单位组可以是多个组织单位的一部分 组集。

  • 组织单位层次结构是数据的主要载体 地理维度上的汇总。

  • 当您关闭组织单位时,您无法注册或编辑 events to this organisation unit in the Capture app.

Important

You can change the organisation unit hierarchy after you've created it, even organisation units that collect data. However, DHIS2 always uses the latest hierarchy for data aggregation. So if you change the hierarchy, you loose the temporal representation of the hierarchy across time.

District A is sub-divided into District B and District C. Facilities which belonged to District A are reassigned to District B and C. Any historical data, which you entered before the split occurred, is still registered as belonging to District B and C, not to the obsolete District A.

在**维护**应用项目中,您可以管理以下组织单位 对象:

表:维护应用项目中的组织单位对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
类别 Create, edit, clone, delete, show details and translate
Category combination Create, edit, clone, share, delete, show details and translate
数据元素 Create, edit, clone, share, delete, show details and translate
Organisation unit level Edit and translate
Hierarchy operations Move organisation units

工作流程

推荐的工作流程是:

  1. 创建组织单位。

  2. 创建组织单位组。

  3. 创建组织单位组集。

创建或编辑组织单位

您可以将组织单位一个或一个地添加到层次结构中 单位或作为所选组织单位的子级。你只能有 一个根单元。

  1. 打开**维护**应用项目,点击**组织单位** (>)。 组织单位

  2. 点击添加按钮。

  3. 选择您的新组织单位将使用的组织单位 属于:

    1. 点击**父组织单位**。

    2. 在组织单位树中,找到上级组织 单位并选择它。您的选择以黄色标记。

      Tip

      Click the arrows to expand the organisation unit tree.

    3. 点击**选择**。

  4. Enter a Name of the organisation unit.

    每个组织单位必须具有唯一的名称。

  5. Enter a Short name for the organisation unit.

    通常,简称是全称的缩写 组织单位名称。此属性通常用于报表中 显示单位单位的名称,该单位的空间有限。

  6. (可选)分配**代码**。

    在许多国家/地区,为组织单位分配了代码。

  7. (Optional) Upload a / remove the Organisation unit image

  8. (Optional) Type a Description of the organisation unit.

  9. Select an Opening date.

    开幕日期控制着一个组织中存在的组织单位 时间点,例如在分析历史数据时。

  10. If applicable, select a Closed date.

  11. In the Comment field, enter any additional information that you 要添加。

  12. (Optional) In the URL field, enter a link to an external web 具有有关组织单位的其他信息的站点。

  13. 输入联系信息:

    • NONE | MULTI_POLYGON | POLYGON | POINT | SYMBOL

    • 电子邮件

  14. (Optional) Enter Latitude and Longitude.

    您必须具有经度和纬度值才能在地图中创建地图 **地图**应用。然后,您的组织单位可以表示为 点在地图上,例如医疗机构。没有这个 信息,**地图**应用项目将无法使用。

    以后批量导入坐标可能会更有效 使用**导入-导出**应用项目为所有组织单位执行任务。您 还可以使用 ** 导入-导出** 应用项目来创建多边形。多边形是 代表行政边界的组织单位。

  15. If applicable, select Data sets and assign them.

    Note

    You control whether a user should be able to assign data sets to an organisation unit in the System Settings app:

    Open the System Settings app, click Access and select Allow assigning object to related objects during add or update.

  16. If applicable, select Programs and assign them.

    Note

    You control whether a user should be able to assign programs to an organisation unit in the System Settings app:

    Open the System Settings app, click Access and select Allow assigning object to related objects during add or update.

  17. 如果适用,输入自定义属性值,例如** HR 标识符**。

    Note

    You configure the custom attributes in the Maintenance app:

    Open the Maintenance app and click Other > Attribute.

  18. 点击**保存**。

创建或编辑组织单位组

Organisation unit groups allow you to classify related organisation units into a common theme. You can for example group all organisation units that are hospitals in an Hospital group.

  1. 打开**维护**应用项目,点击**组织单位** (>)。 单位部门

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称:为以下内容提供准确,唯一和描述性的名称: 组织单位组。

    2. 简称:简称应小于25 字符。通常,简称是的缩写。 完整的单位部门名称。在某些情况下使用此属性 DHIS2中空间有限的地方。

    3. 符号:选择将用于显示符号的符号 显示图层时的组织单位(仅点) **地图**应用。

  4. 在组织树中,单击您想要的组织单位 添加到组织单位组。

    您可以通过展开目录树来在树中找到组织单位 分支(单击箭头符号),或通过搜索 名称。

    所选组织单位显示为橙色。

  5. 点击**保存**。

创建或编辑组织单位组集

组织单位组集允许您创建其他 组织单位的分类。组集创建新 尺寸,以便您可以进行更详细的数据分析。你一个 轻松按组集中的组过滤,组织或汇总数据。

  • 您可以具有任意数量的组织单位组集。

  • 默认的组织单位组集是**类型**和 所有权

  • 组织单位只能是单个组织的成员 组织单位组集中的单位组。

  • 一个组织单位组可以是多个组织单位的一部分 组集。

  • 您可以定义组织单位组集是否是强制性的 是否会影响数据的完整性。必修 表示所有组织单位必须是该组中的成员 组集。

注意

在**数据管理**应用项目的**数据完整性**部分,您 可以验证您是否不小心分配了同一个组织单位 到同一组集中的多个组。在这个应用项目中,您还 查找有关不属于某个组织成员的组织单位的信息 强制组织单位组设置。

  1. 打开**维护**应用项目,点击**组织单位** (>)。 组织单位组集

  2. 点击添加按钮。

  3. 填写:

    1. 名称:为组织单位组提供准确的名称 组。

    2. Short name: Provide a short name for the organisation unit group 组。

    3. 说明:说明组织单位组设置了什么 测量或捕获。

  4. 如果您希望所有组织单位成为该组中的成员 the group set, select Compulsory.

  5. (Optional) Select Data dimension.

    If you select **Data dimension**, the group set will be available to the analytics as another dimension, in addition to the standard dimensions of "Period" and "Organisation unit".
    
  6. (Optional) Select Include subhierarchy in analytics.

    如果您选择此选项,则子单位部门将继承 最接近的“父级”的组织单位组属性 组织单位。子组织单位的任何财产将 覆盖继承值。

    如果单位部门没有关联的单位部门组, 组织单位可以继承其最接近的上级组织 单位组。如果上级组织单位组都没有 给定组织单位组集的组织单位组,结果 仍然是“空白”,但如果至少有一个父母有 组织单位组,子组织单位将继承它。

    在分析中包含子层次结构”已启用,这意味着组织 单位继承了最亲密的父母单位 为白色(没有与之关联的单位部门组)。

  7. 选择组织单位组并分配它们。

    在左侧列表中,找到可用的组织单位 组。使用箭头在两个组之间移动选定的组 列表。

    如果左侧列表中没有组织单位组, 点击**添加新**。在打开的表单中,创建组织 units group you need. When you're done, click Refresh values.

    Note

    An organisation unit can only be a member of a single organisation unit group within an organisation unit group set.

  8. 请点击 保存

You want to analyse data based on the ownership of the facilities. All facilities have an owner so you need to make sure that all organisation units get this classification. To do that you can use the Compulsory option:

  1. 为每种所有权类型创建一个组,例如“ MoH”,“私有” 和“基于信仰”。

  2. 将数据库中的所有设施分配给这些组之一。

  3. 创建一个名为“所有权”的组织单位组集,然后选择 必修

  4. 分配组织单位组“ MoH”,“私人”和 从“基于信仰”到“所有权”组织组 组。

通过两种方式对组织单位进行分组,并汇总这两种数据 并行层次结构

用于汇总数据(仅在分析应用项目中)

组织单位组设置的附加设置将创建一个 动态“成员资格”到组织单位组的集合。

您无需更改组织单位的层次结构

可扩展和动态

动态包含层次

动态附加分类

为组织单位级别分配名称

当您将子女添加到一个组织单位时,DHIS2 会自动 会自动创建一个新的组织单位级别(如有必要)。系统还会 为该级别指定一个通用名称,如 "第 5 级"。您可以 用上下文名称代替通用名称,如 "国家"、"省"、"区 "或 "县"、 省"、"区 "或 "卫生机构"。DHIS2 使用上下文名称 名称,例如在**地图**应用项目中。

  1. 打开**维护**应用项目,点击**组织单位** (>)。 组织单位级别

    列表的加载时间取决于列表的深度 组织单位层次结构树。

  2. 对于要修改的组织单位级别,输入名称。

  3. 选择离线级别的数量。

    Note

    You configure the default value in the System Settings app:

    Open the System Settings app, click General and select a level in the Max offline organisation unit levels list.

  4. 点击**保存**。

在层次结构中移动组织单位

您可以通过以下方式在层次结构中移动组织单位: 所选组织单位的父级。

  1. 打开**维护**应用项目,点击**组织单位** (>)。 等级操作

  2. 在左侧的层次结构树中,选择您要使用的组织单位 想搬家。

    Note

    If the selected organisation unit is has sub-organisation units, all of them move to the new parent organisation unit.

  3. 在右侧的层次结构树中,选择您要使用的组织单位 想要将选定的组织单位移动到。

  4. Click Move x organisation units, where x stands for the number 您选择的组织单位数。

    您的更改将立即反映在左侧 层次树。

关闭组织单位

When you close an organisation unit, you can't register or edit events to this organisation unit in the Capture app.

  1. 打开**维护**应用项目,点击**组织单位** (>)。 组织单位

  2. In the object list, click the options menu and select Edit.

  3. Select a Closed date.

  4. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

Manage validation rules

关于验证规则

验证规则基于表达式。该表达式定义了一个 数据元素值之间的关系。该表达式形成一个 条件符合某些逻辑条件。

该表达式包括:

  • 左侧

  • 右边

  • 操作员

验证规则断言所接种的疫苗总数 婴儿小于或等于婴儿总数。

左侧和右侧必须返回数字值。

在**维护**应用项目中,您需要管理以下验证规则 对象:

CSV元数据导入 { #webapi_csv_metadata_import } What you can do
指示符 Create, edit, clone, delete, show details, and translate
Indicator type Create, edit, clone, delete, share, show details, and translate
Validation notification Create, edit, clone, delete, show details, and translate

关于推拉窗

You can use sliding windows to group data across multiple periods as opposed to selecting data for a single period. Sliding windows have a size, that is to say, the number of days to cover, a starting point and an end point. The example below shows disease surveillance data:.

  • 橙色部分中的数据,根据当前数据选择数据 期。有一个阈值,每周计算一次 或期间,并显示在“结果”部分中。

  • 蓝色部分中的数据是滑动窗口。它选择数据 从过去7天开始。 “结果”显示了总数 确诊病例。

  • 验证规则可确保在总数达到 案例数超出了该时间段的阈值。

Different behaviour of validation rules
With sliding windows Without sliding windows
Used only for event data. Used for event data and aggregate data.
Data selection is based on a fixed number of days (periodType). Data selection is always based on a period.
The position of the sliding window is always relative to the period being compared. Data is always selected for the same period as the period being compared.

另请参阅:[创建或编辑广告时,如何使用滑动窗口 验证 规则](https://docs.dhis2.org/master/en/user/html/manage_validation_rule.html#create_validation_rule)。

关于验证规则组

验证规则组使您可以对相关的验证规则进行分组。 当您运行* [验证规则 分析](https://docs.dhis2.org/master/zh/user/html/validation_rule_analysis.html)*, 您可以选择运行系统中的所有验证规则,或者 只是一组验证规则。

关于验证通知

You can configure a validation rule analysis to automatically send notifications about validation errors to selected user groups. These messages are called validation notifications. They are sent via the internal DHIS2 messaging system.

您可以将验证规则通知作为单独的消息或作为 消息摘要。这很有用,例如,如果您要发送 有关高优先级疾病暴发的个别消息和摘要 用于低优先级常规数据验证错误。

About validation rule functions

You can use the following functions in a validation rule left side or right side:

Validation Rule functions
Validation Rule Function size Parameter name
contains (expr, sub1, ...) Searches an expression for one or more substrings. Returns true if the expression contains all the substrings. For example, the following are all true: contains("abcd", "abcd"); contains("abcd", "b"); and contains("abcd", "ab", "bc"). Comparisons are case-sensitive.
containsItems (expr, item1, ...) Searches an expression for one or more items. The expression is made up of comma-separated elements. containsItems returns true if every item exactly matches an element in the expression. For example, containsItems("abcd", "abcd") and containsItems("ab,cd", "ab", "cd") are true, but containsItems("abcd", "b") and containsItems("abcd", "ab", "bc") are false. Comparisons are case-sensitive. containsItems can be used for multi-valued data elements to see if an item is contained in the data element values.
如果 (boolean-expr, true-expr, false-expr) Evaluates the boolean expression and if true returns the true expression value, if false returns the false expression value. The arguments must follow the rules for any indicator expression.
is (expr1 in expression [, expression ...]) Returns true if expr1 is equal to any of the following expressions, otherwise false.
一片空白 (element) Returns true if the element value is missing (null), otherwise false.
isNotNull (element) Returns true if the element value is not missing (not null), otherwise false.
firstNonNull (element [, element ...]) Returns the value of the first element that is not missing (not null). Can be provided any number of arguments. Any argument may also be a numeric or string literal, which will be returned if all the previous objects have missing values.
最伟大的 (expression [, expression ...]) Returns the greatest (highest) value of the expressions given. Can be provided any number of arguments.
最小 (expression [, expression ...]) Returns the least (lowest) value of the expressions given. Can be provided any number of arguments.
log (expression [, base ]) Returns the natural logarithm (base e) of the numeric expression. If an integer is given as a second argument, returns the logarithm using that base.
log10 (expression) Returns the common logarithm (base 10) of the numeric expression.
false Returns no result. For example, if( #{FH8ab5Rog83}<0, null, 1 ) returns nothing if the data element value is less than 0, otherwise 1.
orgUnit.ancestor (orgUnitUid [, orgUnitUid ...]) Returns true if the organisation unit is a descendant of any of the (1 or more) organisation units, otherwise false.
orgUnit.dataSet (dataSetUid [, dataSetUid ...]) Returns true if the organisation unit is assigned to any of the (1 or more) data sets, otherwise false.
orgUnit.group (ouGroupUid [, ouGroupUid ...]) Returns true if the organisation unit is a member of any of the (1 or more) organisation unit groups, otherwise false.
orgUnit.program (programUid [, programUid ...]) 如果组织单位被分配给任何(1 个或多个)项目,则返回 true,否则返回 false。
removeZeros (expression) Returns nothing if the expression value is 0, otherwise returns the expression value.

创建或编辑验证规则

  1. 打开**维护**应用项目,点击**验证** (>)。 验证规则

  2. 点击添加按钮。

  3. Type a Name.

    在验证规则中,名称必须唯一。

  4. (可选)在 Code 字段中,分配一个代码。

  5. (可选)输入**说明**。

  6. 选择**重要性**:中**或**低

  7. Select a Period type.

  8. 选择一个**操作员**:必填项等于独家配对大于大于或等于 或**不等于**。

    **必填对**运算符允许要求该数据值 必须为表格的左侧和右侧输入表格 表情,还是双方都没有。这意味着您可以要求 如果填写表单中的一个字段,则一个或多个其他字段 还必须填写。

    **独占对**可以断言是否存在任何值 左侧,则右侧应没有值(或 反之亦然)。这意味着构成规则的数据元素 任何一方都应相互排斥,因为 给定的时间段/组织单位/属性选项组合。

  9. 创建表达式的左侧:

    1. Click Left side.

    2. Select Sliding window if you want to view data relative to 您比较的时期。另请参见[关于验证 规则](https://docs.dhis2.org/master/zh/user/html/manage_validation_rule.html#about_validation_rule)。

    3. Select a Missing value strategy. This selection sets how the 如果数据丢失,系统将评估验证规则。

      选项 说明
      如果缺少任何值,则跳过验证规则。这是默认选项。

      在使用**独占配对**或**强制配对**操作符时,请务必选择此选项。
      如果所有值都缺失则跳过 只有当组成表达式的所有操作数都缺失时,才跳过验证规则。
      从不跳过 在数据缺失的情况下不会跳过验证规则,所有缺失的操作数都将被视为 0。
    4. 输入**描述**。

    5. 根据可用的数据元素建立表达式、

      1. 根据可用的数据元素、项目对象、组织单位、计数和常量建立表达式。

      在右窗格中,双击要包含在表达式中的数据对象。 双击要包含在表达式中的数据对象。与左窗格下方的数学 运算符。

    6. 点击**保存**。

  10. 创建表达式的右侧:

    1. Click Right side.

    2. Select a Missing value strategy. This selection sets how the 如果数据丢失,系统将评估验证规则。

      Option Description
      Skip if any value is missing The validation rule will be skipped if any of the values which compose the expression are missing. This is the default option.

      Always select this option you use the Exclusive pair or Compulsory pair operator.
      Skip if all values are missing The validation rule will be skipped only if all of the operands which compose it are missing.
      Never skip The validation rule will never be skipped in case of missing data, and all missing operands will be treated effectively as a zero.
    3. Select Sliding window if you want to view data relative to the period you are comparing. See also About validation rules.

    4. Type a Description.

    5. Build an expression based on the available data elements, program objects, organisation units, counts and constants.

      In the right pane, double-click the data objects you want to include in the expression. Combine with the mathematical operators located below the left pane.

    6. Click Save.

  11. (Optional) Choose which Organisation unit levels this rule 应该进行评估。将此留空将导致 要在所有级别上评估的验证规则。

  12. (Optional) Click Skip this rule during form validation to avoid 进行数据输入时触发此规则

  13. 点击**保存**。

创建或编辑验证规则组

  1. 打开**维护**应用项目,点击**验证** (>)。 验证规则组

  2. 点击添加按钮。

  3. Type a Name.

  4. (可选)在 Code 字段中,分配一个代码。

  5. (可选)输入**说明**。

  6. Double-click the Validation rules you want to assign to the 组。

  7. 点击**保存**。

创建或编辑验证通知

  1. 打开**维护**应用项目,点击**验证** (>)。 验证通知

  2. 点击添加按钮。

  3. Type a Name.

  4. (可选)在 Code 字段中,分配一个代码。

  5. Select Validation rules.

  6. Select Recipient user groups.

  7. (Optional) Select Notify users in hierarchy only.

    如果选择此选项,系统将过滤收件人 用户。 (系统从收件人那里获取收件人用户 用户组。)过滤器基于 收件人用户所属。链接到组织单位的用户 是违规组织单位的祖先 发生后将收到验证通知。系统将 忽略其他用户,这些用户将不会收到验证 通知。

  8. 创建消息模板:

    1. 创建**主题模板**。

      Double-click the parameters in the Template variables field 将它们添加到您的主题。

    2. 创建**消息模板**。

      Double-click the parameter names in the Template variables 字段以将其添加到您的消息中。

  9. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理属性

关于属性

您可以使用元数据属性将其他信息添加到 元数据对象。除了每个标准属性 这些对象可能有助于存储其他信息 属性,例如数据元素的收集方法。

In the Maintenance app, you manage the following attribute objects:

表格:维护应用项目中的属性对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
ValidationRuleGroup Create, edit, clone, delete, show details and translate

创建或编辑属性

  1. 打开**维护**应用项目并点击**属性**。

  2. 点击添加按钮。

  3. 名称 字段中,输入属性的名称。

    每个属性必须具有唯一的名称

  4. (可选)在 Code 字段中,分配一个代码。

  5. 选择**值类型**。

    如果为属性提供的值与该值不匹配 键入您将收到警告。

  6. Select an Option set.

  7. 选择所需的选项,例如:

    • 选择**强制**如果希望对象始终具有 动态属性。

    • Select Unique if you want the system to enforce that values 对于特定的对象类型是唯一的。

  8. 点击**保存**。

    动态属性现在可用于您分配的对象 它来。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理常数

关于常数

常量是可以供用户使用的静态值 在数据元素和指标中。一些指标,例如“夫妇年 保护率”取决于通常不会转换的常数 时间。

维护 应用项目中,您管理以下常量对象:

表格:维护应用项目中的常量对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
N{<indicator-id>} Create, edit, clone, share, delete, show details and translate

创建或编辑常量

  1. 打开 Maintenance 应用项目,然后单击 Other (> Constant )。

  2. 点击添加按钮。

  3. 名称 字段中,输入常量的名称。

  4. (Optional) In the Short name field, type an abbreviated name of 常数。

  5. (可选)在 Code 字段中,分配一个代码。

  6. In the Description field, type a brief, informative description 常数。

  7. 字段中,定义常量的值。

  8. 点击**保存**。

    现在可以使用该常数。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理选项集

关于选项集

选项集提供了一个预定义的下拉列表(枚举),用于 DHIS2。您可以定义任何类型的选项。

一个名为“投放类型”的选项集将具有以下选项:“普通”, “违反”,“剖腹产”和“协助”。

表格维护应用项目中的选项集对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
网址 Create, edit, clone, share, delete, show details and translate
选项组 Create, edit, clone, share, delete, show details and translate
Option group set Create, edit, clone, share, delete, show details and translate

创建或编辑选项集

重要

选项集必须具有代码和名称。您可以更改 名称,但是您无法更改代码。所有的名称和代码 选项即使在不同的选项集之间也必须是唯一的。

  1. 打开**维护**应用项目,点击**其他** (> 选项集)。

  2. 点击添加按钮。

  3. In the Primary details tab, define the option set:

    1. 名称 字段中,输入常量的名称。

    2. In the Code field, assign a code.

    3. 选择**值类型**。

    4. 点击**保存**。

  4. 对于您需要的每个选项,执行以下任务:

    1. Click the Options tab.

    2. 点击添加按钮。

    3. Type a Name and a Code. Optionally also select a **颜色**和**图标**将用于此选项 数据捕获应用项目。

    4. 按名称,代码/值或手动对选项进行排序。

    5. 点击**保存**。

创建或编辑选项组

You can group and classify options within an option set by using option groups. This way you can create a subset of options in an option set. The main purpose of this is to be able to filter huge option sets into smaller, related parts.

Options that are grouped can be hidden or shown together in the Capture app through program rules.

Note

You cannot change the Option set selected in an Option group once it has been created.

  1. 打开**维护**应用项目,点击**其他** (> 选项组

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称
    2. 简称
    3. 选项集
  4. 选择**选项集**后,您可以分配要分组的**选项**。

  5. 点击**保存**。

创建或编辑选项组集

**选项组集**允许您将多个**选项组**归为一组。 选项组集的主要目的是为捕获的数据添加更多维度以进行分析。

Note

You cannot change the Option set selected in an Option group set once it has been created.

  1. 打开** Maintenance 应用项目,然后单击 Other ** > ** Option group set **。

  2. 点击添加按钮。

  3. 填写表格:

    1. 名称
    2. 描述
    3. 选项集
    4. 数据尺寸

      If you select Data dimension, the group set will be available to the analytics as another dimension, in addition to the standard dimensions of "Period" and "Organisation unit".

  4. 选择选项组并分配它们。

可用选项组显示在左面板中。当前为选项组集成员的选项组显示在右侧面板中。

  1. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理图例

关于传说

您可以创建,编辑,克隆,删除,显示详细信息和翻译图例 使您为用户设置的地图有意义。您创建 **地图**应用中的地图。

注意

连续图例必须包含结束和开始的图例项 具有相同值,例如:0-50和50-80。不设置图例 像这样的项目:0-50和51-80。这将在您的图例中造成空白。

创建或编辑图例

注意

不允许在图例中留有空白。

不允许有重复的图例项。

  1. 打开** Maintenance 应用项目,然后单击 Other ** > ** Legend **。

  2. 点击添加按钮。

  3. In the Name field, type the legend name.

  4. (可选)在 Code 字段中,分配一个代码。

  5. 创建您想在图例中包含的图例项:

    1. 选择**起始值**和**结束值**。

    2. Select Number of legend items.

    3. 选择一种配色方案。

    4. 点击**创建图例项**。

    Tip

    Click the options menu to edit or delete a legend item.

  6. (可选)添加更多图例项:

    1. 点击添加按钮。

    2. 输入名称,然后选择一个开始值,一个结束值和一种颜色。

    3. 点击**确定**。

  7. (可选)更改色阶。

    1. 单击色阶以查看色阶选项列表, 并选择一个色标。

    2. 要自定义色标,请单击添加按钮。在**编辑 图例项**对话框,单击色阶按钮并手动选择 颜色,或输入您的颜色值。

  8. 点击**保存**。

图例项 Start value End value
Low bad 0 50
50 80
High good 80 100
Too high 100 1000

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

更改元数据对象的共享设置

您可以为元数据对象分配不同的共享设置,例如 示例组织单位和跟踪的实体属性。这些分享 设置可控制哪些用户和用户组可以查看或编辑 元数据对象。

一些元数据对象还允许您更改共享设置 对象的数据输入。这些附加设置控制谁可以 使用元数据查看或在表单字段中输入数据。

注意

默认设置是所有人(公共访问权限)都可以找到, 查看和编辑元数据对象。

  1. 打开**维护**应用项目,找到元数据对象类型 您要修改。

  2. In the object list, click the context menu and select Sharing 设置

  3. (可选)添加用户或用户组:搜索一个或多个用户 分组并选择它。用户或用户组已添加到列表中。

  4. 更改要修改的访问组的共享设置。

    • 可以编辑和查看:访问组可以查看和编辑 目的。

    • 只能查看:访问组可以查看对象。

    • 禁止访问(仅适用于**公共访问**):公众 将无法访问该对象。

  5. 更改您要访问的访问组的数据共享设置 修改。

    • 可以捕获数据:访问组可以查看和捕获数据 为对象。

    • 可以查看数据:访问组可以查看以下数据: 目的。

    • 无访问权限:访问组将无法访问以下数据: 物体。

  6. 点击**关闭**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

将图例分配给指标或数据元素

您可以将图例分配给指标或数据元素 维护**应用项目,在您创建对象或编辑它时。什么时候 然后,您在 **Maps 应用项目中选择指标或数据元素, 系统自动选择指定的图例。

也可以看看

管理预测变量

关于预测变量

预测变量定义如何从表达式生成聚合数据值 包含汇总和/或事件数据。预测值可以基于:

  • 来自与预测值相同时期的数据,和/或

  • 来自预测值之前期间的数据

同期数据

预测器可以使用与预测值相同周期的数据。 例如,您可以计算具有 通过使用预测器表达式,例如:数据元素的非零值:

  if(#{ji7o0ILHuU2}!= 0,1,0) 

When you run this predictor at the organisation unit level where the data is collected, it will store 1 as the predicted value if the data element has a nonzero value for that organisation unit, otherwise 0. (If the data element that you predict into does not store zeros, then zeros will not be stored in the database, to save space.) You can then sum this predicted value in analytics at a higher organisation unit level, to count the number of organisation units with a nonzero value that are under each organisation unit in the report.

前期数据

当您指定汇总时,预测变量将使用以前期间的数据 函数,例如sum()或avg()。例如,以下生成器表达式 标识一个值,该值是平均值加上标准偏差的两倍 前期数据:

  avg(#{ji7o0ILHuU2})+ 2 * stddev(#{ji7o0ILHuU2}) 

上一时期的数据

预测变量表达式可以访问与 通过访问两个 汇总函数(针对先前期间),以及任何汇总函数之外 (同一时期)。例如,如下所示的表达式可以是 用来平衡上一时期(#{KOh02hHko7C}) 加上此期间的净变化(#{ji7o0ILHuU2}), 得出此期间的余额:

  sum(#{KOh02hHko7C})+#{ji7o0ILHuU2}  

第一个数据值在聚合表达式(总和)内,以指示 它正在采样前一时期的数据(即使只有一个前一时期), 而第二个数据值不在聚合函数中以表明它 正在引用同一时期的数据。

如果需要,可以在同一引用中引用预测变量的输出数据元素 预测变量的表达。例如,此示例中的表达式可以 用于预测一段时间内的余额,然后将该值与 下一个期间的变化以计算下一个期间的余额。 当预测变量跨多个期间运行时,将在以下期间处理这些期间 按时间顺序排列,可以使用较早时期的结果 作为以后的输入。

预测器组织单位级别

您需要为预测变量的输出选择一个或多个组织单位级别。 预测变量生成的所有值都存储在组织单位的 您选择的级别。预测变量表达式中的每个项目都是值的总和 为该组织单位存储的信息(如果有的话)以及组织中存储的所有值 低于该单位(如果有)的单位。

注意

在配置预测变量时,必须选择一个或多个组织单位级别 将输出预测数据。如果未选择任何级别,则不会预测 将生成值。

警告

如果您想在分析报告中使用预测值或 其他预测,请勿选择多个组织单位级别。 当您选择多个级别时,较高级别的预测将 还包括在较低级别的预测中使用的任何数据。如果预测 随后从多个级别将其用于分析或表达式中 其他预测变量,这可能会导致重复计算,因为 较高级别的值包括较低级别的预测值。

如果使用预测的组织单位级别,则可以选择多个组织单位级别 值仅在验证规则中。例如在疾病监测中,您 如果实际值高于 根据上一期间数据得出的该期间的期望值范围。 为此,您可以创建一个预测变量以计算平均值加上两倍的 前期数据的标准偏差。您可以使用验证 将该最高期望值与实际值进行比较的规则。 您可以在多个级别上运行预测变量和验证规则 以检测不同的爆发情况。在一种情况下,可能会有 一个设施的显着增加超出了预期范围,但是 包含该设施的地区可能不会超出其预期范围 因为地区价值与许多其他设施结合在一起。 但在另一种情况下, 设施不超出每个设施的预期范围(因为 每个设施的标准偏差可能很高),但确实超过了 该地区的预期范围(因为 整个地区的标准偏差可能会更低)。

如果要生成多个级别的预测,则还可以 在不同级别使用不同的预测变量。例如,您可能想要 如果某一级别的值超过平均值再加上标准的两倍,则会收到警报 偏差,但如果超出平均值加1.8倍,则会在另一个级别发出警报 标准偏差。如果需要,可以配置不同的预测变量 具有相同的输出数据元素。如果您使用相同的输出数据元素, 这仍然适用于不同组织单位级别的有效规则, 但您也必须注意不要在分析或其他结果中使用结果 预测器计算以避免重复计算。

In the Maintenance app, you manage the following predictor objects:

表格维护应用项目中的预测对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
选项 Create, edit, clone, delete, show details and translate

抽样前期

预测变量可以生成过去一段时间的数据值, 现在或将来。这些值基于预测期间的数据, 和/或来自预测时期之前的时期的采样数据。

如果您只需要进行预测的同一时期的数据, 那么您无需阅读本节。本节介绍如何 从预测周期之前的周期中采样数据。

顺序样本计数

A predictor's Sequential sample count gives the number of immediate previous periods to sample. For example, if a predictor's period type is Weekly and the Sequential sample count is 4, this means to sample four previous weeks immediately preceding the predicted value week. So the predicted value for week 9 would use samples from weeks 5, 6, 7, and 8:

如果预测变量的周期类型是* Monthly Sequential sample count *为4,这意味着立即采样前四个月 在预测值月份之前。所以五月的预测值 将使用一月,二月,三月和四月的样本:

The Sequential sample count can be greater than the number of periods in a year. For example, if you want to sample the 24 months immediately preceding the predicted value month, set the Sequential sample count to 24:

顺序跳过计数

A predictor's Sequential skip count tells how many periods should be skipped immediately previous to the predicted value period, within the Sequential sample count. This could be used, for instance, in outbreak detection to skip one or more immediately preceding samples that might in fact contain values from the beginning of an outbreak that you are trying to detect.

For example, if the Sequential sample count is 4, but the Sequential skip count is 2, then the two samples immediately preceding the predicted period will be skipped, resulting in only two periods being sampled:

年度样本数

A predictor's Annual sample count gives the number of previous years for which samples should be collected at the same time of year. This could be used, for instance, for disease surveillance in cases where the expected incidence of the disease varies during the year and can best be compared with the same relative period in previous years. For example, if the Annual sample count is 2 (and the Sequential sample count is zero), then samples would be collected from periods in the immediately preceding two years, at the same time of year.

顺序和年度样本计数一起

You can use the sequential and annual sample counts together to collect samples from a number of sequential periods over a number of past years. When you do this, samples will be collected in previous years during the period at the same time of year as the predicted value period, and also in previous years both before and after the same time of year, as determined by the Sequential sample count number.

For example, if the Sequential sample count is 4 and the Annual sample count is 2, samples will be collected from the 4 periods immediately preceding the predicted value period. In addition samples will be collected in the previous 2 years for the corresponding period, as well as 4 periods on either side:

顺序,年度和跳过样本计数一起

You can use the Sequential skip count together with the sequential and annual sample counts. When you do this, the Sequential skip count tells how many periods to skip in the same year as the predicted value period. For example, if the Sequential sample count is 4 and the Sequential skip count is 2, then the two periods immediately preceding the predicted value period period will be skipped, but the two periods before that will be sampled:

If the Sequential skip count is equal to or greater than the Sequential sample count, then no samples will be collected for the year containing the predicted value period; only periods from past years will be sampled:

样品跳过测试

您可以使用* Sample skip test *(样本跳过测试)来跳过某些时段的样本 根据测试结果, 在那些时期内表达。例如,可以在 疾病暴发检测,样本跳过测试可以识别 以前的疾病暴发,将那些样本从预测中排除 非爆发基准期望值。

  • Sample skip test *是一个应返回值的表达式 是或否,表示是否应跳过该时间段。 它可以是一个测试上一时期中任何数据值的表达式。 例如,它可以测试是否有明确输入的数据值 表示应跳过上一个期间。或者可以 将一段时间内的先前预测值与实际值进行比较 记录该时间段,以确定是否应跳过该时间段。

*样本跳过测试*为*真*的任何时期都不会 采样。例如:

Predictors and category option combinations (disaggregations)

The category option combination (disaggregation) for predictor output data is chosen in one of three ways:

  1. Default category option combination.

If the predictor's output data element has no disaggregations (category combination "None", also known as the default category combination), then all predictor output data will be made in the default category option combination. In this case, predictor output data is not disaggregated.

  1. Fixed category option combination

If the predictor's output data element has a category combination other than "None", you can choose a fixed disaggregation for the predictor "Output category option combo". If you do so, all output from this predictor will have this category option combination.

For example, if the output data element has a category combination of "Sex and Age", you can decide that all predictor output will go to a category option combination such as "Female under 5", "Male 5 - 10", or any other.

  1. Use the input category option combo (available in v40.1 and following)

If the predictor's output data element has a category combination other than "None", you can choose "Predict according to input category option combo" as the value for "Output category option combo". If you do so, a different prediction is made for each category option combo in the output data element's category combination (that is, one prediction for "Female under 5", a second for "Male under 5", a third for "Female 5 - 10", and so on).

(In v40.1, this feature is enabled by selecting the choice "\<no value>" for "Output category option combo".)

> **Tip**
>
> In some installations, the options in a category may have changed over time.
For example, a category "Age" may have had three options "1-5", "6-10", and "over 10",
but then was changed to only have two options "10 and under" and "over 10".
Historical data may have values with any of these options.
To use a predictor with such data, you can define another category
such as "Reporting Age" with all the options ever used, such as "1-5", "6-10",
"10 and under", and "over 10". Use this category in the category combination
for the predictor's output data element. This means that all the input category
options will be reflected in the output.
>
> If you then want a single report for the output data that covers
all the disaggregations, you can use category option groups
in a category option group set. For example use a category option group
"10 and under" that contains category options "1-5", "6-10", and "10 and under".

Predictors and attribute option combinations

If the input data to a prediction has attribute option combinations, a different prediction will be made for each attribute option combination where there is data.

For example, you could use attribute option combinations to represent different projects on your system. The predictor will generate a value with the attribute option combination for Project A when it finds input data for Project A; it will generate a value with the attribute option combination for Project B when it finds input data for Project B; and so on.

For any input data without attribute option combinations (in other words, with the default attribute option combination), predictions are generated using the default attribute option combination. If you don't use attribute option combinations in the data, they will not be used in predictor output data.

If you use attribute option combinations and also "Predict according to input category option combo", there will be a separate prediction for each combination of disaggregation and attribute option combination. For example, there could be a prediction for Project A data for "Female under 5", a prediction for Project A data for "Male under 5", a prediction for Project B data for "Female under 5", and so on.

创建或编辑预测变量

  1. 打开** Maintenance 应用项目,然后单击 Other ** > ** Predictor **。

  2. 点击添加按钮。

  3. In the Name field, type the predictor name.

  4. (可选)在 Code 字段中,分配一个代码。

  5. (可选)输入**说明**。

  6. Select an Output data element. Values generated by this 预测变量存储为与此数据关联的聚合数据 元素和预测周期。

    该值根据数据的值类型四舍五入 元素:如果值类型是整数类型,则预测值 舍入到最接近的整数。对于所有其他值类型, 数字四舍五入到四位有效数字。 (但是,如果有 小数点左边多于四位数,它们不是 替换为零。)

  7. (Optional) Select an Output category option combo. This dropdown will only show if the selected data element has a category combination other than "None". If so, you can select which disaggregation category option combo you would like to output to, or you can select "Predict according to input category option combo" (see the discussion above).

  8. Select a Period type.

  9. Assign one or more organisation unit levels. The output value will be 分配给此级别(或这些级别)的组织单位。 For aggregate data, the input values depends on the selection below; organisation units providing data. For tracker based data, the input values will come from the organisation unit to which the 分配了输出,或从输出下方的任何较低级别进行分配 组织单位。

  10. Organisation units providing data controls where the input values comes from for aggregate data. If "at selected levels only", only organisation units at the selected levels are included. If "At selected levels and all levels below" is selected, organisation units at the selected level(s) and all organisation units below are also included.

  11. 创建一个**生成器**。生成器是用于计算预测值的表达式。

    1. Type a Description of the generator expression.

    2. Select a Missing value strategy. This selection sets how the system evaluates a validation rule if data is missing.

      选项 说明
      Skip if any value is missing The validation rule will be skipped if any of the values which compose the expression are missing. This is the default option.

      Always select this option you use the Exclusive pair or Compulsory pair operator.
      如果所有值均缺失,则跳过 仅当组成该值的所有值均缺失时,才跳过验证规则。
      永不跳过 如果缺少数据,将永远不会跳过验证规则,并且所有缺失值都将被有效地视为零。
    3. 输入生成器表达式。您可以通过选择聚合数据的数据元素或项目数据元素,属性或指标来构建表达式。尚不支持组织单位计数。

      要使用过去的采样数据,应将选择的所有项目包含在以下聚合函数之一中(请注意,这些函数名区分大小写):

      Aggregate function Means
      avg(x) Average (mean) value of x
      count(x) Count of the values of x
      max(x) Maximum value of x
      median(x) Median value of x
      min(x) Minimum value of x
      percentileCont(p, x) Continuous percentile of x, where p is the percentile as a floating point number between 0 and 1. For example, p = 0 will return the lowest value, p = 0.5 will return the median, p = 0.75 will return the 75th percentile, p = 1 will return the highest value, etc. Continuous means that the value will be interpolated if necessary. For example, percentileCont( 0.5, #{FTRrcoaog83} ) will return 2.5 if the sampled values of data element FTRrcoaog83 are 1, 2, 3, and 4.
      stddev(x) Standard deviation of x. This function is eqivalent to stddevSamp. It's suggested that you use the function stddevSamp instead for greater clarity.
      stddevPop(x) Population standard deviation of x: sqrt( sum( (x - avg(x))^2 ) / n )
      stddevSamp(x) x 的样本标准差:sqrt( sum( (x - avg(x))^2 ) / ( n - 1 ) )。请注意,当只有一个样本时不会计算此值。
      sum(x) Sum of the values of x

      Note

      Any items inside an aggregate function will be evaluated for all sampled past periods, and then combined according to the formula inside the aggregate function. Any items outside an aggregate function will be evaluated for the period in which the prediction is being made.

      您可以通过单击(或 输入)表达式字段下方的任何元素: () * / +-天数。 可以通过键入常数来添加常数。那些日子 选项将 [days ]插入到解析为 数据来源期间的天数。

      您还可以在您的计算机中使用以下非聚合函数 表达式,在聚合函数内部或包含 聚合函数,或独立于聚合函数:

      Function Means
      contains(expr, sub1, ...) Searches an expression for one or more substrings. Returns true if the expression contains all the substrings. For example, the following are all true: contains("abcd", "abcd"); contains("abcd", "b"); and contains("abcd", "ab", "bc"). Comparisons are case-sensitive.
      containsItems(expr, item1, ...) Searches an expression for one or more items. The expression is made up of comma-separated elements. containsItems returns true if every item exactly matches an element in the expression. For example, containsItems("abcd", "abcd") and containsItems("ab,cd", "ab", "cd") are true, but containsItems("abcd", "b") and containsItems("abcd", "ab", "bc") are false. Comparisons are case-sensitive. containsItems can be used for multi-valued data elements to see if an item is contained in the data element values.
      if(test, valueIfTrue, valueIfFalse) Evaluates test which is an expression that evaluates to a boolean value -- see Boolean expression notes below. If the test is true, returns the valueIfTrue expression. If it is false, returns the valueIfFalse expression.
      is(expr1 in expression [, expression ...]) Returns true if expr1 is equal to any of the following expressions, otherwise false.
      isNull(item) Returns the boolean value true if the item is null (missing), otherwise returns false. The item can be any selected item from the right (data element, program data element, etc.).
      isNotNull(item) Returns true if the item value is not missing (not null), otherwise false.
      firstNonNull(item [, item ...]) Returns the value of the first item that is not missing (not null). Can be provided any number of arguments. Any argument may also be a numeric or string literal, which will be returned if all the previous items have missing values.
      greatest(expression [, expression ...]) Returns the greatest (highest) value of the expressions given. Can be provided any number of arguments.
      least(expression [, expression ...]) Returns the least (lowest) value of the expressions given. Can be provided any number of arguments.
      log(expression [, base ]) Returns the natural logarithm (base e) of the numeric expression. If an integer is given as a second argument, returns the logarithm using that base.
      log10(expression) Returns the common logarithm (base 10) of the numeric expression.
      normDistCum(x [,mean [,stddev]]) Returns the cumulative distribution function (CDF) value for x given the normalized distribution described by the mean and stddev. Equivalent to Excel NORM.DIST(x,mean,stddev,TRUE) or LibreOffice NORMDIST(x,mean,stddev,1). If stddev is not given, it is computed from past sampled values of x. If neither mean nor stddev are given, they are computed from past sampled valeus of x. See examples.
      normDistDen(x [,mean [,stddev]]) Returns the probability density function (PDF) value for x given the normalized distribution described by the mean and stddev. Equivalent to Excel NORM.DIST(x,mean,stddev,FALSE) or LibreOffice NORMDIST(x,mean,stddev,0). If stddev is not given, it is computed from past sampled values of x. If neither mean nor stddev are given, they are computed from past sampled valeus of x. See examples.
      null Returns no result. For example, if( #{FH8ab5Rog83}<0, null, 1 ) returns nothing if the data element value is less than 0, otherwise 1.
      orgUnit.ancestor(orgUnitUid [, orgUnitUid ...]) Returns true if the organisation unit is a descendant of any of the (1 or more) organisation units, otherwise false.
      orgUnit.dataSet(dataSetUid [, dataSetUid ...]) Returns true if the organisation unit is assigned to any of the (1 or more) data sets, otherwise false.
      orgUnit.group(ouGroupUid [, ouGroupUid ...]) Returns true if the organisation unit is a member of any of the (1 or more) organisation unit groups, otherwise false.
      orgUnit.program(programUid [, programUid ...]) Returns true if the organisation unit is assigned to any of the (1 or more) programs, otherwise false.
      removeZeros(expression) Returns nothing if the expression value is 0, otherwise returns the expression value.
      .maxDate(yyyy-mm-dd) For a data element (not program data), value from periods ending on or before a maximum date.
      .minDate(yyyy-mm-dd) For a data element (not program data), value from periods starting on or after a minimum date.

      Boolean expression notes: A boolean expression must evaluate to true or false. The following operators may be used to compare two values resulting in a boolean expression: \<, >, !=, ==, >=, and \<=. The following operators may be used to combine two boolean expressions: && or the keyword and (logical and), and || or the keyword or (logical or). The unary operator ! or the keyword not may be used to negate a boolean expression.

      Generator expression examples:

      Generator expression Means
      sum(#{FTRrcoaog83.tMwM3ZBd7BN}) Sum of the sampled values of data element FTRrcoaog83 and category option combination (disaggregation) tMwM3ZBd7BN
      avg(I{GSae40Fyppf}) + 2 * stddevSamp(I{GSae40Fyppf}) Average of the sampled values of of program indicator GSae40Fyppf plus twice its sample standard deviation
      sum(D{IpHINAT79UW.eMyVanycQSC}) / sum([days]) Sum of all sampled values of data element eMyVanycQSC from porgram IpHINAT79UW divided by the number of days in all sample periods (resulting in the overall average daily value)
      sum(#{FTRrcoaog83}) + #{T7OyqQpUpNd} Sum of all sampled values of data element FTRrcoaog83 plus the value of data element T7OyqQpUpNd in the period being predicted for (includes all disaggregations)
      1.2 * A{IpHINAT79UW.RKLKz1H20EE} 1.2 times the value of attribute RKLKz1H20EE of program IpHINAT79UW, in the period being predicted for
      if(isNull(#{T7OyqQpUpNd}), 0, 1) If the data element T7OyqQpUpNd is null in the period being predicted, then 0, otherwise 1
      if(is(#{jeiTh8ahyae} in 'NEGATIVE','UNKNOWN'), 0, 1) If the data element jeiTh8ahyae has value 'NEGATIVE' or 'UNKNOWN' then 0, otherwise 1
      percentileCont(0.5, #{T7OyqQpUpNd}) Continuous 50th percentile of the sampled values for data element T7OyqQpUpNd. Note that this is the same as median(#{T7OyqQpUpNd})
      if(count(#{T7OyqQpUpNd}) == 1, 0, stddevSamp(#{T7OyqQpUpNd})) If there is one sample value present for data element T7OyqQpUpNd, then 0, otherwise the sample standard deviation of these sample values. (Note that if no samples are present then the stddevSamp returns no value, so no value is predicted.)
      normDistCum(#{T7OyqQpUpNd}) The cumulative distribution function for the current period value of data element T7OyqQpUpNd based on the normalized distribution defined by the mean and standard deviation of past sampled periods of data element T7OyqQpUpNd
      normDistCum( #{T7OyqQpUpNd}, median(#{T7OyqQpUpNd}) ) The cumulative distribution function for the current period value of data element T7OyqQpUpNd based on the distribution defined by the median (instead of the mean) and standard deviation of past sampled periods of data element T7OyqQpUpNd
      normDistCum( #{T7OyqQpUpNd}, median(#{T7OyqQpUpNd}) ) The cumulative distribution function for the current period value of data element T7OyqQpUpNd based on the distribution defined by the median (instead of the mean) and standard deviation of past sampled periods of data element T7OyqQpUpNd
      normDistCum( #{T7OyqQpUpNd}, avg(#{T7OyqQpUpNd}), stddev(#{T7OyqQpUpNd}) ) Same as normDistCum( #{T7OyqQpUpNd} )
      normDistDen( #{T7OyqQpUpNd}, avg(#{IKahz1Quie3}), stddev(#{IKahz1Quie3}) ) The probability density function for the current period value of data element T7OyqQpUpNd based on the distribution defined by the mean and standard deviation of past sampled periods of the different data element IKahz1Quie3
      normDistDen( median(#{T7OyqQpUpNd}), avg(#{IKahz1Quie3}), stddev(#{IKahz1Quie3}) ) The probability density function for the median of past sampled values of data element T7OyqQpUpNd based on the distribution defined by the mean and standard deviation of past sampled periods of the different data element IKahz1Quie3
      #{T7OyqQpUpNd}.minDate(2022-10-1) Value on or after 1-Oct-2022
      #{T7OyqQpUpNd}.maxDate(2022-12-31) Value on or before 31-Dec-2022
      #{T7OyqQpUpNd}.minDate(2022-10-1).maxDate(2022-12-31) Value bewteen 1-Oct-2022 and 31-Dec-2022
  12. (Optional) Create a Sample skip test. The sample skip test tells 从样本中排除哪个先前时段(如果有)。

    1. Type a Description of the skip test.

    2. 输入样本跳过测试表达式。您可以建立 通过选择用于聚合数据的数据元素来表达,或 项目数据元素,属性或指标。组织 尚不支持单位计数。与发电机一样 功能,您可以单击(或键入)以下任何元素 表达式字段:() * / +-天。

      The non-aggregating functions described above for generator expressions may also be used 在跳过测试中。

      该表达式的计算结果必须为布尔值** true 或 **false. See Boolean expression notes above.

      跳过测试表达式示例:

      Skip test expression Means
      #{FTRrcoaog83} > #{M62VHgYT2n0} The value of data element FTRrcoaog83 (sum of all disaggregations) is greater than the value of data element M62VHgYT2n0 (sum of all disaggregations)
      #{uF1DLnZNlWe} > 0 The value of data element uF1DLnZNlWe (sum of all disaggregations) is greater than the zero
      #{FTRrcoaog83} > #{M62VHgYT2n0} || #{uF1DLnZNlWe} > 0 The value of data element FTRrcoaog83 (sum of all disaggregations) is greater than the value of data element M62VHgYT2n0 (sum of all disaggregations) or the value of data element uF1DLnZNlWe (sum of all disaggregations) is greater than the zero
  13. Enter a Sequential sample count value.

    这是计算应该进行多少个连续周期 及时返回样本数据进行计算。

  14. Enter an Annual sample count value.

    这是计算应该追溯到多少年 用于计算的样本数据。

  15. (Optional) Enter a Sequential skip count value.

    这是紧接在 采样值之前,应跳过预测值周期。

  16. 点击**保存**。

Predictions by Data Element Group

You can use a single predictor to operate on all the data elements in a group instead of a different predictor for each data element. This can be used, for example, in logistics management when a data element is used for each commodity and a category option combination is used for each count related to that commodity.

The syntax is:

forEach ?de in :DEG:degUid --> main expression

where:

part 自定义查询。
forEach required keyword at the start of the expression
?de any variable name starting with '?', then one letter, then optionally any number of additional letters or digits (case sensitive). Examples: ?de, ?X, ?dataElement, etc.
描述 required keyword
:DEG:degUid the notation :DEG: followed by the UID of the data element group containing the data elements to be processed
-> required before the main expression
main expression the expression to operate on each data element in the group. Within this expression use the variable name (such as ?de) as a placeholder for each data element

The predictor will execute once for each data element in the data element group. For each data element, instances of the variable in the main expression are replaced by that data element. The same data element is also used as the predictor output data element. The predicted value will be written to that data element using the configured output category option combination.

The predictor must be configured with an output data element, but it is effectively ignored when the predictor is run. It is suggested that you configure the predictor with one of the data elements in the data element group that the predictor will use. That way you can select a valid output category option combination for that data element.

At the time the predictor is created, the data element group must contain at least one data element of the type that you will use. (The data type of the data element is used during syntax checking of the predictor.)

Example 1

You have data elements that represent various commodities, all belonging to a data element group with UID aIMu0nieph7.

You have category option combinations with the following UIDs:

category option combo 自定义查询。
Gvoecom5muL Stock balance at start of period
CWa6eew5uco Restock during period
nthohhie8Ba Used during period
Faey8Iphooy Lost, damaged, expired, or stolen during period

The following predictor generator expression will compute the stock balance at the beginning of the next period as ( starting balance + restock - used - lost ):

forEach ?de in :DEG:aIMu0nieph7 -->
sum( #{?de.Gvoecom5muL} + #{?de.CWa6eew5uco} - #{?de.nthohhie8Ba} - #{?de.Faey8Iphooy} )

The predictor configuration includes:

MCC 日期时间
Output data element one of the data elements in the group
Output category option combo Stock balance at start of period (Gvoecom5muL)
Organisation units providing data At selected level(s) only
顺序样本计数 1
年度样本数 0

The predictor will execute once for each data element in the data element group. Because the aggregation function sum() is used in the predictor generator expression, all the values in the expression will be fetched from the previous period (since the sequential sample count is 1). The predictor will write out the starting balance for each data element for the periods within the predictor run start and end date, for organisation units at the selected level(s).

Predictions are always made forward through time. The starting balance predicted for one period can be used as an input to compute the starting balance of the following period.

Example 2

If you want to make predictions for the same period as the input data, just omit the aggregation function such as sum(). Adding to the previous example, say you have another category option combination that computes the net inventory change during the period:

category option combo 自定义查询。
Hpiek8IefoS Stock change during the period

You can use the following expression to compute the inventory change as ( restock - used - lost ):

forEach ?de in :DEG:aIMu0nieph7 -->
#{?de.CWa6eew5uco} - #{?de.nthohhie8Ba} - #{?de.Faey8Iphooy}

The output category option combo is:

MCC 日期时间
Output category option combo Stock change during the period (Hpiek8IefoS)

Since there is no aggregation function such as sum() around the expression elements, the input data is taken from the same period as the predictor output.

创建或编辑预测变量组

  1. 打开** Maintenance 应用项目,然后单击 Other ** > ** Predictor 组**。

  2. 点击添加按钮。

  3. Type a Name. This field needs to be unique.

  4. (Optional) In the Code field, assign a code. This field needs to 独一无二。

  5. (可选)输入**说明**。

  6. Double-click the Predictors you want to assign to the group.

  7. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理推送报告

关于推送报告

推送报告使您可以提高对数据分析的认识和使用 通过将带有图表,表格和地图的报告直接发送到用户电子邮件 地址。

  • 推送报告从现有仪表板获取其内容。

  • 推送报告以与 仪表板。

  • 推送报告只能包含带有图表,地图或 表。

  • You create the push report and its schedule in the Maintenance 应用项目。

  • 您在上设置的**标题**和**消息**参数 每个报告中都包含** Maintenance **应用项目。 **名字**你 给出报告不包括在报告中。取而代之的是 用于识别系统中的推送分析对象。这样一来 报告可以命名为一件事,报告的标题可以为 另一个。

  • 当您运行推送报告作业时,系统会编译以下列表: 您选择的用户组中的收件人。然后系统 为所选用户组的每个成员生成报告。每 仪表板项目中的一个是专门为每个用户生成的。 这意味着报告中包含的数据反映了该数据 用户有权访问。因此,所有用户都可以得到相同的 报告(如果所有数据均为“静态”)或自定义报告(如果所有 数据是“动态的”),或两者结合。

  • 推送报告通过电子邮件而不是通过电子邮件发送给收件人 内部DHIS2消息传递系统。如果用户没有有效的 电子邮件,或者如果作业失败,则不会发送电子邮件。在这种情况下, 问题记录在服务器上。

注意

推送报告中生成的数据是公开的,因此请确认您 不要包含任何敏感数据。

在**维护**应用项目中,您可以管理以下推送报告 对象:

表格维护应用项目中的推送报告对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
Push analysis Create, edit, clone, delete, show details, translate, preview and run

创建或编辑推送报告

  1. 打开** Maintenance 应用项目,然后单击 Other ** > ** Push 分析**。

  2. 点击添加按钮。

  3. 在**名称** 字段中,输入计划报告的名称。

    此名称不包括在报告电子邮件中。取而代之的是 用于识别系统中的推送分析对象。

  4. (可选)在 Code 字段中,分配一个代码。

  5. 添加报告**标题**。

    该标题包含在报告电子邮件中。

  6. (可选)添加**消息**。

    此消息包含在报告电子邮件中。

  7. 选择一个 仪表板 作为报告的基础。

  8. 选择并分配您要向其发送报告的用户组。

  9. Select a Scheduling frequency: Daily, Weekly or 每月

    Note

    If you schedule a push report to "Monthly" and "31", the scheduled report job will not run if the month has less than 31 days.

  10. (可选)选择**启用**以激活推送报告作业。

    作业只有激活后才能运行。

  11. 点击**保存**。

预览推送报告

  1. 打开** Maintenance 应用项目,然后单击 Other ** > ** Push 分析**。

  2. 在推送报告列表中,找到要预览的推送报告。

  3. 单击选项菜单并选择**预览**。

    推送报告的预览在新窗口中打开。

运行推送报告作业

  1. 打开** Maintenance 应用项目,然后单击 Other ** > ** Push 分析**。

  2. 在推送报告列表中,找到要运行的推送报告。

  3. 单击选项菜单并选择 立即运行

    推送报告作业立即运行。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

管理外部地图图层

关于外部地图图层

You can customize GIS by including map layers from various sources and combine them with your own data in DHIS2. DHIS2 supports these common map service formats: Web Map Service (WMS), Tile Map Service (TMS), XYZ tiles and Vector tiles (Vector Style).

创建或编辑外部地图图层

注意

DHIS2仅支持Web Mercator投影 ([[EPSG:3857](https://epsg.io/3857)),因此请确保 服务支持此预测。

表:维护应用项目中的外部地图图层对象

CSV元数据导入 { #webapi_csv_metadata_import } Available functions
External map layer Create, edit, clone, delete, show details and translate
  1. 打开** Maintenance 应用项目,然后单击 Other ** > 外部地图 层

  2. 点击添加按钮。

  3. In the Name field, type a name that describes the content of the 外部地图图层。

    这是您将在 Maps 应用项目中看到的名称。

  4. (可选)在 Code 字段中,分配一个代码。

  5. 选择 地图服务 格式。

    DHIS2 supports four common map service formats:

    • 网络地图服务(WMS)

      图片格式:PNG格式允许图层透明, JPG格式可提供更好的压缩效果,并且通常更快 加载。

      图层:WMS可以包含多个单独的图层,您可以 可以指定要包含的内容(以逗号分隔)。参考 WMS GetCapabilities文档以查看可用图层。

    • 平铺地图服务(TMS)

    • XYZ磁贴(也可用于WMTS)

    • Vector tiles (Vector Style)

    When Vector Style is chosen, you can then add a value for "Before layer id". It indicates the layer id in the Vector tile (layer) stack at which the user's layers (such as Thematic, Events) will be inserted. If this value isn't set, then the user's layers will be placed on top of the layers in the Vector Style. The map service URL should be to a JSON document that follows the Mapbox GL Style Spec.

  6. 输入地图服务的**URL**。

    Note

    XYZ and TMS URLs must contain placeholders {}, for example: http://{s}.tile.osm.org/{z}/{x}/{y}.png.

  7. (Optional) Enter Source of the map layers. The field can contain HTML标记(如果要链接到源)。

    使用外部地图服务时,突出显示 数据来自哪里。

  8. 选择一个**放置**:

    • 底部-底图:对于“地图”应用,这将使外部地图图层 selectable as the basemap (i.e. as an alternative to the DHIS2 basemaps).

    • 顶部-重叠:对于“地图”应用,这允许外部地图 从“添加图层”选择中添加并放置在上方的任何位置 the basemap.

    Note that Vector Style layers can only be added as a basemap.

  9. (可选)添加图例。

    您可以通过两种方式添加图例:

    • 选择预定义的**图例**以描述地图的颜色 层。

      Tip

      Click Add new to create legends that you're missing. In the form that opens, create the legends you need. When you're done, click Refresh values.

    • 在**传奇图像中输入指向外部图像图例的链接 网址**。

      这些通常是为WMS提供的。请参阅WMS中的LegendURL下 GetCapabilites文档。

  10. 点击**保存**。

Clone metadata objects

克隆数据元素或其他对象可以在创建时节省时间 许多相似的对象。

  1. 打开**维护**应用项目,找到元数据对象类型 你想克隆。

  2. 在对象列表中,单击选项菜单并选择**克隆**。

  3. 修改所需的选项。

  4. 点击**保存**。

删除元数据对象

注意

您只能在以下情况下删除数据元素和其他数据元素对象: 没有数据与数据元素本身关联。

警告

从系统删除的所有数据集都将不可避免地丢失。所有 数据输入表格,以及可能已经制定的部分表格 也将被删除。确保您已经备份了您的 数据库,然后删除任何数据集,以防您需要还原它 在某个时间点。

  1. 打开**维护**应用项目,找到元数据对象类型 您要删除。

  2. 在对象列表中,单击选项菜单并选择**删除**。

  3. 点击**确认**。

显示元数据对象的详细信息

  1. 打开**维护**应用项目,找到元数据对象类型 您想查看。

  2. In the object list, click the options menu and select Show 细节

翻译元数据对象

DHIS2提供了用于翻译数据库内容的功能, 示例数据元素,数据元素组,指标,指标组 或组织单位。您可以将这些元素转换为任意数量的 语言环境。地区代表特定的地理,政治或 文化区。

提示

要激活翻译,请打开 System Settings 应用项目,单击 > **外观**并选择一种语言。

  1. 打开**维护**应用项目,找到元数据对象类型 您要翻译。

  2. 在对象列表中,单击选项菜单并选择**翻译**。

    Tip

    If you want to translate an organisation unit level, click directly on the Translate icon next to each list item.

  3. 选择一个语言环境。

  4. 输入**名称**、简称**和**说明

  5. 点击**保存**。

Manage SQL views

DHIS2的SQL View功能将存储SQL视图定义 内部,然后在需要时实例化视图。

数据库管理员在创建数据库视图时必须小心 直接在DHIS2数据库中。例如,当资源表 生成,所有这些都将首先被删除然后重新创建。如果 任何SQL视图都依赖于这些表,完整性违规异常 将被抛出并且该过程将被中止。

SQL视图基于它们的反向字母顺序删除 DHIS2中的名称,并按常规字母顺序创建。这允许 您要在SQL视图之间具有依赖关系,因为视图仅取决于 其他按字母顺序排列的观点。对于 例如,“ ViewB”可以安全地依赖于“ ViewA”。否则,有意见 取决于其他视图会导致完整性违规错误。

创建一个新的SQL视图

要创建新的SQL视图,请点击** Apps ** > ** Maintenance ** > 其他 > ** SQL View ,然后单击添加 + **按钮。

The "Name" attribute of the SQL view will be used to determine the name of the table that DHIS2 will create when the view is materialized by the user. The "Description" attribute allows one to provide some descriptive text about what the SQL view actually does.

The "SQL type" attribute allows the creation of three kinds of views: - A "View" is stored in the database and regenerated when queried - A "Materialized View" is stored in the database and its results are cached in the database - A "Query" is not stored in the database

Finally, the "SQL query" should contain the SQL view definition.

Only SQL "SELECT" statements are allowed and certain sensitive tables (i.e., user information) are not accessible.

Press "Save" to store the SQL view definition. If you created a "View" or a "Materialized View", you must also "Execute query" to finish the creation of the SQL view.

Keep in mind that the the columns returned by the used SELECT statement become table columns, that means they must be of a valid table column type. When functions are used it might be necessary to explicitly cast the result to a type by adding ::{TYPE} after the function.

For example, instead of jsonb_each (which would return a record type that cannot be a column type) use jsonb_each_text and cast the result to text, like in the below sample:

select jsonb_each_text(eventdatavalues)::text from ...

SQL views that call other SQL views

If you wish to make a SQL view that can be called be other SQL views, then its SQL type must be either "View" or a "Materialized View" (not "Query"). It also must have Execute query run on it before being called.

For instance, if you created a view named Data element count with SQL type "View" and this SQL:

select count(*) as count from dataelement;

...then you could run Execute query from the context menu and create a second SQL view named More than 100 data elements with this SQL:

select case when count > 100 then 1 else 0 end as result from _view_data_element_count;

SQL视图管理

为了利用SQL视图,只需点击视图,然后从 在上下文菜单中,选择“执行查询”。该过程完成后,您将 系统将通知您已创建一个表。表格名称 将由“描述”属性提供 在SQL视图定义中提供。生成视图后, 您可以通过再次单击视图并选择“显示SQL 视图”。

提示

如果您有一个依赖于其他视图的视图,则应 注意视图的命名方式。当在 DHIS2服务器,必须删除所有视图,然后重新创建。什么时候 分析开始,按字母顺序删除视图,然后 然后以相反的字母顺序重新创建。因此,如果视图A取决于 在视图B上,它必须按字母顺序显示在视图B之前。如果它 会按字母顺序在视图B之后出现,分析可能会失败,因为 带有依存关系的视图将不会以正确的顺序删除。

Manage analytics table hooks

The Analytics Table Hooks functionality of DHIS2 stores SQL code that is run during different phases of the analytics table generation process.

See also /api/analyticsTableHooks in the Developer documentation.

Creating a new analytics table hook

要创建新的分析表钩子,请单击 Apps (应用项目)> Maintenance (维护 > Other > Analytics table hooks,然后单击 Add + 按钮。

Press "Save" to store the analytics table hook.

管理语言环境

可以在DHIS2中创建自定义语言环境。除了 系统提供的语言环境,您可能需要添加自定义 系统的语言环境(例如“英语”和“赞比亚”)。这将允许 您可以将元数据对象翻译成本地语言,或解决 使用共同元数据的国家之间的细微差异 定义。

语言环境由语言和国家/地区组成。选择 所需的值,然后按“添加”。此自定义语言环境现已可用 作为系统中的翻译语言环境之一。

一次编辑多个对象组

**维护**应用项目中的**元数据组编辑器**可让您 同时编辑多个对象组。您可以编辑以下内容 对象类型:

Object types in the Metadata group editor
CSV元数据导入 { #webapi_csv_metadata_import } Available functions
Send PUT request to api/dataElements/{dataElementUID} with full object payload as below:
Category option group
描述 Add one data element to multiple data element groups

Remove one data element from multiple data element groups
dx尺寸 { #webapi_analytics_dx_dimension } Add multiple data elements to one data element group

Remove multiple data elements from one data element group
对于组织单位维度,您可以指定组织 Add one indicator to multiple indicator groups

Remove one indicator from multiple indicator groups
Other translatable Properties Add multiple indicators to one indicator group

Remove multiple indicators from one indicator group

编辑对象组中的多个对象

  1. 打开 维护 应用项目并单击 元数据组编辑器

  2. 单击**管理组中的项目**。

  3. Select an object group type, for example Indicator groups.

  4. 选择一个对象组,例如** HIV **。

  5. 在左侧列表中,选择要添加到对象中的对象。 对象组,然后单击向右箭头。

  6. 在右侧列表中,选择要从中删除的对象 对象组,然后单击左箭头。

编辑多个对象组中的一个对象

  1. 打开 维护 应用项目并单击 元数据组编辑器

  2. 单击**管理组条目**。

  3. 选择一个对象类型,例如**指标**。

  4. 选择一个对象,例如 ANC LLITN 覆盖范围

  5. 在左侧列表中,选择要添加的对象组 对象,然后单击向右箭头。

  6. 在右侧列表中,选择您想要的对象组 从中删除对象,然后单击左箭头。