From 8893d24126ad50ba9edc7302c08c1ef571b6d651 Mon Sep 17 00:00:00 2001 From: Aravind Mahadevan Date: Thu, 13 Aug 2026 10:20:48 +0530 Subject: [PATCH 1/2] Add Definition and Terminology docs for 3.1 Publish the Questionnaire, Questionnaire Response Template, Valueset, Observation Definition, Specimen Definition, Activity Definition and Charge Item Definition modules from the care_docs sources. Refreshes the seven definition concepts and adds twenty-two flows under a new Definitions category in the 3.1 flows sidebar. --- .../definitions/activity-definition.mdx | 83 ++++++------- .../definitions/charge-item-definition.mdx | 89 ++++++-------- .../definitions/observation-definition.mdx | 99 +++++++++------- .../questionnaire-response-template.mdx | 67 ++++------- .../concepts/definitions/questionnaire.mdx | 96 +++++++-------- .../definitions/specimen-definition.mdx | 77 ++++-------- .../concepts/definitions/valueset.mdx | 73 ++++++------ .../flows/definitions/_category_.json | 5 + .../activity-definition/_category_.json | 5 + .../create-activity-definition.mdx | 87 ++++++++++++++ ...nk-requirements-to-activity-definition.mdx | 76 ++++++++++++ .../update-or-retire-activity-definition.mdx | 65 ++++++++++ ...activity-definition-to-order-a-service.mdx | 70 +++++++++++ .../charge-item-definition/_category_.json | 5 + .../create-charge-item-definition.mdx | 81 +++++++++++++ ...pdate-or-retire-charge-item-definition.mdx | 77 ++++++++++++ .../observation-definition/_category_.json | 5 + .../create-observation-definition.mdx | 82 +++++++++++++ .../set-up-qualified-ranges.mdx | 76 ++++++++++++ ...pdate-or-retire-observation-definition.mdx | 66 +++++++++++ .../_category_.json | 5 + .../apply-response-template.mdx | 61 ++++++++++ .../create-response-template.mdx | 72 +++++++++++ .../update-or-delete-response-template.mdx | 76 ++++++++++++ .../definitions/questionnaire/_category_.json | 5 + .../questionnaire/add-and-edit-questions.mdx | 112 ++++++++++++++++++ .../questionnaire/clone-questionnaire.mdx | 63 ++++++++++ .../questionnaire/create-questionnaire.mdx | 94 +++++++++++++++ .../manage-questionnaire-organizations.mdx | 72 +++++++++++ .../specimen-definition/_category_.json | 5 + .../create-specimen-definition.mdx | 96 +++++++++++++++ .../update-or-retire-specimen-definition.mdx | 68 +++++++++++ .../definitions/valueset/_category_.json | 5 + .../build-include-and-exclude-rules.mdx | 77 ++++++++++++ .../definitions/valueset/create-valueset.mdx | 76 ++++++++++++ .../definitions/valueset/preview-valueset.mdx | 55 +++++++++ .../valueset/update-or-retire-valueset.mdx | 73 ++++++++++++ versioned_sidebars/version-3.1-sidebars.json | 78 ++++++++++++ 38 files changed, 2046 insertions(+), 331 deletions(-) create mode 100644 versioned_docs/version-3.1/flows/definitions/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/activity-definition/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/activity-definition/create-activity-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/activity-definition/link-requirements-to-activity-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/activity-definition/update-or-retire-activity-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/activity-definition/use-activity-definition-to-order-a-service.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/charge-item-definition/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/charge-item-definition/create-charge-item-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/charge-item-definition/update-or-retire-charge-item-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/observation-definition/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/observation-definition/create-observation-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/observation-definition/set-up-qualified-ranges.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/observation-definition/update-or-retire-observation-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/apply-response-template.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/create-response-template.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/update-or-delete-response-template.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire/add-and-edit-questions.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire/clone-questionnaire.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire/create-questionnaire.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/questionnaire/manage-questionnaire-organizations.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/specimen-definition/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/specimen-definition/create-specimen-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/specimen-definition/update-or-retire-specimen-definition.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/valueset/_category_.json create mode 100644 versioned_docs/version-3.1/flows/definitions/valueset/build-include-and-exclude-rules.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/valueset/create-valueset.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/valueset/preview-valueset.mdx create mode 100644 versioned_docs/version-3.1/flows/definitions/valueset/update-or-retire-valueset.mdx diff --git a/versioned_docs/version-3.1/concepts/definitions/activity-definition.mdx b/versioned_docs/version-3.1/concepts/definitions/activity-definition.mdx index 4509ece9..085aeb3e 100644 --- a/versioned_docs/version-3.1/concepts/definitions/activity-definition.mdx +++ b/versioned_docs/version-3.1/concepts/definitions/activity-definition.mdx @@ -4,64 +4,55 @@ sidebar_position: 6 # Activity Definition -An **activity definition** is a reusable, facility-scoped template for a clinical activity — a lab test, an imaging study, a counselling session — holding every default needed to order it. A facility defines the activity once, then turns it into a real order for a specific patient with a single "apply" action. +## Definition -## What it represents +An **[activity definition](https://build.fhir.org/activitydefinition.html)** in Care is a reusable template for a service, a procedure, or a test that clinicians order. A common example is a "CBC Test". The template holds the details that a clinician otherwise types each time. When a clinician orders from the template, Care creates a [Service Request](../../concepts/clinical/service-request.mdx). -In Care's FHIR-aligned model, an activity definition maps to the **ActivityDefinition** resource: a reusable description of an action to perform, defined independently of any patient. +## Key Attributes -The key distinction is that an activity definition is a blueprint, not a record of anything that happened. It carries the defaults — the procedure code, the specimens to collect, the observations to result, the locations and charges — but no patient. It belongs to a facility's catalog of services; the actual work for a patient lives in the [service request](../clinical/service-request.mdx) it generates. Define "Complete Blood Count" once and apply it to twenty patients, and you get twenty separate orders, all sharing the same template. - -## Classification - -Every activity definition carries one classification describing the nature of the work: - -| Classification | Typical use | +| Components | What it captures | | --- | --- | -| `laboratory` | Blood panels, cultures, and other lab investigations | -| `imaging` | X-ray, ultrasound, CT, and similar studies | -| `counselling` | Structured counselling or advisory sessions | -| `surgical_procedure` | Operative and bedside procedures | -| `education` | Patient education and instruction activities | - -## How it connects +| Title | The name of the template that staff see when they order the service. Required. | +| Status | The stage of the template in its lifecycle. Required. | +| Category | The type of the service: Laboratory, Imaging, Surgical Procedure, Counselling, or Education. Required. | +| Kind | The type of order that Care creates from the template. Required. The value is always "Service Request". | +| Code | The standard medical code for the service or the procedure. Required. | +| Body Site | The part of the body for the service or the procedure. Optional. | +| Resource Category | The catalogue category of your facility that holds this template. Required. | +| Healthcare Service | The healthcare service that provides this activity. Optional. | +| Locations | The locations where staff can do this activity. Optional. | +| Diagnostic Report Codes | The codes for the diagnostic reports that come from this activity. Optional. | +| Requirements | The Specimen Definitions, the Observation Definitions, and the Charge Item Definitions that this template needs. | -An activity definition is the assembly point that wires a facility's reusable pieces together, so a single order carries everything it needs without anyone reassembling it by hand: +### Category and Resource Category -- **What to collect and measure** — [specimen definitions](../definitions/specimen-definition.mdx) and [observation definitions](../definitions/observation-definition.mdx) -- **Where it happens** — the [locations](../facility/location.mdx) and [healthcare service](../facility/healthcare-service.mdx) the activity runs under -- **What it costs** — [charge item definitions](../definitions/charge-item-definition.mdx), so applying the activity can raise the right billing lines automatically +Category and Resource Category are two different fields on the same form. -Patient and encounter are supplied at apply time, never stored on the template. The definition is applied against an [encounter](../clinical/encounter.mdx), which binds the result to a specific patient. Applying merges the stored defaults with that encounter context to produce a draft service request — plus a charge item for each linked charge, tied back to the same request. +- **Category** holds the type of the service. Care gives you a fixed list of choices: Laboratory, Imaging, Surgical Procedure, Counselling, and Education. Care copies this value to the service request when a clinician orders the service. +- **Resource Category** holds the catalogue category of your facility. Your facility makes these categories and names them, for example "Blood Tests". -## Lifecycle +The Activity Definitions page shows the Resource Categories first. Open a Resource Category to see the templates in it. -```text -draft → active → retired -``` +### Requirements -- **draft** — being authored, not yet ready for routine use -- **active** — published and available to apply to encounters -- **retired** — withdrawn from use but kept for history and reference +Requirements connect a template to the items that the service needs. Add a Specimen Definition for each sample that staff collect. Add an Observation Definition for each result that staff record. Add a Charge Item Definition for each charge that applies to the service. -A separate `unknown` status covers definitions whose state cannot be determined. Activity definitions are also versioned: editing a definition appends a new version to a chain rather than overwriting it, with one marked as the latest. Older order templates stay referenceable even after the catalog moves on. +### Status -## Permissions - -Access is governed at the facility level — whether a role can author the catalog or only read from it and apply. - -| Permission | Description | System Roles | -| --- | --- | --- | -| `can_write_activity_definition` | Create and edit activity definitions on a facility | Facility Admin, Admin | -| `can_read_activity_definition` | List and view activity definitions on a facility | Facility Admin, Administrator, Admin, Staff, Doctor, Nurse, Volunteer | - -Roles are granted through a user's organization and facility memberships, and cascade down the organization tree — a role held higher up applies to the facilities and resources beneath it. +| Status | Description | +| --- | --- | +| Draft | The template is in preparation. Staff cannot use it to order a service. | +| Active | The template is ready. Staff can use it to order a service. | +| Retired | The template is no longer in use. | +| Unknown | The stage of the template is not known. | ## Related -- Reference: [Activity Definition (technical)](../../references/definitions/activity-definition.mdx) -- Concept: [Service Request](../clinical/service-request.mdx) -- Concept: [Specimen Definition](../definitions/specimen-definition.mdx) -- Concept: [Observation Definition](../definitions/observation-definition.mdx) -- Concept: [Charge Item Definition](../definitions/charge-item-definition.mdx) -- Concept: [Encounter](../clinical/encounter.mdx) +- Flow: [Create an activity definition](../../flows/definitions/activity-definition/create-activity-definition.mdx) +- Flow: [Link requirements to an activity definition](../../flows/definitions/activity-definition/link-requirements-to-activity-definition.mdx) +- Flow: [Update or retire an activity definition](../../flows/definitions/activity-definition/update-or-retire-activity-definition.mdx) +- Flow: [Use an activity definition to order a service](../../flows/definitions/activity-definition/use-activity-definition-to-order-a-service.mdx) +- Concept: [Specimen Definition](../../concepts/definitions/specimen-definition.mdx) +- Concept: [Observation Definition](../../concepts/definitions/observation-definition.mdx) +- Concept: [Charge Item Definition](../../concepts/definitions/charge-item-definition.mdx) +- Concept: [Service Request](../../concepts/clinical/service-request.mdx) diff --git a/versioned_docs/version-3.1/concepts/definitions/charge-item-definition.mdx b/versioned_docs/version-3.1/concepts/definitions/charge-item-definition.mdx index b00b6525..72e21bcc 100644 --- a/versioned_docs/version-3.1/concepts/definitions/charge-item-definition.mdx +++ b/versioned_docs/version-3.1/concepts/definitions/charge-item-definition.mdx @@ -4,72 +4,49 @@ sidebar_position: 7 # Charge Item Definition -A **charge item definition** is the reusable price list entry that answers one question: "how much does this billable thing cost?" It is the template a facility maintains so that, whenever a service is delivered, the system already knows the base rate, the surcharges, the discounts, and the taxes to apply. +## Definition -## What it represents +A **[charge item definition](https://build.fhir.org/chargeitemdefinition.html)** in Care is a reusable pricing template. It holds the price, the taxes, and the discounts for one billable service or item in your facility. When you apply a charge item definition, Care creates an actual billable [Charge Item](../../concepts/billing/charge-item.mdx). -In Care's FHIR-aligned model, a charge item definition maps to the **ChargeItemDefinition** resource. It holds: +## Key Attributes -- **Identity** — a title, a facility-scoped slug used to look it up, and a version number -- **Pricing** — a stack of price components: a base rate plus any surcharges, discounts, taxes, and informational lines -- **Rules** — how discounts are applied, and whether a charge raised from it can still be edited afterwards -- **Classification** — an optional category and tags that organise the facility's catalogue - -The key distinction is that a charge item definition is the *template*, not the bill. It describes what something should cost in general; the actual money owed for a specific patient on a specific day lives on a [charge item](../billing/charge-item.mdx). Think of the definition as the menu price and the charge item as the line on the receipt. - -## Lifecycle - -A definition moves through a small set of states that control whether it can drive real billing. - -```text -draft → active → retired -``` - -- **draft** — being prepared or reviewed; excluded from live billing, so it never produces charges by accident -- **active** — in use; only active definitions should generate new charge items -- **retired** — withdrawn from the catalogue; kept for history and audit but excluded from new billing - -Definitions are versioned, so a price can be revised over time while older charges retain the rate that applied when they were raised. - -## Price components - -The cost is not a single number. Each definition holds a list of components that stack together to produce the final price: - -| Component | What it does | +| Components | What it captures | | --- | --- | -| Base | The starting rate. Exactly one per definition; it carries the core amount | -| Surcharge | An additional charge layered on top of the base | -| Discount | A reduction applied to the base | -| Tax | A tax line evaluated against the chargeable amount | -| Informational | A non-priced line shown for clarity, not added to the total | - -Components can carry billing codes and conditions, so a surcharge or discount can apply only when certain criteria are met. Discount behaviour (how many discounts may apply, and in what order) is configured separately on the definition. +| Title | The name of the pricing template. This field is required. | +| Slug | A short identifier that is unique in the facility. This field is required. | +| Category | The category that holds this definition. This field is required. | +| Status | The stage of the pricing template. Care sets Active by default. | +| Description | Extra detail about what the template covers. | +| Purpose | The reason to use this template. | +| Derived From URI | The address of the source that this template comes from. | +| Can Edit Charge Item | A checkbox that controls price changes after Care creates a charge item. | +| Base Price | The standard price for the service or item. This field is required. | +| MRP | The maximum retail price. | +| Purchase Price | The price that your facility pays for the item. | +| Taxes | One or more taxes that apply to the price. | +| Discounts | One or more discounts that apply to the price. | -## How it connects +### Can Edit Charge Item -A charge item definition sits at the start of the billing chain and is owned entirely by a facility: +This checkbox controls the price of every charge item that comes from this definition. If you clear the checkbox, the charge item keeps its original price. Care blocks each later attempt to change that price. -- **Facility** — every definition belongs to one [facility](../facility/facility.mdx). The same human-readable slug (for example `consultation-fee`) can exist in many facilities without clashing, because slugs are namespaced per facility -- **Charge item** — when a service is delivered, the definition is applied to create a [charge item](../billing/charge-item.mdx), copying its pricing into an actual chargeable line -- **Account & invoice** — those charge items later accumulate on an [account](../billing/account.mdx) and are collected onto an [invoice](../billing/invoice.mdx) for payment +### Discounts -This makes the definition the single place to update a price: change it once, and every future charge item picks up the new rate, while past bills stay untouched. +You can add more than one discount to a charge item definition. Each discount has its own conditions. The conditions decide when Care applies that discount. -## Permissions +### Status -Access to charge item definitions is governed at the facility level — who may read the price catalogue, and who may build or change it. - -| Permission | Description | System Roles | -| --- | --- | --- | -| `can_write_charge_item_definition` | Create a charge item definition for the facility, and update or configure an existing one (also gates tag changes on a definition) | Facility Admin, Admin | -| `can_read_charge_item_definition` | List and view the facility's charge item definitions and their pricing | Facility Admin, Administrator, Admin, Staff, Doctor, Nurse, Volunteer, Pharmacist | - -Roles are granted through facility and organization memberships rather than assigned per definition, and permissions cascade down the organization tree, so an administrator higher up inherits access to the facilities beneath them. +| Status | Description | +| --- | --- | +| Draft | The template is in preparation. | +| Active | The template is ready for use. | +| Retired | The template is out of use. | ## Related -- Reference: [Charge Item Definition (technical)](../../references/definitions/charge-item-definition.mdx) -- Concept: [Charge Item](../billing/charge-item.mdx) -- Concept: [Account](../billing/account.mdx) -- Concept: [Invoice](../billing/invoice.mdx) -- Concept: [Facility](../facility/facility.mdx) +- Flow: [Create a charge item definition](../../flows/definitions/charge-item-definition/create-charge-item-definition.mdx) +- Flow: [Update or retire a charge item definition](../../flows/definitions/charge-item-definition/update-or-retire-charge-item-definition.mdx) +- Concept: [Charge Item](../../concepts/billing/charge-item.mdx) +- Concept: [Account](../../concepts/billing/account.mdx) +- Concept: [Product](../../concepts/supply/product.mdx) +- Concept: [Activity Definition](../../concepts/definitions/activity-definition.mdx) diff --git a/versioned_docs/version-3.1/concepts/definitions/observation-definition.mdx b/versioned_docs/version-3.1/concepts/definitions/observation-definition.mdx index 14fdbc4e..fad45888 100644 --- a/versioned_docs/version-3.1/concepts/definitions/observation-definition.mdx +++ b/versioned_docs/version-3.1/concepts/definitions/observation-definition.mdx @@ -4,67 +4,82 @@ sidebar_position: 4 # Observation Definition -An **observation definition** is the master-data blueprint for a measurement — it describes *how* a particular observation, such as blood pressure or blood glucose, should be captured and interpreted. It is the reusable rulebook that keeps the same observation consistent every time it is recorded, no matter which form or facility collects it. +## Definition -## What it represents +An **[observation definition](https://build.fhir.org/observationdefinition.html)** in Care is a reusable template for one laboratory test or clinical test. The template records what the test measures and the type of value that a result holds. It also records the rules that Care uses to flag a result as normal or abnormal. Your facility creates each observation definition one time. Staff then use the template for every result of that test. -In Care's FHIR-aligned model, an observation definition maps to the **ObservationDefinition** resource. It captures: +## Key Attributes -- **What is measured** — the observation's clinical code (LOINC) and its category, such as vital signs, laboratory, or survey -- **How it is measured** — the permitted data type (number, text, choice, date, and so on), the unit of measurement, the collection method, and the body site -- **How to read the result** — reference ranges and interpretations that flag a value as normal, abnormal, or critical, optionally varying by patient condition -- **Multiple parts of one reading** — components, so a single definition like blood pressure can hold both systolic and diastolic values - -The key distinction is that a definition is a template, not a recorded result. It says "a temperature is a number in degrees Celsius that reads normal between these bounds" — the actual reading taken from a patient is an [Observation](../clinical/observation.mdx). Because the rules live in one place, the same observation is captured and interpreted identically everywhere it appears. One observation code can have several definitions, and each definition lives either at the instance level (shared across the deployment) or scoped to a single facility. +| Components | What it captures | +| --- | --- | +| Title | The name of the test that staff see in Care. This attribute is required. | +| Slug | A short unique name for the test. Care builds the slug from the title, and you can change it. This attribute is required. | +| Description | A short explanation of what the test measures. This attribute is required. | +| Status | The stage of the template, from first draft to retirement. This attribute is required. Care selects Active for a new template. | +| Category | The type of service that the test belongs to, such as Laboratory or Vital Signs. This attribute is required. | +| LOINC Code | The standard LOINC code of the test. This attribute is required. | +| Data Type | The kind of value that a result holds, for example a number or a yes or no answer. This attribute is required. | +| Unit | The unit of measure for the result, for example millimoles per litre. This attribute is optional. | +| Body Site | The part of the body that the test examines. This attribute is optional. | +| Method | The technique that staff use to do the test. This attribute is optional. | +| Components | The separate parts of a test that gives more than one value. This attribute is optional. | +| Observation Interpretation | The rules that Care uses to flag each result. This attribute is optional. | -## How it connects +### Category -Observation definitions are reference data that other primitives draw on rather than something attached directly to a patient: +An observation definition has one category. Care has these categories: -- **Questionnaires** point at observation definitions so that the questions clinicians fill in collect data in a consistent, coded shape. The definition is referenced, not copied into the form. -- **Observations** are produced from a definition for a specific encounter — Care can turn a definition into a blank observation, carrying over its code and category, ready to hold an actual value. -- **Value sets** back every coded field (code, unit, body site, method). The submitted code is checked against the bound [value set](../../references/definitions/valueset.mdx), which is what keeps the data translatable to FHIR. +- Social History +- Vital Signs +- Imaging +- Laboratory +- Procedure +- Survey +- Exam +- Therapy +- Activity -Because they are shared master data, a small library of well-defined observations is reused across many forms and facilities instead of each form inventing its own fields. +### Data Type -## Scope +The data type sets the kind of value that staff can record. Care has these data types: -Where a definition applies depends on whether it is tied to a facility: +- Boolean +- Decimal +- Integer +- DateTime +- Time +- String +- Quantity -| Scope | Meaning | -| --- | --- | -| Instance-wide | Not bound to any facility; available across the whole deployment | -| Facility-scoped | Bound to one facility; only that facility uses it | +### Components -The scope is set once when the definition is created. This lets a deployment ship a standard catalogue of observations while still allowing an individual facility to define its own. +Some tests give more than one value. Blood pressure is an example, because it gives a systolic value and a diastolic value. For a test of this type, add one component for each value. Each component has its own code, data type, unit, and interpretation rules. -## Lifecycle +### Observation Interpretation -```text -draft → active → retired -``` +Observation Interpretation holds the qualified ranges of the test. Each rule has a title, conditions, value ranges, and an optional fallback. Care checks the rules in the order that you add them. Care skips a rule when the conditions do not match the patient or the encounter. -- **draft** — the definition is being authored and is not yet ready for use -- **active** — the definition is in use and can be referenced by questionnaires and observations -- **retired** — the definition is withdrawn from use but kept for history +For a rule that matches, Care flags the result with the interpretation of the range that holds the value. If no range holds the value, Care uses the fallback of that rule. If that rule has no fallback, Care checks the next rule. For more detail, see [Set up qualified ranges](../../flows/definitions/observation-definition/set-up-qualified-ranges.mdx). -Observation definitions are never destroyed. When one is no longer wanted it is moved to **retired** rather than deleted, so existing records that relied on it stay coherent. A separate **unknown** status exists for definitions whose state cannot be determined. +Note: You can add interpretation rules to the observation definition, or to its components. You cannot add rules to both. -## Permissions +### Scope -Access to observation definitions is governed by facility-scoped role permissions. +An observation definition can belong to one facility. Staff at that facility can then use the template. A Care superuser can also share an observation definition with every facility. -| Permission | Description | System Roles | -| --- | --- | --- | -| `can_write_observation_definition` | Create and update observation definitions for a facility | Facility Admin, Admin | -| `can_read_observation_definition` | View observation definitions available to a facility | Facility Admin, Administrator, Admin, Staff, Doctor, Nurse, Volunteer, Pharmacist | +### Status -Roles are granted through a user's organization, facility, or patient memberships, and permissions cascade down the organization tree — so authoring is restricted to administrators while most clinical roles can read the definitions they need to collect data. +| Status | Description | +| --- | --- | +| Draft | You still prepare the template. | +| Active | Staff can use the template for results. | +| Retired | The template is out of use. Care keeps it for the results that already use it. | +| Unknown | The stage of the template is not known. | ## Related -- Reference: [Observation Definition (technical)](../../references/definitions/observation-definition.mdx) -- Concept: [Observation](../clinical/observation.mdx) -- Concept: [Service Request](../clinical/service-request.mdx) -- Reference: [Questionnaire](../../references/definitions/questionnaire.mdx) -- Reference: [Value Set](../../references/definitions/valueset.mdx) +- Flow: [Create an observation definition](../../flows/definitions/observation-definition/create-observation-definition.mdx) +- Flow: [Set up qualified ranges](../../flows/definitions/observation-definition/set-up-qualified-ranges.mdx) +- Flow: [Update or retire an observation definition](../../flows/definitions/observation-definition/update-or-retire-observation-definition.mdx) +- Concept: [Activity Definition](../../concepts/definitions/activity-definition.mdx) +- Concept: [Diagnostic Report](../../concepts/clinical/diagnostic-report.mdx) diff --git a/versioned_docs/version-3.1/concepts/definitions/questionnaire-response-template.mdx b/versioned_docs/version-3.1/concepts/definitions/questionnaire-response-template.mdx index 15ac7743..0ce87d38 100644 --- a/versioned_docs/version-3.1/concepts/definitions/questionnaire-response-template.mdx +++ b/versioned_docs/version-3.1/concepts/definitions/questionnaire-response-template.mdx @@ -2,58 +2,39 @@ sidebar_position: 2 --- -# Response Template +# Questionnaire Response Template -A **response template** is a saved starting point for filling out a [questionnaire](../definitions/questionnaire.mdx). It bundles pre-filled answers, draft medication orders, and standing procedure requests that a clinician can drop into a patient's record instead of typing everything from scratch — a "favourite" or order set: the work you do once, ready to reuse on the next similar patient. +## Definition -## What it represents +A **questionnaire response template** is a saved set of medications and service requests. You apply the template when you fill a questionnaire. The template prevents the entry of the same orders for each patient. You can change every value that the template fills in. -A response template is a Care-specific authoring convenience, not a FHIR resource. The key thing to understand is that it is a recipe, not a record. Nothing in a template touches a patient until a clinician applies it and submits the resulting [questionnaire response](../clinical/questionnaire-response.mdx) — only then are real orders, requests, and observations created. Editing or deleting a template never changes responses already submitted from it. +Note: A questionnaire response template is a convenience feature of Care. No FHIR R5 resource applies to it. -This separation is what makes templates safe to standardise and tweak: a department can revise its admission order set without disturbing a single chart. +## Key Attributes -## What a template can carry +| Components | What it captures | +| --- | --- | +| Template Name | The name that identifies the template. Care asks for this name. | +| Description | More detail about the content that the template fills in. This detail is optional. | +| Medications | The medications that the template adds to the form. | +| Service Requests | The service requests that the template adds to the form. | +| Questionnaire | The questionnaire that the template belongs to. Care sets this link for you. | +| Facility | The facility that you work in when you create the template. Care sets this link for you. | +| Select Department | The departments that you share the template with. | -A template bundles up to three kinds of content, and any of them may be empty: +### Who can see a template -- **Questionnaire answers** — default values for the linked questionnaire's questions, so a form opens partly (or fully) completed -- **Medication requests** — draft prescriptions, each optionally pointing at a known product, that become real orders once applied -- **Activity definitions** — pre-built procedure or service requests (labs, imaging, procedures) the template fires off when used +You always see the templates that you create. You also see a template in these two conditions: -Care keeps a running list of which of these sections a template actually contains, so a client can tell at a glance what applying it will do — without opening the template up. +- Another person shares the template with you. +- Another person shares the template with a department that you are a member of. -## How it connects - -A response template sits alongside the form tooling rather than inside a single patient's chart: - -- It optionally targets one [questionnaire](../definitions/questionnaire.mdx) — the form it knows how to pre-fill. A template with no questionnaire is a free-standing bundle of orders. -- Applying it produces a [questionnaire response](../clinical/questionnaire-response.mdx), which is what actually lands in the patient's record. -- Its draft orders reference the same primitives a clinician would create by hand — medication requests and the products behind them, and activity definitions that drive service requests. - -## Sharing and ownership - -A template is offered to people by scope rather than owned by one author: - -- **Facility-wide** — tied to a facility so everyone working there can reach it -- **Organization** — narrowed to specific facility organizations within that facility -- **Individual users** — shared directly with named users -- **Instance-wide** — left unscoped to a facility, making it available across the deployment - -Because sharing is by facility, organization, or user, the same template can be a personal shortcut for one doctor or a standardised order set for an entire department. - -## Permissions - -Reading and listing response templates is not gated by a permission slug — the API instead scopes results to templates a user can already reach: those they created, those shared directly with them, and those shared with a facility organization they belong to. Creating, updating, and deleting a template all require a single write permission. - -| Permission | Description | System Roles | -| --- | --- | --- | -| `can_write_questionnaire_response_template` | Create, update, and delete response templates (including their sharing scope) | Admin, Doctor, Nurse, Administrator, Staff, Facility Admin, Volunteer, Pharmacist | - -Roles are granted through a user's facility and organization memberships, and permissions cascade down the organization tree — so a user's reach over templates follows wherever those memberships place them. +Note: The template stays personal when you select no department. ## Related -- Reference: [Questionnaire Response Template (technical)](../../references/definitions/questionnaire-response-template.mdx) -- Concept: [Questionnaire](../definitions/questionnaire.mdx) — the form a template pre-fills -- Concept: [Questionnaire Response](../clinical/questionnaire-response.mdx) — what applying a template creates -- Concept: [Medication Request](../medications/medication-request.mdx) — the draft orders a template can carry +- Flow: [Create a response template](../../flows/definitions/questionnaire-response-template/create-response-template.mdx) +- Flow: [Apply a response template](../../flows/definitions/questionnaire-response-template/apply-response-template.mdx) +- Flow: [Update or delete a response template](../../flows/definitions/questionnaire-response-template/update-or-delete-response-template.mdx) +- Concept: [Questionnaire](../../concepts/definitions/questionnaire.mdx) +- Concept: [Questionnaire Response](../../concepts/clinical/questionnaire-response.mdx) diff --git a/versioned_docs/version-3.1/concepts/definitions/questionnaire.mdx b/versioned_docs/version-3.1/concepts/definitions/questionnaire.mdx index 6132a61f..61727fab 100644 --- a/versioned_docs/version-3.1/concepts/definitions/questionnaire.mdx +++ b/versioned_docs/version-3.1/concepts/definitions/questionnaire.mdx @@ -4,79 +4,63 @@ sidebar_position: 1 # Questionnaire -A **questionnaire** is a reusable form definition in Care — a set of questions you design once and then collect answers to, again and again, about a patient or an encounter. It is how Care lets a deployment build its own intake sheets, assessments, and checklists instead of waiting for them to be coded into the software. +## Definition -## What it represents +A **[questionnaire](https://build.fhir.org/questionnaire.html)** in Care is the definition of a structured form. It holds the title of the form, the questions, and the order of those questions. A questionnaire is a template, not a submission. When staff fill in a questionnaire for a patient, Care saves the answers as a [Questionnaire Response](../../concepts/clinical/questionnaire-response.mdx). -In Care's FHIR-aligned model, a questionnaire maps to the **Questionnaire** resource. It defines: +## Key Attributes -- **The questions** — an ordered, nestable tree, each question with a type (text, number, date, choice, group, and so on) -- **The subject** — whether the form is answered about a *patient* or about an *encounter* -- **The behaviour** — conditional logic, required fields, units, and allowed choices that shape how the form fills in -- **The clinical meaning** — questions can carry a clinical code (e.g. LOINC) so their answers land in the record as real [Observations](../clinical/observation.mdx), not just stored text - -The key distinction: a questionnaire is the *blank form*, never a filled-in one. Each set of answers a clinician submits is stored separately as a [Questionnaire Response](../clinical/questionnaire-response.mdx), so a single definition can accumulate thousands of responses across many patients over time. - -## Question types - -Each question declares a type, which controls how it is rendered and how its answer is validated on submit. The common ones: - -| Type | Captures | +| Components | What it captures | | --- | --- | -| `group` | A container that holds related sub-questions (must have at least one child) | -| `string` / `text` | Short or long free text | -| `integer` / `decimal` | Numbers | -| `boolean` | Yes / no | -| `date` / `dateTime` / `time` | Points in time | -| `choice` | A pick from a fixed list or a [ValueSet](../definitions/valueset.mdx) | -| `quantity` | A number plus a unit (e.g. blood pressure, dose) | -| `display` | Static text shown to the user, with no answer | +| Title | The name of the form. The title is required. | +| Slug | A short identifier for the form in the web address. The slug is required. | +| Description | A short text that explains the purpose of the form. The description is optional. | +| Status | The stage of the questionnaire in its lifecycle. The status is required. | +| Subject Type | The level at which staff fill in the form. The subject type is required. | +| Organizations | The organizations that can see and use the questionnaire. You must select at least one organization. | +| Questions | The questions and the question groups in the form. | +| Version | The version number of the questionnaire. Care sets this value, and you cannot change it. | + +### Slug -Two features turn a flat list of fields into a form that feels intelligent. **Conditional display** lets a question appear only when an earlier answer meets a condition, so the clinician sees follow-ups instead of every field at once. **Coded questions** attach a clinical code, so the answer is filed as an Observation in the patient record; a question without a code simply stores its answer as form data. +The slug must have 5 to 25 characters. The slug accepts letters, numbers, underscores, and hyphens. Each questionnaire needs a different slug. -## Lifecycle +### Subject Type -A questionnaire moves through three publication states, modelled on FHIR. The important rule: once a form goes live it is treated as immutable — you retire it and publish a replacement rather than editing it in place, so every response ever submitted keeps pointing at a stable, unchanged definition. +The subject type is Patient or Encounter. If you select Patient, staff fill in the form at the patient level. If you select Encounter, staff fill in the form inside an encounter. -```text -draft → active → retired -``` +### Questions -- **draft** — being authored; not yet available for submission -- **active** — published and accepting submissions; should not be edited or deleted -- **retired** — withdrawn from use, but kept so the responses that reference it stay meaningful +Each question has a type. The available types are Group, Display, Boolean, Decimal, Integer, Date, Date Time, Time, String, Text, URL, Choice, Quantity, and Structured. A Group holds other questions together. A Display shows text to the reader and takes no answer. -Only `active` questionnaires accept submissions; a draft or retired form rejects them. +Each question also has three flags: -## How it connects +- Required: staff must answer the question before they submit the form. +- Repeatable: staff can give more than one answer to the question. Care hides this flag for the Boolean, Group, Display, and Structured types. +- Read only: staff can see the question but cannot change the answer. -A questionnaire sits at the centre of Care's data-collection flow and ties together several other primitives: +A Choice question gets its answers in one of two ways. You add a set of custom options. You can also select a [Valueset](../../concepts/definitions/valueset.mdx) for the question. A Quantity question always gets its units from a valueset. -- **Patient / Encounter** — every response is recorded against a [Patient](../clinical/patient), and against an [Encounter](../clinical/encounter.mdx) too when the form's subject type is *encounter* -- **Questionnaire Response** — each submission produces a stored [Questionnaire Response](../clinical/questionnaire-response.mdx), the answers separated from the form -- **Observation** — coded questions materialise their answers as [Observations](../clinical/observation.mdx) on submit, so vitals and findings flow into the clinical record -- **ValueSet** — choice and quantity questions draw their allowed answers from a [ValueSet](../definitions/valueset.mdx) -- **Organization** — a questionnaire is scoped to one or more organizations, which decides who can see and use it -- **Response Template** — a [Questionnaire Response Template](../definitions/questionnaire-response-template.mdx) can pre-fill answers to speed up repetitive forms +### Status -## Permissions +| Status | Description | +| --- | --- | +| Active | The questionnaire is in use. Staff can fill it in. | +| Draft | The questionnaire is in preparation and is not ready for use. | +| Retired | The questionnaire is no longer in use. | -Access to questionnaires is governed by these permissions, granted to users through their roles. +Note: The questionnaire screens have no action to delete a questionnaire. Set the status to Retired to take a questionnaire out of use. -| Permission | Description | System Roles | -| --- | --- | --- | -| `can_write_questionnaire` | Create a questionnaire and set the organizations it is scoped to | Admin, Facility Admin | -| `can_read_questionnaire` | View questionnaire definitions, list them, and see the organizations a questionnaire is scoped to | Admin, Doctor, Nurse, Administrator, Staff, Facility Admin, Volunteer, Pharmacist, Admin (role org), Manager (role org), Member (role org) | -| `can_submit_patient_questionnaire` | Submit a questionnaire about a patient (no encounter) | Volunteer, Staff, Doctor, Nurse, Admin, Facility Admin, Administrator | -| `can_submit_encounter_questionnaire` | Submit a questionnaire against a patient encounter | Staff, Doctor, Nurse, Admin, Facility Admin | +## Access -Roles are granted to users through organization, facility, or patient memberships, and the access they confer cascades down the organization tree. Editing and deleting a questionnaire are restricted to superusers, while most clinical roles can read and submit. +The **Admin Dashboard** button opens the questionnaire screens. Care shows this button only to superusers. To create a questionnaire, you need the "Can Create/Update Questionnaires" permission in each organization that you select. To change a saved questionnaire, you must be a superuser. To add or remove the organizations of a saved questionnaire, you need the "Can Create/Update Questionnaires" permission. ## Related -- Reference: [Questionnaire (technical)](../../references/definitions/questionnaire.mdx) -- Concept: [Questionnaire Response](../clinical/questionnaire-response.mdx) -- Concept: [Questionnaire Response Template](../definitions/questionnaire-response-template.mdx) -- Concept: [ValueSet](../definitions/valueset.mdx) -- Concept: [Observation](../clinical/observation.mdx) -- Standard: FHIR [Questionnaire](https://www.hl7.org/fhir/questionnaire.html) and [QuestionnaireResponse](https://www.hl7.org/fhir/questionnaireresponse.html), which Care's `draft` / `active` / `retired` model and nested question tree follow +- Flow: [Create a questionnaire](../../flows/definitions/questionnaire/create-questionnaire.mdx) +- Flow: [Add and edit questions](../../flows/definitions/questionnaire/add-and-edit-questions.mdx) +- Flow: [Manage organizations for a questionnaire](../../flows/definitions/questionnaire/manage-questionnaire-organizations.mdx) +- Flow: [Clone a questionnaire](../../flows/definitions/questionnaire/clone-questionnaire.mdx) +- Concept: [Questionnaire Response](../../concepts/clinical/questionnaire-response.mdx) +- Concept: [Questionnaire Response Template](../../concepts/definitions/questionnaire-response-template.mdx) +- Concept: [Valueset](../../concepts/definitions/valueset.mdx) diff --git a/versioned_docs/version-3.1/concepts/definitions/specimen-definition.mdx b/versioned_docs/version-3.1/concepts/definitions/specimen-definition.mdx index 94f3f2f8..cb183745 100644 --- a/versioned_docs/version-3.1/concepts/definitions/specimen-definition.mdx +++ b/versioned_docs/version-3.1/concepts/definitions/specimen-definition.mdx @@ -4,64 +4,39 @@ sidebar_position: 5 # Specimen Definition -A **specimen definition** is a facility's reusable rulebook for one *kind* of sample — what material to collect, how to prepare the patient, how to collect it, and how it must be contained and handled for testing. It exists so that the same expectations apply every time that sample type is ordered, no matter who draws it. +## Definition -## What it represents +A **[specimen definition](https://build.fhir.org/specimendefinition.html)** in Care is a reusable template for one type of specimen, for example a blood draw. It describes how staff collect the specimen and how they handle it after collection. Each specimen definition belongs to one facility. Care does not share a specimen definition across facilities. Staff create an actual [Specimen](../../concepts/clinical/specimen.mdx) from a specimen definition. -In Care's FHIR-aligned model, a specimen definition maps to the **SpecimenDefinition** resource. It captures: +## Key Attributes -- **What to collect** — the material (blood, urine, swab, tissue), and whether a substitute is a `preferred` or `alternate` choice -- **Patient preparation** — steps the patient follows beforehand, such as fasting -- **How to collect** — the collection procedure, from finger-prick to biopsy to clean-catch urine -- **Containment and handling** — the container, minimum volume, cap, temperature, and how long the sample stays usable +| Components | What it captures | +| --- | --- | +| Title | The name of the specimen definition. This field is required. | +| Slug | A short identifier that is unique in the facility. This field is required. | +| Description | An explanation of the purpose of the specimen definition. This field is required. | +| Status | The current state of the specimen definition. This field is required. | +| Derived From URI | The web address of the definition that this specimen definition is based on. This field is optional. | +| Type Collected | The kind of specimen to collect, for example blood or urine. This field is required. | +| Patient Preparation | The instructions that the patient follows before collection, for example fasting. This field is optional. | +| Collection | The preferred collection method, for example a finger-prick. This field is optional. | +| Type Tested | The container and handling requirements for the specimen. This field is optional. | -The key distinction is that a definition is a *template*, never an actual sample. It says how a kind of specimen *should* be handled; the physical tube drawn from a real patient is a [Specimen](../clinical/specimen.mdx). When a sample is drawn from a definition, it copies the definition's details into its own record — so the expectations are frozen at the moment of collection and can't be rewritten later. +### Type Tested -## A definition describes one container +Type Tested holds the requirements that keep the specimen usable after collection. It records the preference, the container details, the retention time, and the handling requirements. It also records if the tested specimen comes from another specimen, and if the laboratory uses the specimen one time only. -Care keeps each definition deliberately narrow: it covers a single sample type held in a single container, including that container's capacity, minimum usable volume, cap, and any pre-treatment, plus the handling rules that keep the sample viable — temperature (`room`, `refrigerated`, or `frozen`), how long it can be held, and any special delivery instructions. +### Status -When a test genuinely needs several containers, you don't stretch one definition to cover them all. Instead, an [Activity Definition](../definitions/activity-definition.mdx) composes the order from multiple definitions. This keeps each definition a clean, reusable unit rather than a bespoke recipe for one test. - -## Lifecycle - -A definition is authored, published, and eventually withdrawn — never quietly edited once in use. - -```text -draft → active → retired -``` - -- **draft** — being authored, not yet referenced by orders -- **active** — published and available to orders -- **retired** — withdrawn from use; records that already used it stay intact - -When the rules for a sample type change, Care bumps the definition's **version** instead of mutating the published record. Orders placed earlier stay faithful to what was actually expected at the time, which matters when a result is questioned months later. - -## How it connects - -A specimen definition lives in the lab's catalogue and is pointed *to* — it is never attached to a patient: - -- An [Activity Definition](../definitions/activity-definition.mdx) or [Service Request](../clinical/service-request.mdx) references it, so an order inherits its collection and handling rules -- A [Specimen](../clinical/specimen.mdx) is instantiated from it when a real sample is drawn, preserving the link and a snapshot of the type -- That sample then flows into the [Diagnostic Report](../clinical/diagnostic-report.mdx) once tested - -Because catalogues are facility-scoped, each facility curates its own set of specimen kinds, each identified by a short, URL-safe slug that is unique within that facility. - -## Permissions - -Access to specimen definitions is governed by facility-level permissions. - -| Permission | Description | System Roles | -| --- | --- | --- | -| `can_write_specimen_definition` | Create and update specimen definitions in a facility's catalogue | Facility Admin, Admin | -| `can_read_specimen_definition` | View specimen definitions when listing, ordering, collecting, or reviewing samples | Facility Admin, Administrator, Admin, Staff, Doctor, Nurse, Volunteer, Pharmacist | - -Roles are granted through facility and organization memberships and cascade down the organization tree, so authoring stays with facility administrators while the wider clinical and lab team can read definitions to act on orders. +| Status | Description | +| --- | --- | +| Draft | Staff prepare the specimen definition. It is not ready for use. | +| Active | Staff can use the specimen definition. The specimen definitions list shows Active definitions by default. | +| Retired | Staff no longer use the specimen definition. Care keeps the record. | ## Related -- Reference: [Specimen Definition (technical)](../../references/definitions/specimen-definition.mdx) -- Concept: [Specimen](../clinical/specimen.mdx) -- Concept: [Service Request](../clinical/service-request.mdx) -- Concept: [Activity Definition](../definitions/activity-definition.mdx) -- Concept: [Diagnostic Report](../clinical/diagnostic-report.mdx) +- Flow: [Create a specimen definition](../../flows/definitions/specimen-definition/create-specimen-definition.mdx) +- Flow: [Update or retire a specimen definition](../../flows/definitions/specimen-definition/update-or-retire-specimen-definition.mdx) +- Concept: [Activity Definition](../../concepts/definitions/activity-definition.mdx) +- Concept: [Specimen](../../concepts/clinical/specimen.mdx) diff --git a/versioned_docs/version-3.1/concepts/definitions/valueset.mdx b/versioned_docs/version-3.1/concepts/definitions/valueset.mdx index 5280cf21..0cf15e7e 100644 --- a/versioned_docs/version-3.1/concepts/definitions/valueset.mdx +++ b/versioned_docs/version-3.1/concepts/definitions/valueset.mdx @@ -2,56 +2,55 @@ sidebar_position: 3 --- -# Value Set +# Valueset -A **value set** is a curated, named list of the answer options allowed for a coded field — the menu of choices behind a dropdown in a form. It is how Care keeps clinical data consistent: instead of free text, a question pulls from an agreed set of codes, so the same finding is recorded the same way every time. +## Definition -## What it represents +A **[valueset](https://build.fhir.org/valueset.html)** in Care is a named list of allowed codes that you can use again in many places. For example, a valueset holds all the codes for a type of allergy. Other parts of Care point to a valueset by name instead of listing each code by hand. A Choice question in a questionnaire and a diagnosis code in a condition both get their codes from a valueset. -In Care's FHIR-aligned model, a value set maps to the **ValueSet** resource. It captures: +## Key Attributes -- **A set of allowed concepts** — the codes a field may use, drawn from one or more standard code systems such as SNOMED CT, LOINC, or ICD -- **Composition rules** — clauses that *include* or *exclude* whole branches of a code system, rather than spelling out every code by hand -- **Publication status** — whether the set is a draft, in active use, or retired -- **Origin** — whether it ships with the platform or was authored for your deployment +| Components | What it captures | +| --- | --- | +| Name | The name of the valueset. Care requires this. | +| Slug | A short identifier that is unique in Care. Care requires this. | +| Description | Text that explains the purpose of the valueset. This is optional. | +| Status | The stage of the valueset in its life. Care requires this. | +| Include rules | The rules that add codes to the valueset. | +| Exclude rules | The rules that remove codes from the valueset. | +| System | Shows if the valueset comes with Care. Care sets this value. | -A value set is not a list of codes frozen in a column. It stores the *rules* for what belongs, and the member codes are resolved live against a terminology server each time the set is searched. Edit the rules and the available choices change immediately — there is nothing to rebuild. This is also what separates it from a [questionnaire](../definitions/questionnaire.mdx): the questionnaire decides *which questions are asked*; the value set decides *what answers each coded question accepts*. +### Include rules and exclude rules -## Lifecycle +Together, the include rules and the exclude rules decide which codes belong to the valueset. -A value set moves through publication states that signal how much to trust it: +Each rule selects one code system, for example LOINC, SNOMED, or UCUM. A rule can also give a version of that code system. The rule then does one of two things: -```text -draft → active → retired - (unknown) -``` +- The rule lists the exact codes to use. +- The rule sets a filter, for example all codes that are a type of X. -- **draft** — authored but not yet ready for use; safe to edit and refine -- **active** — published and in use by forms and coded fields -- **retired** — no longer recommended; kept for history but not chosen for new work -- **unknown** — status has not been established +### Status -## Types +| Status | Description | +| --- | --- | +| Active | The valueset is ready for use in Care. | +| Draft | The valueset is still in preparation. | +| Retired | The valueset is no longer for use. | +| Unknown | The stage of the valueset is not known. | -Value sets come in two kinds, and the distinction decides who may change them: +### Who can change a valueset -- **System-defined** — shipped and maintained by the platform as shared terminology. Deployments treat these as read-only, and their identifiers are reserved with a `system-` prefix. -- **Deployment-authored** — created locally to capture terminology specific to your facility or program. This is where a deployment adds its own pick-lists. +Only a superuser can create, change, or retire a valueset. Any signed-in user can search a valueset and use its codes, for example to answer a question in a form. -## How it connects - -- **Forms** — a [questionnaire](../definitions/questionnaire.mdx) references a value set to constrain a coded answer, so the form only accepts valid options. -- **Definitions** — clinical definitions such as an [observation definition](../definitions/observation-definition.mdx) bind their coded fields to a value set, anchoring what counts as a valid result. -- **Code systems** — a value set does not invent codes; it selects from external standard vocabularies, keeping Care interoperable with the wider health ecosystem. -- **Personalization** — users can favorite frequently used codes, and Care remembers recently picked ones. This speeds up data entry, but it sits on top of the value set as personal preference, not part of its definition. - -## Permissions - -Value sets are shared terminology and are not gated by the usual role-based permissions. Any authenticated user can read and search them — listing, retrieval, code lookup, expansion, validation, and the personal favourites and recent-views actions are all open — because they power the code pickers everyone relies on while documenting care. Creating, updating, or deleting a value set is restricted to superusers (`is_superuser`); no organization role grants write access, which is why system-defined value sets are not editable by deployments. +Note: The valueset pages show the same controls to every user. Care accepts a change only from a superuser. ## Related -- Reference: [Value Set (technical)](../../references/definitions/valueset.mdx) -- Concept: [Questionnaire](../definitions/questionnaire.mdx) — uses value sets to constrain coded answers -- Concept: [Questionnaire Response](../clinical/questionnaire-response.mdx) — the captured answers those choices feed into -- Concept: [Observation Definition](../definitions/observation-definition.mdx) — binds coded result fields to value sets +- Flow: [Create a valueset](../../flows/definitions/valueset/create-valueset.mdx) +- Flow: [Build include and exclude rules](../../flows/definitions/valueset/build-include-and-exclude-rules.mdx) +- Flow: [Preview a valueset before saving](../../flows/definitions/valueset/preview-valueset.mdx) +- Flow: [Update or retire a valueset](../../flows/definitions/valueset/update-or-retire-valueset.mdx) +- Concept: [Questionnaire](../../concepts/definitions/questionnaire.mdx) +- Concept: [Observation Definition](../../concepts/definitions/observation-definition.mdx) +- Concept: [Specimen Definition](../../concepts/definitions/specimen-definition.mdx) +- Concept: [Activity Definition](../../concepts/definitions/activity-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/_category_.json b/versioned_docs/version-3.1/flows/definitions/_category_.json new file mode 100644 index 00000000..5bc411e9 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Definitions", + "position": 9, + "key": "definitions-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/activity-definition/_category_.json b/versioned_docs/version-3.1/flows/definitions/activity-definition/_category_.json new file mode 100644 index 00000000..b6739093 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/activity-definition/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Activity Definition", + "position": 6, + "key": "definitions-activity-definition-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/activity-definition/create-activity-definition.mdx b/versioned_docs/version-3.1/flows/definitions/activity-definition/create-activity-definition.mdx new file mode 100644 index 00000000..4bd16ca5 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/activity-definition/create-activity-definition.mdx @@ -0,0 +1,87 @@ +--- +sidebar_position: 1 +--- + +# Create an activity definition + +## Overview + +This flow describes how to create an [activity definition](../../../concepts/definitions/activity-definition.mdx) for your facility in Care. An activity definition is a template for a service that your facility gives. + +## Pre-requisites + +- You are a member of the facility. +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create Activity Definition on Facility | Create and change activity definitions for the facility. Facility Admin and Admin roles hold this permission. | + +## Steps + +### 1. Open the activity definitions list + +1. Open your facility. +2. Select **Settings**. +3. Select **Activity Definitions**. + +Care shows the resource categories of the facility. To make a new category, select **Add Category**. + +### 2. Start a new activity definition + +1. Open the resource category for the new template. +2. Select **Add Activity Definition**. + +Care opens the form and sets Resource Category to the category that you open. + +### 3. Fill in the details + +Complete the fields in the form. + +| Components | What it captures | +| --- | --- | +| Title | The name of the template, for example "CBC Test". Required. | +| Slug | A short code that Care uses in links. Required. Care makes the Slug from the Title. The Slug must have 5 to 25 characters. | +| Description | Extra detail about the template. Required. | +| Usage | Notes on when to use this template. Required. | +| Status | Draft, Active, Retired, or Unknown. The default value is Active. | +| Category | The type of the service: Laboratory, Imaging, Surgical Procedure, Counselling, or Education. Required. | +| Resource Category | The catalogue category of your facility for this template. Required. This field is not the same as Category. | +| Kind | Always Service Request. | +| Derived From URI | The web address of the source that this template comes from. Optional. | +| Code | The standard medical code for the procedure. Search for the code in the list. Required. | +| Body Site | The body part that this template applies to. Optional. | +| Diagnostic Report Codes | The codes for the diagnostic reports that this activity gives. Optional. | +| Healthcare Service | The facility service that does this activity. Optional. | +| Locations | The facility locations where staff do this activity. Optional. | + +Note: Category and Resource Category are two different fields. Category holds the type of the service. Resource Category holds the catalogue category of your facility. + +### 4. Add the requirements + +Add the requirements for the activity definition. You can add the requirements before you save the form. + +For the steps, see [Link requirements to an activity definition](./link-requirements-to-activity-definition.mdx). + +### 5. Save the activity definition + +Select **Create**. + +## Expected Outcome + +- Care shows the message "Activity definition created successfully". +- Care opens the activity definitions list again. +- The new activity definition shows in the resource category that you selected. + +## Related + +Concepts: + +- [Activity Definition](../../../concepts/definitions/activity-definition.mdx) + +Flows: + +- [Link requirements to an activity definition](./link-requirements-to-activity-definition.mdx) +- [Update or retire an activity definition](./update-or-retire-activity-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/activity-definition/link-requirements-to-activity-definition.mdx b/versioned_docs/version-3.1/flows/definitions/activity-definition/link-requirements-to-activity-definition.mdx new file mode 100644 index 00000000..fe69d4b8 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/activity-definition/link-requirements-to-activity-definition.mdx @@ -0,0 +1,76 @@ +--- +sidebar_position: 2 +--- + +# Link requirements to an activity definition + +## Overview + +This flow describes how to link specimen, observation, and charge item requirements to an [activity definition](../../../concepts/definitions/activity-definition.mdx) in Care. + +## Pre-requisites + +- You create a new activity definition, or you edit an activity definition that exists. See [Create an activity definition](./create-activity-definition.mdx). +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create Activity Definition on Facility | Create and change activity definitions for the facility. Facility Admin and Admin roles hold this permission. | + +## Steps + +### 1. Open the Requirements section + +Open the activity definition form. Go to the **Requirements** section. + +### 2. Link specimen requirements + +1. Select **Specimen Requirements**. +2. Search for a [specimen definition](../../../concepts/definitions/specimen-definition.mdx). +3. Select one or more specimen definitions. + +To make a new specimen definition, select **Create New**. Care opens a panel with the specimen definition form. The activity definition form stays open behind the panel. + +Note: Care shows only the active specimen definitions of the facility. + +### 3. Link observation requirements + +1. Select **Observation Requirements**. +2. Search for an [observation definition](../../../concepts/definitions/observation-definition.mdx). +3. Select one or more observation definitions. + +To make a new observation definition, select **Create New**. Care opens a panel with the observation definition form. + +Note: Care shows only the active observation definitions of the facility. + +### 4. Link charge item definitions + +1. Select **Charge Item Definitions**. +2. Open the resource category that holds the [charge item definition](../../../concepts/definitions/charge-item-definition.mdx). +3. Select one or more charge item definitions. + +Note: Care does not give a **Create New** option here. Create the charge item definition first. Then link it. + +### 5. Save the activity definition + +Select **Create** for a new activity definition. Select **Save** for an activity definition that exists. + +## Expected Outcome + +- Care links the selected specimen definitions, observation definitions, and charge item definitions to the activity definition. +- The activity definition page shows the linked definitions. + +## Related + +Concepts: + +- [Activity Definition](../../../concepts/definitions/activity-definition.mdx) +- [Specimen Definition](../../../concepts/definitions/specimen-definition.mdx) +- [Observation Definition](../../../concepts/definitions/observation-definition.mdx) +- [Charge Item Definition](../../../concepts/definitions/charge-item-definition.mdx) + +Flows: + +- [Create an activity definition](./create-activity-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/activity-definition/update-or-retire-activity-definition.mdx b/versioned_docs/version-3.1/flows/definitions/activity-definition/update-or-retire-activity-definition.mdx new file mode 100644 index 00000000..73ab98bc --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/activity-definition/update-or-retire-activity-definition.mdx @@ -0,0 +1,65 @@ +--- +sidebar_position: 3 +--- + +# Update or retire an activity definition + +## Overview + +This flow describes how to change the details of an [activity definition](../../../concepts/definitions/activity-definition.mdx) in Care. It also describes how to retire an activity definition that the facility no longer uses. + +## Pre-requisites + +- The facility has an activity definition that you want to change. +- If you retire the activity definition, its status is not Retired. +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create Activity Definition on Facility | Create and change activity definitions for the facility. Facility Admin and Admin roles hold this permission. | + +## Steps + +### 1. Open the activity definition + +1. Open your facility. +2. Select **Settings**. +3. Select **Activity Definitions**. +4. Open the resource category that holds the activity definition. +5. Select **View** on the activity definition. + +### 2. Update the details + +1. Select **Edit**. +2. Change the details of the activity definition. +3. Select **Save**. + +Care shows the message "Activity definition updated successfully". + +### 3. Retire the activity definition + +Do this step only when the facility no longer uses the activity definition. + +1. Select **Delete** on the activity definition page. Care shows this button only when the status is not Retired. +2. Care opens the dialog "Delete Activity Definition". The dialog asks you to confirm the action. +3. Select **Confirm**. + +Note: Care does not remove the activity definition. Care sets the status to Retired. + +## Expected Outcome + +- Care saves your changes to the activity definition. +- If you retire the activity definition, Care sets its status to Retired. +- A retired activity definition stays in Care for reference. Clinicians cannot order it. + +## Related + +Concepts: + +- [Activity Definition](../../../concepts/definitions/activity-definition.mdx) + +Flows: + +- [Create an activity definition](./create-activity-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/activity-definition/use-activity-definition-to-order-a-service.mdx b/versioned_docs/version-3.1/flows/definitions/activity-definition/use-activity-definition-to-order-a-service.mdx new file mode 100644 index 00000000..c882ef94 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/activity-definition/use-activity-definition-to-order-a-service.mdx @@ -0,0 +1,70 @@ +--- +sidebar_position: 4 +--- + +# Use an activity definition to order a service + +## Overview + +This flow describes how a clinician uses an [activity definition](../../../concepts/definitions/activity-definition.mdx) template to order a service for a patient. The other flows in this module cover how an administrator builds the template. + +## Pre-requisites + +- The patient is registered in Care and has an open encounter at the facility. +- The facility has one or more activity definitions with the status Active. +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Write Service Request on Facility | Create and change service requests for patients at the facility. Facility Admin, Admin, Doctor, and Nurse roles hold this permission. | + +## Steps + +### 1. Open the Service Requests tab + +Open the encounter of the patient. Select the **Service Requests** tab. + +### 2. Start a new service request + +Select **Create Service Request**. + +### 3. Select the activity definition + +1. Select **Select Activity Definition**. +2. Open the resource category that holds the template. +3. Select the template. + +Care adds a card for that service to the form. Care copies the Title, the Category, the Code, the Body Site, and the Locations from the template. Care also copies the Healthcare Service. + +Note: Care shows only the activity definitions with the status Active. + +### 4. Adjust the details + +Change the Priority, the Body Site, the Patient Instruction, the Requester, and the Note on the card. + +Note: Priority is mandatory. The default value is Routine. + +### 5. Add more services or submit + +Repeat step 3 to add more services to the same form. Select **Submit** to save all the services together. + +## Expected Outcome + +- Care creates a service request for the patient under the current encounter. +- If the template has linked charge item definitions, Care creates the matching charge items for the patient. + +For the full ordering flow, and the other ways to create a service request, see the [Service Request](../../../concepts/clinical/service-request.mdx) module. + +## Related + +Concepts: + +- [Activity Definition](../../../concepts/definitions/activity-definition.mdx) +- [Service Request](../../../concepts/clinical/service-request.mdx) + +Flows: + +- [Create a service request](../../../flows/clinical/service-request/create-a-service-request.mdx) +- [Create an activity definition](./create-activity-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/charge-item-definition/_category_.json b/versioned_docs/version-3.1/flows/definitions/charge-item-definition/_category_.json new file mode 100644 index 00000000..81876149 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/charge-item-definition/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Charge Item Definition", + "position": 7, + "key": "definitions-charge-item-definition-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/charge-item-definition/create-charge-item-definition.mdx b/versioned_docs/version-3.1/flows/definitions/charge-item-definition/create-charge-item-definition.mdx new file mode 100644 index 00000000..c0b175cd --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/charge-item-definition/create-charge-item-definition.mdx @@ -0,0 +1,81 @@ +--- +sidebar_position: 1 +--- + +# Create a charge item definition + +## Overview + +This flow describes how to create a [charge item definition](../../../concepts/definitions/charge-item-definition.mdx) in Care. A charge item definition is a priced template for a service or an item. + +## Pre-requisites + +- You are a member of the facility. +- A category for charge item definitions is set up in the facility. You select this category in the form. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Read Charge Item Definition | Lets you open the charge item definitions of your facility. | +| Can Create Charge Item Definition on Facility | Lets you create a new charge item definition for your facility. | + +## Steps + +### 1. Open the charge item definitions + +Go to the facility. + +Click **Settings**. + +Click **Charge Item Definitions**. + +### 2. Select the category + +Open the category for the new definition. + +Click **Add Definition**. + +### 3. Fill in the definition details + +Complete the components in the form. + +| Components | What it captures | +| --- | --- | +| Title | The name of the priced item or service. This field is required. | +| Slug | A short identifier for the definition. Care suggests the slug from the title. The slug must have 5 to 25 characters. This field is required. | +| Category | The category that holds this definition. Care fills in the category that you opened in step 2. This field is required. | +| Status | Draft, Active, or Retired. Care sets Active by default. | +| Description | Extra detail about the definition. This field is optional. | +| Purpose | The reason to use this pricing template. This field is optional. | +| Derived From URI | The web address of the source of this template. This field is optional. | +| Can Edit Charge Item | Select this checkbox to let staff change the price on a charge item that comes from this template. Care selects it by default. | +| Base Price | The standard price. This field is required. Enter a negative price for an invoice-level discount. | +| MRP | The maximum retail price. This field is optional. | +| Purchase Price | The price that your facility pays. This field is optional. | +| Taxes | One or more taxes that apply to the price. This field is optional. | +| Discounts | One or more discounts that apply to the price. Each discount has its own conditions. This field is optional. | + +Note: Your facility settings decide which taxes and discounts you can select. + +### 4. Save the definition + +Click **Create**. + +Note: Press Shift+Enter to submit the form. Press Escape to cancel. + +## Expected Outcome + +- Care confirms that it created the definition. +- Care takes you back to the category list. + +## Related + +Concepts: + +- [Charge Item Definition](../../../concepts/definitions/charge-item-definition.mdx) + +Flows: + +- [Update or retire a charge item definition](./update-or-retire-charge-item-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/charge-item-definition/update-or-retire-charge-item-definition.mdx b/versioned_docs/version-3.1/flows/definitions/charge-item-definition/update-or-retire-charge-item-definition.mdx new file mode 100644 index 00000000..b3de770c --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/charge-item-definition/update-or-retire-charge-item-definition.mdx @@ -0,0 +1,77 @@ +--- +sidebar_position: 2 +--- + +# Update or retire a charge item definition + +## Overview + +This flow describes how to change the details of a [charge item definition](../../../concepts/definitions/charge-item-definition.mdx) in Care. It also describes how to retire a charge item definition that your facility no longer uses. + +## Pre-requisites + +- You are a member of the facility. +- The charge item definition is created in the facility. +- If you want to retire the definition, its status is not Retired. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Read Charge Item Definition | Lets you open the charge item definitions of your facility. | +| Can Create Charge Item Definition on Facility | Lets you update or retire a charge item definition. | + +## Steps + +### 1. Open the charge item definition + +Go to the facility. + +Click **Settings**. + +Click **Charge Item Definitions**. + +Open the category that holds the definition. + +Open the charge item definition that you want to change. + +### 2. Update the details + +Click **Edit**. + +Change the details of the charge item definition. + +Click **Update**. + +Note: The **Update** button stays disabled until you change a detail. + +Note: Press Shift+Enter to submit the form. Press Escape to cancel. + +### 3. Retire the charge item definition + +Do this step only if you want to stop the use of the charge item definition. + +Click **Delete**. Care shows this button only while the status of the definition is not Retired. + +Care opens the **Delete charge item definition** dialog. + +Click **Confirm**. + +Note: Care does not remove the charge item definition. Care sets its Status to Retired. + +## Expected Outcome + +- Care saves your changes to the charge item definition. +- After you click **Confirm**, Care sets the Status of the charge item definition to Retired. +- Care shows a message that confirms the change. + +## Related + +Concepts: + +- [Charge Item Definition](../../../concepts/definitions/charge-item-definition.mdx) + +Flows: + +- [Create a charge item definition](./create-charge-item-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/observation-definition/_category_.json b/versioned_docs/version-3.1/flows/definitions/observation-definition/_category_.json new file mode 100644 index 00000000..19ed76f5 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/observation-definition/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Observation Definition", + "position": 4, + "key": "definitions-observation-definition-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/observation-definition/create-observation-definition.mdx b/versioned_docs/version-3.1/flows/definitions/observation-definition/create-observation-definition.mdx new file mode 100644 index 00000000..de4cdee8 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/observation-definition/create-observation-definition.mdx @@ -0,0 +1,82 @@ +--- +sidebar_position: 1 +--- + +# Create an observation definition + +## Overview + +This flow describes how to create an [observation definition](../../../concepts/definitions/observation-definition.mdx) for a facility in Care. An observation definition sets the template for a test or measurement. + +## Pre-requisites + +- You are a member of the facility. +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create Observation Definition on Facility | Lets you create a new observation definition for your facility. | + +## Steps + +### 1. Open the observation definitions list + +Go to your facility. Click **Settings**. Click **Observation Definitions**. + +### 2. Start a new observation definition + +Click **Add Definition**. Care opens the Create Observation Definition form. + +### 3. Fill in the basic information + +Complete the fields in the **Basic Information** section. + +| Components | What it captures | +| --- | --- | +| Title | The name of the test or measurement. Required. | +| Slug | A short unique name that Care uses in links. Care builds the slug from the title, and you can edit it. Use 5 to 25 letters, numbers, underscores, or hyphens. Required. | +| Description | Extra detail about the test. Required. | +| Status | Draft, Active, Retired, or Unknown. Care selects Active. Required. | +| Category | Social History, Vital Signs, Imaging, Laboratory, Procedure, Survey, Exam, Therapy, or Activity. Required. | +| Data Type | The kind of value that a result holds, for example a number, a yes or no answer, or a date. Required. | +| LOINC Code | The standard code of the test. Search for the code, then select it. Required. | + +### 4. Fill in the additional details + +Complete the fields in the **Additional Details** section. These fields are optional. + +| Components | What it captures | +| --- | --- | +| Body Site | The body part that the test applies to. | +| Method | The technique that staff use to do the test. | +| Unit | The unit of measure for the result. | + +### 5. Add components for a multi-part test + +If the test has more than one part, for example blood pressure, go to the **Components** section. Click **Add your first component**. Add one component for each part of the test. Click **Add component** for each further part. + +Each component holds its own Code, Data Type, and Unit. + +### 6. Save the observation definition + +Click **Create**. + +Note: To leave the form without a new observation definition, click **Cancel**. + +## Expected Outcome + +- Care creates the observation definition for your facility. +- The new observation definition shows in the observation definitions list. + +## Related + +Concepts: + +- [Observation Definition](../../../concepts/definitions/observation-definition.mdx) + +Flows: + +- [Set up qualified ranges](./set-up-qualified-ranges.mdx) +- [Update or retire an observation definition](./update-or-retire-observation-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/observation-definition/set-up-qualified-ranges.mdx b/versioned_docs/version-3.1/flows/definitions/observation-definition/set-up-qualified-ranges.mdx new file mode 100644 index 00000000..212b4545 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/observation-definition/set-up-qualified-ranges.mdx @@ -0,0 +1,76 @@ +--- +sidebar_position: 2 +--- + +# Set up qualified ranges + +## Overview + +This flow describes how to set up qualified ranges on an [observation definition](../../../concepts/definitions/observation-definition.mdx) in Care. Qualified ranges are the rules that decide the interpretation that Care gives to a result. A rule can depend on the patient, such as age, gender, or tags, or on the encounter. + +## Pre-requisites + +- You create or edit an observation definition. See [Create an observation definition](./create-observation-definition.mdx). +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create Observation Definition on Facility | Lets you add or change interpretation rules. | + +## Steps + +### 1. Add an interpretation rule + +Go to the **Observation Interpretation** panel on the observation definition form. Click **Add Interpretation**. Care opens the **Add/Edit Interpretation** panel. + +Note: You can add rules to the observation definition, or to its components. Care disables one panel when you use the other. + +### 2. Name the rule + +Enter a short title for the rule in the title box at the top of the panel. Use a title that you recognise later in the list of rules. + +### 3. Add conditions + +Conditions decide when Care applies the rule. Conditions are optional. Click **Add** in the **Conditions** section for each condition. + +For each condition, select the metric, the operation, and the value. + +| Components | What it captures | +| --- | --- | +| Metric | The item to check, such as Patient Age, Patient Gender, Encounter Class, Patient Tags, or Encounter Tags. | +| Operation | How Care compares the value: Equals to, In range, or Has tag. | +| Value | The value that Care compares against. | + +### 4. Add the value ranges + +Click **Add** in the **Ranges** section. Enter the interpretation text in the **Display** box, for example Normal, Abnormal, or Critical. Enter a **Min** value and a **Max** value for that range. Turn on the highlight switch to make Care mark a result in that range. + +Click **Add** again for each further range. + +### 5. Set the fallback interpretation + +Turn on **Fallback** for the rule. Care applies the fallback when a result matches the conditions of the rule, but no range holds the value. + +### 6. Save the rule + +Click **Save**. To discard the rule, click **Cancel**. + +Note: Care checks the rules in the order that you add them. Care skips a rule when the conditions do not match. If no range holds the value and the rule has no fallback, Care checks the next rule. + +## Expected Outcome + +- The rule shows in the **Observation Interpretation** panel of the observation definition. +- Care gives an interpretation to each new result for this observation definition from the first rule that matches. + +## Related + +Concepts: + +- [Observation Definition](../../../concepts/definitions/observation-definition.mdx) + +Flows: + +- [Create an observation definition](./create-observation-definition.mdx) +- [Update or retire an observation definition](./update-or-retire-observation-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/observation-definition/update-or-retire-observation-definition.mdx b/versioned_docs/version-3.1/flows/definitions/observation-definition/update-or-retire-observation-definition.mdx new file mode 100644 index 00000000..c7f69697 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/observation-definition/update-or-retire-observation-definition.mdx @@ -0,0 +1,66 @@ +--- +sidebar_position: 3 +--- + +# Update or retire an observation definition + +## Overview + +This flow describes how to change the details of an [observation definition](../../../concepts/definitions/observation-definition.mdx) in a facility. It also describes how to retire an observation definition that staff must not use again. + +## Pre-requisites + +- You are a member of the facility. +- The observation definition that you want to change is not Retired. +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create Observation Definition on Facility | Lets you update or retire an observation definition. | + +## Steps + +### 1. Open the observation definitions list + +Go to your facility. Click **Settings**. Click **Observation Definitions**. + +### 2. Select the observation definition + +Click the observation definition in the list. Care opens the observation definition. + +### 3. Update the details + +Click **Edit**. + +Change the details of the observation definition. + +Click **Save**. + +### 4. Retire the observation definition + +Follow this step only when you want to stop new use of the observation definition. + +Click **Delete**. Care shows a confirmation dialog. + +Click **Confirm**. + +Note: Delete does not remove the record. Care sets the Status to Retired. Care then hides the **Delete** button for that observation definition. + +## Expected Outcome + +- Care saves your changes to the observation definition. +- After you retire the observation definition, Care shows its Status as Retired. +- The history of the retired observation definition stays intact. + +## Related + +Concepts: + +- [Observation Definition](../../../concepts/definitions/observation-definition.mdx) + +Flows: + +- [Create an observation definition](./create-observation-definition.mdx) +- [Set up qualified ranges](./set-up-qualified-ranges.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/_category_.json b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/_category_.json new file mode 100644 index 00000000..7ba71247 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Questionnaire Response Template", + "position": 2, + "key": "definitions-questionnaire-response-template-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/apply-response-template.mdx b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/apply-response-template.mdx new file mode 100644 index 00000000..2d34377c --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/apply-response-template.mdx @@ -0,0 +1,61 @@ +--- +sidebar_position: 2 +--- + +# Apply a response template + +## Overview + +This flow describes how to fill a questionnaire with a saved [response template](../../../concepts/definitions/questionnaire-response-template.mdx). A template adds its medications and its service requests to the form. + +## Pre-requisites + +- You fill a questionnaire for a patient in a facility. +- You can see at least one response template. See [Create a response template](./create-response-template.mdx). +- You have the permission listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Read Questionnaire Response Templates | Lets you see the templates and apply them to the form. | + +## Steps + +### 1. Open the template list + +Select **Templates** in the medications question or the service request question. Care opens the **Response Templates** panel. + +### 2. Find the template + +Enter a name in **Search templates**. The list shows the templates that you created. It also shows the templates that other users share with you or with your departments. + +### 3. Look at the content of the template + +Select the template to open it. Care shows the medications and the service requests in the template. + +### 4. Apply the template + +Select **Apply**. Care adds all the items of the template to the form. Care then closes the panel. + +To add one item only, select that medication or that service request in the open template. + +### 5. Change the values + +Change the dose, the schedule, or the other details for this patient. Do this before you submit the questionnaire. + +## Expected Outcome + +- Care adds the items of the template to the current questionnaire. +- You can change every value before you submit the questionnaire. + +## Related + +Concepts: + +- [Questionnaire Response Template](../../../concepts/definitions/questionnaire-response-template.mdx) + +Flows: + +- [Create a response template](./create-response-template.mdx) +- [Update or delete a response template](./update-or-delete-response-template.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/create-response-template.mdx b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/create-response-template.mdx new file mode 100644 index 00000000..d20b7076 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/create-response-template.mdx @@ -0,0 +1,72 @@ +--- +sidebar_position: 1 +--- + +# Create a response template + +## Overview + +This flow describes how to create a [questionnaire response template](../../../concepts/definitions/questionnaire-response-template.mdx). You create the template from the medications or the service requests that you enter on a questionnaire. + +## Pre-requisites + +- You fill a questionnaire for a patient in a facility. +- You enter at least one medication or one service request on the questionnaire. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create/Update Questionnaire Response Templates | Lets you create a response template. | +| Can Read Questionnaire Response Templates | Lets you see the list of templates. | + +## Steps + +Care gives you two ways to create a template. Use the first way to save all the items on the form. Use the second way to save one item. + +### 1. Save all the current items as a template + +Enter the medications or the service requests on the questionnaire. Select **Templates** in the question. Care opens the **Response Templates** panel. + +Select **Save Current**. Care shows a **Preview** of the items that it saves. + +### 2. Remove the items that you do not want + +Select the cross icon on an item to remove it from the preview. The other items stay in the template. + +### 3. Name the template + +Enter a **Template Name**. Care asks for this name. Enter a **Description**. The description is optional. + +### 4. Share the template with departments + +Use **Select Department** to select the departments that you share the template with. This step is optional. The template stays personal when you select no department. + +### 5. Create the template + +Select **Create Template**. Care saves the template and shows it in the list. + +### 6. Add one item to a template instead + +To save one item only, select the actions menu on the medication row or the service request row. Select **Add to template**. + +Select **Create New Template** to start a new template with the item. Enter a **Template Name**. Select the departments. Select **Create Template**. + +To put the item in a template that you already have, search the list and select the template. Care adds the item to that template. + +## Expected Outcome + +- Care creates the response template with the items that you selected. +- The template is in the **Response Templates** panel for later questionnaires. +- The staff in the departments that you selected also see the template. + +## Related + +Concepts: + +- [Questionnaire Response Template](../../../concepts/definitions/questionnaire-response-template.mdx) + +Flows: + +- [Apply a response template](./apply-response-template.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/update-or-delete-response-template.mdx b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/update-or-delete-response-template.mdx new file mode 100644 index 00000000..a601f471 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire-response-template/update-or-delete-response-template.mdx @@ -0,0 +1,76 @@ +--- +sidebar_position: 3 +--- + +# Update or delete a response template + +## Overview + +This flow describes how to change or remove a [questionnaire response template](../../../concepts/definitions/questionnaire-response-template.mdx) in Care. + +## Pre-requisites + +- You fill a questionnaire for a patient in a facility. +- You can see the template. You created it, or another user shares it with you or with your department. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Read Questionnaire Response Templates | Lets you see the list of templates. | +| Can Create/Update Questionnaire Response Templates | Lets you change or delete a response template. | + +## Steps + +### 1. Open the template list + +Select **Templates** in the medications question or the service request question. Care opens the **Response Templates** panel. + +### 2. Find the template + +Enter a name in **Search templates**. Find the template that you want to change. + +### 3. Open the template for editing + +Select the edit icon on the template. Care shows the **Edit Template** form. + +### 4. Change the template + +Change these parts of the template: + +| Component | What it captures | +| --- | --- | +| Template Name | The name that identifies the template. | +| Description | More detail about the content that the template fills in. | +| Select Department | The departments that you share the template with. | +| Medications | The medications that the template adds to the form. | +| Service Requests | The service requests that the template adds to the form. | + +Select the cross icon on an item to remove that item from the template. + +### 5. Save the changes + +Select **Save Changes**. Care updates the template. Select **Cancel** to go back to the list. + +### 6. Delete the template + +Select the delete icon on the template. Care shows the **Delete Template** dialog. Select **Delete** to confirm. + +Note: A delete is permanent. A response template has no retired state and no archived state. + +## Expected Outcome + +- Care saves your changes to the template. +- Care removes the template from the list when you delete it. + +## Related + +Concepts: + +- [Questionnaire Response Template](../../../concepts/definitions/questionnaire-response-template.mdx) + +Flows: + +- [Create a response template](./create-response-template.mdx) +- [Apply a response template](./apply-response-template.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire/_category_.json b/versioned_docs/version-3.1/flows/definitions/questionnaire/_category_.json new file mode 100644 index 00000000..9a2eeca7 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Questionnaire", + "position": 1, + "key": "definitions-questionnaire-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire/add-and-edit-questions.mdx b/versioned_docs/version-3.1/flows/definitions/questionnaire/add-and-edit-questions.mdx new file mode 100644 index 00000000..76b8758f --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire/add-and-edit-questions.mdx @@ -0,0 +1,112 @@ +--- +sidebar_position: 2 +--- + +# Add and edit questions + +## Overview + +This flow describes how to add questions to a [questionnaire](../../../concepts/definitions/questionnaire.mdx) and how to change them. You set the type, the settings, and the answer options of each question. + +## Pre-requisites + +- You create a questionnaire, or you open a saved questionnaire to change it. See [Create a questionnaire](./create-questionnaire.mdx). +- If you change a saved questionnaire, you are a Care superuser. Only superusers can change a saved questionnaire. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create/Update Questionnaires | Lets you add and change the questions in a questionnaire. | + +## Steps + +### 1. Add a question + +Click **Add Question**. Care adds a new question to the form. + +### 2. Set the question type + +Select the **Type** of the question from the dropdown. The dropdown has these types: + +- Group +- Display +- Boolean +- Decimal +- Integer +- Date +- Date Time +- Time +- String +- Text +- URL +- Choice +- Quantity +- Structured + +### 3. Enter the question text + +Enter the **Question Text**. This text is the question that staff read on the form. + +Enter a **Description** for the question. The description is optional. + +### 4. Set the question settings + +Under **Question Settings**, use the **Required**, **Repeatable**, and **Read only** switches. The switches control how the question behaves. + +Note: Care hides the **Repeatable** switch for the Boolean, Group, Display, and Structured types. + +### 5. Add sub-questions to a group + +If the **Type** is **Group**, click **Add Sub-Question**. Care adds a question inside that group. + +### 6. Set the answers of a choice question + +If the **Type** is **Choice**, go to **Answer options**. Select **Custom Options** or **Value Set**. + +For **Custom Options**: + +1. Click **Add Option**. Care adds a row to the option table. +2. Enter the answer in the **Value** column. +3. Enter the text that staff read in the **Display Text** column. This text is optional. +4. Select the option in the **Default** column to make it the default answer. + +Note: If the question is repeatable, you can mark more than one option as the default. + +For **Value Set**, select a [valueset](../../../concepts/definitions/valueset.mdx), or create a new one. The valueset gives the allowed answers of the question. + +To change the order of an option, open the row menu in the **Actions** column. Under **Quick Actions**, click **Move Up**, **Move Down**, **To Top**, or **To Bottom**. To move the option to a set place, enter the number under **Move to specific position**. Then click **Move**. + +To remove an option, open the row menu in the **Actions** column. Click **Delete**. + +### 7. Change the order of the questions + +Open the menu of a question. Click **Move Up** to move the question before the question above it. Click **Move Down** to move the question after the question below it. + +To add a question in a set place, open the menu of a question. Click **Add Question Above** or **Add Question Below**. + +To remove a question, open its menu and click **Delete**. + +### 8. Save the questionnaire + +Click **Save** to save your changes to a saved questionnaire. For a new questionnaire, click **Create**. + +Note: To leave the form without saving, click **Cancel**. + +## Expected Outcome + +- The questionnaire contains the questions with the type, the settings, and the options that you set. +- The questions show in the order that you set. +- Care shows the message "Questionnaire updated successfully" when you save a saved questionnaire. + +## Related + +Concepts: + +- [Questionnaire](../../../concepts/definitions/questionnaire.mdx) +- [Valueset](../../../concepts/definitions/valueset.mdx) + +Flows: + +- [Create a questionnaire](./create-questionnaire.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire/clone-questionnaire.mdx b/versioned_docs/version-3.1/flows/definitions/questionnaire/clone-questionnaire.mdx new file mode 100644 index 00000000..7f4f8983 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire/clone-questionnaire.mdx @@ -0,0 +1,63 @@ +--- +sidebar_position: 4 +--- + +# Clone a questionnaire + +## Overview + +This flow describes how to copy a saved [questionnaire](../../../concepts/definitions/questionnaire.mdx) in Care. Care creates a new questionnaire with the same questions and layout. + +## Pre-requisites + +- The questionnaire is saved in Care, and you open it to make a copy. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create/Update Questionnaires | Lets you create the copy in each organization that you select. | + +## Steps + +### 1. Start the clone + +In the **Properties** panel, click **Clone Questionnaire**. Care opens a panel. + +Note: The **Clone Questionnaire** button shows only for a saved questionnaire. + +### 2. Set the slug + +The **Slug** field holds the slug of the original questionnaire and the suffix "-copy". Keep this value, or enter a different slug. + +### 3. Select the organizations + +Under **Add organizations**, click **Select Organizations**. + +Enter the name of an organization. Click the organization in the list. Care adds a badge under **Selected Organizations**. + +Select at least one organization. The **Clone** button stays inactive until you select an organization. + +Note: To close the panel without a copy, click **Cancel**. + +### 4. Create the copy + +Click **Clone**. Care creates the new questionnaire. + +## Expected Outcome + +- Care creates a new questionnaire with the same questions and layout as the original. +- The new questionnaire has the title of the original questionnaire and the suffix "(Clone)". +- The new questionnaire starts in Draft status. +- Care opens the new questionnaire so that you can change it. + +## Related + +Concepts: + +- [Questionnaire](../../../concepts/definitions/questionnaire.mdx) + +Flows: + +- [Create a questionnaire](./create-questionnaire.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire/create-questionnaire.mdx b/versioned_docs/version-3.1/flows/definitions/questionnaire/create-questionnaire.mdx new file mode 100644 index 00000000..479a7d4c --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire/create-questionnaire.mdx @@ -0,0 +1,94 @@ +--- +sidebar_position: 1 +--- + +# Create a questionnaire + +## Overview + +This flow describes how to create a new [questionnaire](../../../concepts/definitions/questionnaire.mdx) in Care. You give the questionnaire a title, a slug, a subject type, a status, and one or more organizations. + +## Pre-requisites + +- You are a Care superuser. Care shows the **Admin Dashboard** button only to superusers. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create/Update Questionnaires | Lets you create a new questionnaire in an organization. | + +## Steps + +### 1. Open the admin area + +Start from your dashboard. Click **Admin Dashboard**. Care opens the **Questionnaires** list. + +Note: Care shows the **Admin Dashboard** button only to superusers. + +### 2. Start a new questionnaire + +Click **Create Questionnaire**. Care opens the questionnaire form. + +### 3. Fill in the basic information + +Complete the fields under **Basic Information**. + +| Components | What it captures | +| --- | --- | +| Title | The name of the questionnaire. This field is mandatory. | +| Slug | A short identifier for the questionnaire in the web address. This field is mandatory. | +| Description | More information about the questionnaire. This field is optional. | + +Note: The slug must have 5 to 25 characters. Use letters, numbers, underscores, and hyphens only. + +### 4. Set the properties + +Go to the **Properties** panel. Set the fields below. + +| Components | What it captures | +| --- | --- | +| Status | The state of the questionnaire. Select Active, Draft, or Retired. | +| Subject Type | Who the questionnaire is about. Select Patient or Encounter. | + +Note: Care sets the **Version** value. You cannot change it. + +### 5. Select the organizations + +Under **Organizations**, click **Select Organizations**. + +Search for an organization. Click the organization to select it. Care adds a badge for each organization that you select. + +Select at least one organization. The organizations control who can see and use the questionnaire. + +Note: If you select no organization, Care does not save the form. Care shows the message "At least one organization must be selected". + +### 6. Add the questions + +Click **Add Question** to add a question to the questionnaire. For the full steps, see [Add and edit questions](./add-and-edit-questions.mdx). + +### 7. Create the questionnaire + +Click **Create**. + +Note: To leave the form without saving, click **Cancel**. + +## Expected Outcome + +- Care shows the message "Questionnaire created successfully!". +- Care creates the questionnaire. +- The questionnaire shows in the **Questionnaires** list under the tab of its status. +- Users in the selected organizations can see and use the questionnaire. + +## Related + +Concepts: + +- [Questionnaire](../../../concepts/definitions/questionnaire.mdx) + +Flows: + +- [Add and edit questions](./add-and-edit-questions.mdx) +- [Manage organizations for a questionnaire](./manage-questionnaire-organizations.mdx) +- [Clone a questionnaire](./clone-questionnaire.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/questionnaire/manage-questionnaire-organizations.mdx b/versioned_docs/version-3.1/flows/definitions/questionnaire/manage-questionnaire-organizations.mdx new file mode 100644 index 00000000..f9f25eb3 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/questionnaire/manage-questionnaire-organizations.mdx @@ -0,0 +1,72 @@ +--- +sidebar_position: 3 +--- + +# Manage organizations for a questionnaire + +## Overview + +This flow describes how to control which organizations can see and use a [questionnaire](../../../concepts/definitions/questionnaire.mdx) in Care. + +## Pre-requisites + +- The questionnaire is saved in Care, and you open it to change it. See [Create a questionnaire](./create-questionnaire.mdx). +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Create/Update Questionnaires | Lets you add or remove the organizations of a questionnaire. | + +Note: You need this permission in the current organizations of the questionnaire. You also need this permission in each organization that you add. + +## Steps + +### 1. Open the organizations panel + +Open the questionnaire that you want to change. + +In the **Properties** panel, click **Manage Organizations**. + +Care opens a panel. Under **Selected Organizations**, the panel shows the current organizations as badges. + +Note: When you create a new questionnaire, you select the organizations on the form. Care does not save the form until you select at least one organization. + +### 2. Add an organization + +Under **Add Organizations**, click **Search Organizations**. + +Enter the name of the organization that you want to add. + +Click the organization in the list. Care adds a badge for the organization. + +### 3. Remove an organization + +Find the badge of the organization that you want to remove. + +Click the cross on the badge. Care removes the badge. + +### 4. Save your changes + +Click **Save**. + +Note: The **Save** button stays inactive until you change the organizations. + +Note: To close the panel without saving, click **Cancel**. + +## Expected Outcome + +- Care shows the message "Organizations updated successfully". +- The organizations that you added can see and use the questionnaire. +- The organizations that you removed can no longer see or use the questionnaire. + +## Related + +Concepts: + +- [Questionnaire](../../../concepts/definitions/questionnaire.mdx) + +Flows: + +- [Create a questionnaire](./create-questionnaire.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/specimen-definition/_category_.json b/versioned_docs/version-3.1/flows/definitions/specimen-definition/_category_.json new file mode 100644 index 00000000..f7cd9ce6 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/specimen-definition/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Specimen Definition", + "position": 5, + "key": "definitions-specimen-definition-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/specimen-definition/create-specimen-definition.mdx b/versioned_docs/version-3.1/flows/definitions/specimen-definition/create-specimen-definition.mdx new file mode 100644 index 00000000..3dee9d86 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/specimen-definition/create-specimen-definition.mdx @@ -0,0 +1,96 @@ +--- +sidebar_position: 1 +--- + +# Create a specimen definition + +## Overview + +This flow describes how to create a new [specimen definition](../../../concepts/definitions/specimen-definition.mdx) for your facility in Care. + +## Pre-requisites + +- You are a member of the facility. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Read Specimen Definition | Lets you open the specimen definitions list of the facility. | +| Can Create Specimen Definition on Facility | Lets you create a new specimen definition for your facility. | + +## Steps + +### 1. Open the specimen definitions list + +1. Go to your facility. +2. Select **Settings**. +3. Select **Specimen Definitions**. + +### 2. Start a new definition + +Click **Add Definition**. + +### 3. Fill in the basic information + +Complete the fields under **Basic Information**. + +| Components | What it captures | +| --- | --- | +| Title | The name of the specimen definition. Required. | +| Slug | A short identifier that is unique in the facility. Care makes a slug from the title, and you can edit it. Use 5 to 25 characters. Use letters, numbers, underscores, and hyphens only. Required. | +| Status | Draft, Active, or Retired. Care selects Active. Required. | +| Derived From URI | The web address of the definition that this specimen definition is based on. Enter a complete web address. Optional. | +| Description | Extra detail about the specimen definition. Required. | + +### 4. Add the specimen details + +Complete the fields under **Specimen Details**. + +| Components | What it captures | +| --- | --- | +| Type Collected | The type of specimen to collect. Search for the type in the list. Required. | +| Collection | The method that staff use to collect the specimen. Search for the method in the list. Optional. | +| Patient Preparation | The instructions for the patient before collection. Click **Add** for each instruction. Optional. | + +### 5. Add the type tested information + +Complete the fields under **Type Tested Information**. All fields in this section are optional. + +| Components | What it captures | +| --- | --- | +| Is Derived | A switch that records if the tested specimen comes from another specimen. Care sets the switch to off. | +| Single Use | A switch that records if the laboratory uses the specimen one time only. Care sets the switch to off. | +| Preference | Preferred or Alternate. Care selects Preferred. | +| Retention time | The time that the laboratory keeps the specimen. Enter a number and select a unit. | +| Requirement | The requirements for the delivery and the special handling of the specimen. | + +Complete the fields under **Container Information** to describe the container. + +| Components | What it captures | +| --- | --- | +| Description | Extra detail about the container. | +| Cap | The cap type of the container. Search for the cap type in the list. | +| Capacity | The volume of the container. Enter a number and select a unit. | +| Minimum Volume | The smallest usable volume. Select the **Quantity** tab to enter a number and a unit. Select the **Text** tab to enter a description. | +| Preparation | The steps to prepare the container before collection. | + +### 6. Save the definition + +Click **Save**. To leave the form without saving, click **Cancel**. + +## Expected Outcome + +- Care shows the message "Specimen definition created". +- Care opens the specimen definitions list. The list shows the definitions with the Status Active. + +## Related + +Concepts: + +- [Specimen Definition](../../../concepts/definitions/specimen-definition.mdx) + +Flows: + +- [Update or retire a specimen definition](./update-or-retire-specimen-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/specimen-definition/update-or-retire-specimen-definition.mdx b/versioned_docs/version-3.1/flows/definitions/specimen-definition/update-or-retire-specimen-definition.mdx new file mode 100644 index 00000000..5b447c25 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/specimen-definition/update-or-retire-specimen-definition.mdx @@ -0,0 +1,68 @@ +--- +sidebar_position: 2 +--- + +# Update or retire a specimen definition + +## Overview + +This flow describes how to change the details of a [specimen definition](../../../concepts/definitions/specimen-definition.mdx) in a facility. It also describes how to retire a specimen definition that the facility no longer uses. + +## Pre-requisites + +- The facility has a specimen definition that you want to change. +- You have the permissions listed below. +- If you want to retire the specimen definition, its Status is Draft or Active. + +## Permissions + +| Permission | Access | +| --- | --- | +| Can Read Specimen Definition | Lets you open the specimen definitions list of the facility. | +| Can Create Specimen Definition on Facility | Lets you update or retire a specimen definition. | + +## Steps + +### 1. Open the specimen definitions list + +1. Go to the facility. +2. Select **Settings**. +3. Select **Specimen Definitions**. + +Care shows the definitions with the Status Active. To find a definition with another status, select the status in the **Status** filter. + +### 2. Update the specimen definition + +1. Find the specimen definition that you want to change. +2. Click **Edit** for that specimen definition. +3. Change the details of the specimen definition. +4. Click **Save**. + +### 3. Retire the specimen definition + +Do these steps only when the facility no longer uses the specimen definition. + +1. Find the specimen definition in the list. +2. Click **View** for that specimen definition. +3. Click **Delete**. +4. Confirm the action in the dialog. + +Note: Delete does not remove the record. Care sets the Status of the specimen definition to Retired. + +Note: Care does not show the Delete button for a specimen definition with the Status Retired. + +## Expected Outcome + +- After you update the specimen definition, Care shows the message "Specimen Definition updated". Care opens the specimen definition with your changes. +- After you retire the specimen definition, Care shows the message "Specimen definition retired successfully". Care opens the specimen definitions list. +- The retired specimen definition has the Status Retired. + +## Related + +Concepts: + +- [Specimen Definition](../../../concepts/definitions/specimen-definition.mdx) + +Flows: + +- [Create a specimen definition](./create-specimen-definition.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/valueset/_category_.json b/versioned_docs/version-3.1/flows/definitions/valueset/_category_.json new file mode 100644 index 00000000..b274e2ea --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/valueset/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Valueset", + "position": 3, + "key": "definitions-valueset-flows" +} diff --git a/versioned_docs/version-3.1/flows/definitions/valueset/build-include-and-exclude-rules.mdx b/versioned_docs/version-3.1/flows/definitions/valueset/build-include-and-exclude-rules.mdx new file mode 100644 index 00000000..8a9b64b9 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/valueset/build-include-and-exclude-rules.mdx @@ -0,0 +1,77 @@ +--- +sidebar_position: 2 +--- + +# Build include and exclude rules + +## Overview + +This flow describes how to build the include and exclude rules of a [valueset](../../../concepts/definitions/valueset.mdx) in Care. The rules decide which codes the valueset contains. + +## Pre-requisites + +- You create a new valueset, or you change an existing valueset. See [Create a valueset](./create-valueset.mdx). +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| None (Care superuser only) | Lets you change a valueset's rules. | + +## Steps + +### 1. Open the rule panels + +The valueset form has two panels: **Include rules** and **Exclude rules**. A rule in **Include rules** adds codes to the valueset. A rule in **Exclude rules** removes codes that match an include rule. + +### 2. Add a rule + +Select **Add Rule** in the panel that you want to change. + +### 3. Select the code system + +On the new rule, select a **System** from the list. Examples of a system are LOINC, SNOMED, and UCUM. + +In the **Version** box, enter the version of that system. This field is optional. + +### 4. Add exact codes + +Do these steps to put single codes in the rule: + +1. Select **Add Concept** in the **Concepts** area. Care adds a row with a **Code** box and a display box. +2. Enter the code in the **Code** box. +3. Select the verify button next to the code. Care looks up the code and fills in the display name. + +The display box shows **Unverified** until Care finds the code. After a successful lookup, Care shows the message "Code verified successfully". + +### 5. Add a filter + +A filter selects a group of codes with one condition. For example, a filter selects all codes that are a type of X. + +Do these steps to add a filter: + +1. Select **Add Filter** in the **Filters** area. Care adds a row with a **Property** box, an **Operator** box, and a **Value** box. +2. Enter the property. +3. Enter the operator. +4. Enter the value. + +### 6. Delete a rule + +To remove a rule, select the trash icon at the top of that rule. To remove one concept or one filter, select the trash icon on that row. + +## Expected Outcome + +- The valueset contains the include rules and the exclude rules that you built. +- The valueset gives the codes that match an include rule, minus the codes that match an exclude rule. + +## Related + +Concepts: + +- [Valueset](../../../concepts/definitions/valueset.mdx) + +Flows: + +- [Create a valueset](./create-valueset.mdx) +- [Preview a valueset before saving](./preview-valueset.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/valueset/create-valueset.mdx b/versioned_docs/version-3.1/flows/definitions/valueset/create-valueset.mdx new file mode 100644 index 00000000..ffed0cfb --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/valueset/create-valueset.mdx @@ -0,0 +1,76 @@ +--- +sidebar_position: 1 +--- + +# Create a valueset + +## Overview + +This flow describes how to create a new [valueset](../../../concepts/definitions/valueset.mdx) in Care. A valueset +gives a named set of codes that Care shows to users in coded fields. + +## Pre-requisites + +- You are a Care superuser. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| None (Care superuser only) | Lets you create a new valueset. | + +## Steps + +### 1. Open the valueset list + +Open the Admin sidebar. Select **Valuesets**. Care shows the **ValueSets** page. + +### 2. Start a new valueset + +Select **Create ValueSet**. Care opens the **Create New ValueSet** page. + +### 3. Fill in the valueset details + +Complete the fields in the form. + +| Components | What it captures | +| --- | --- | +| Name | The name of the valueset. This field is required. When you type the name, Care fills in a matching **Slug**. | +| Slug | A short identifier that Care uses in links. This field is required. Use 5 to 25 characters. Use letters, numbers, underscores, and hyphens only. | +| Description | More information about the valueset. This field is optional. | +| Status | The stage of the valueset: **Active**, **Draft**, **Retired**, or **Unknown**. Care selects **Active** for a new valueset. | + +### 4. Add the rules + +Add a minimum of one rule to **Include rules**. For the full procedure, see +[Build include and exclude rules](./build-include-and-exclude-rules.mdx). + +### 5. Preview the codes + +Before you save, you can see which codes match your rules. For the full procedure, see +[Preview a valueset before saving](./preview-valueset.mdx). + +### 6. Save the valueset + +Select **Save ValueSet**. To leave the page without a change, select **Cancel**. + +Note: Only a Care superuser can save a new valueset. The page shows the same +controls to every user. + +## Expected Outcome + +- Care creates the valueset with the name, slug, and status that you entered. +- Care shows the new valueset in the valueset list. +- Care shows the codes from the valueset in the coded fields that use this valueset. + +## Related + +Concepts: + +- [Valueset](../../../concepts/definitions/valueset.mdx) + +Flows: + +- [Build include and exclude rules](./build-include-and-exclude-rules.mdx) +- [Preview a valueset before saving](./preview-valueset.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/valueset/preview-valueset.mdx b/versioned_docs/version-3.1/flows/definitions/valueset/preview-valueset.mdx new file mode 100644 index 00000000..d56f8c2f --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/valueset/preview-valueset.mdx @@ -0,0 +1,55 @@ +--- +sidebar_position: 3 +--- + +# Preview a valueset before saving + +## Overview + +This flow describes how to test the rules of a new [valueset](../../../concepts/definitions/valueset.mdx) in Care before you save it. Care runs your search against the include rules and the exclude rules that you set up. + +## Pre-requisites + +- You are creating a new valueset. +- You added a minimum of one include rule. See [Build include and exclude rules](./build-include-and-exclude-rules.mdx). +- You have the permissions listed below. + +Note: Care shows the **Valueset Preview** button only while you create a new valueset. The button is not available after you save the valueset. + +## Permissions + +| Permission | Access | +| --- | --- | +| None (Care superuser only) | Lets you preview a valueset you are creating. | + +## Steps + +### 1. Open the preview panel + +Select **Valueset Preview**. Care opens the **Valueset Preview** panel. + +### 2. Search for a code + +Enter your search text in the **Search for a concept in this valueset** box. Care runs the search against the include rules and the exclude rules that you set up. Care runs the search before you save the valueset. + +### 3. Check the results + +Care shows the matching concepts below the search box. Confirm that your rules return the codes that you want. If no concept matches, Care shows **No Results Found**. + +Note: To close the panel, press Escape. + +## Expected Outcome + +- Care shows the codes that match your include rules and your exclude rules. +- You confirm that your rules are correct before you save the valueset. + +## Related + +Concepts: + +- [Valueset](../../../concepts/definitions/valueset.mdx) + +Flows: + +- [Create a valueset](./create-valueset.mdx) +- [Build include and exclude rules](./build-include-and-exclude-rules.mdx) diff --git a/versioned_docs/version-3.1/flows/definitions/valueset/update-or-retire-valueset.mdx b/versioned_docs/version-3.1/flows/definitions/valueset/update-or-retire-valueset.mdx new file mode 100644 index 00000000..96e4d258 --- /dev/null +++ b/versioned_docs/version-3.1/flows/definitions/valueset/update-or-retire-valueset.mdx @@ -0,0 +1,73 @@ +--- +sidebar_position: 4 +--- + +# Update or retire a valueset + +## Overview + +This flow describes how to change the details of a [valueset](../../../concepts/definitions/valueset.mdx) in Care. It also describes how to retire a valueset that you no longer use. + +## Pre-requisites + +- You are a Care superuser. +- The valueset is already in Care. +- You have the permissions listed below. + +## Permissions + +| Permission | Access | +| --- | --- | +| None (Care superuser only) | Lets you update or retire a valueset. | + +## Steps + +### 1. Open the valueset + +1. Open the Admin sidebar. +2. Select **Valuesets**. +3. Select the status tab of the valueset. Care shows the **Active** tab first. +4. To find the valueset by name, enter the name in the **Search ValueSets** box. +5. Select **Edit** on the row of the valueset. + +Note: Care marks some valuesets as system-defined. These valuesets come with Care, and other parts of Care depend on them. Care shows **View** in place of **Edit** on these rows. Do not change a system-defined valueset. + +### 2. Change the valueset details + +Change any of these fields: + +| Components | What it captures | +| --- | --- | +| Name | The name of the valueset. | +| Slug | The short identifier that Care uses in links. | +| Description | The purpose of the valueset. | +| Status | The current stage of the valueset. | +| Include rules | The rules that add codes to the valueset. | +| Exclude rules | The rules that remove codes from the valueset. | + +Select **Save ValueSet**. To leave the page without a change, select **Cancel**. + +### 3. Retire the valueset + +Do this step only when you no longer use the valueset. + +1. Set **Status** to **Retired**. +2. Select **Save ValueSet**. + +Note: Care has no delete action for a valueset. Retire the valueset instead. + +## Expected Outcome + +- Care saves your changes to the valueset. +- If you set the status to Retired, Care shows the valueset as retired. + +## Related + +Concepts: + +- [Valueset](../../../concepts/definitions/valueset.mdx) + +Flows: + +- [Create a valueset](./create-valueset.mdx) +- [Build include and exclude rules](./build-include-and-exclude-rules.mdx) diff --git a/versioned_sidebars/version-3.1-sidebars.json b/versioned_sidebars/version-3.1-sidebars.json index fa6597b2..3b2a2c43 100644 --- a/versioned_sidebars/version-3.1-sidebars.json +++ b/versioned_sidebars/version-3.1-sidebars.json @@ -513,6 +513,84 @@ ] } ] + }, + { + "type": "category", + "label": "Definitions", + "key": "definitions-flows", + "items": [ + { + "type": "category", + "label": "Questionnaire", + "key": "definitions-questionnaire-flows", + "items": [ + "flows/definitions/questionnaire/create-questionnaire", + "flows/definitions/questionnaire/add-and-edit-questions", + "flows/definitions/questionnaire/manage-questionnaire-organizations", + "flows/definitions/questionnaire/clone-questionnaire" + ] + }, + { + "type": "category", + "label": "Questionnaire Response Template", + "key": "definitions-questionnaire-response-template-flows", + "items": [ + "flows/definitions/questionnaire-response-template/create-response-template", + "flows/definitions/questionnaire-response-template/apply-response-template", + "flows/definitions/questionnaire-response-template/update-or-delete-response-template" + ] + }, + { + "type": "category", + "label": "Valueset", + "key": "definitions-valueset-flows", + "items": [ + "flows/definitions/valueset/create-valueset", + "flows/definitions/valueset/build-include-and-exclude-rules", + "flows/definitions/valueset/preview-valueset", + "flows/definitions/valueset/update-or-retire-valueset" + ] + }, + { + "type": "category", + "label": "Observation Definition", + "key": "definitions-observation-definition-flows", + "items": [ + "flows/definitions/observation-definition/create-observation-definition", + "flows/definitions/observation-definition/set-up-qualified-ranges", + "flows/definitions/observation-definition/update-or-retire-observation-definition" + ] + }, + { + "type": "category", + "label": "Specimen Definition", + "key": "definitions-specimen-definition-flows", + "items": [ + "flows/definitions/specimen-definition/create-specimen-definition", + "flows/definitions/specimen-definition/update-or-retire-specimen-definition" + ] + }, + { + "type": "category", + "label": "Activity Definition", + "key": "definitions-activity-definition-flows", + "items": [ + "flows/definitions/activity-definition/create-activity-definition", + "flows/definitions/activity-definition/link-requirements-to-activity-definition", + "flows/definitions/activity-definition/update-or-retire-activity-definition", + "flows/definitions/activity-definition/use-activity-definition-to-order-a-service" + ] + }, + { + "type": "category", + "label": "Charge Item Definition", + "key": "definitions-charge-item-definition-flows", + "items": [ + "flows/definitions/charge-item-definition/create-charge-item-definition", + "flows/definitions/charge-item-definition/update-or-retire-charge-item-definition" + ] + } + ] } ] }, From 1810a0e676948e925186f697a733d4d84152ebad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 13 Aug 2026 06:12:18 +0000 Subject: [PATCH 2/2] Fix docs reviewer workflow copilot CLI path Co-authored-by: aravindm4 <92707064+aravindm4@users.noreply.github.com> --- .github/workflows/docs-reviewer.lock.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-reviewer.lock.yml b/.github/workflows/docs-reviewer.lock.yml index 0caac32d..5c517af9 100644 --- a/.github/workflows/docs-reviewer.lock.yml +++ b/.github/workflows/docs-reviewer.lock.yml @@ -874,7 +874,7 @@ jobs: fi # shellcheck disable=SC1003,SC2016,SC2086 awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env ACTIONS_ID_TOKEN_REQUEST_TOKEN --exclude-env ACTIONS_ID_TOKEN_REQUEST_URL --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --skip-pull \ - -- /bin/bash -c 'set +o histexpand; export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --reasoning-effort high --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + -- /bin/bash -c 'set +o histexpand; export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --reasoning-effort high --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE @@ -1479,7 +1479,7 @@ jobs: fi # shellcheck disable=SC1003,SC2016,SC2086 awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env ACTIONS_ID_TOKEN_REQUEST_TOKEN --exclude-env ACTIONS_ID_TOKEN_REQUEST_URL --exclude-env COPILOT_GITHUB_TOKEN --log-level info --skip-pull \ - -- /bin/bash -c 'set +o histexpand; : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --reasoning-effort high --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log + -- /bin/bash -c 'set +o histexpand; : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --reasoning-effort high --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log env: AWF_REFLECT_ENABLED: 1 COPILOT_AGENT_RUNNER_TYPE: STANDALONE