Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 57 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,60 @@ package: https://github.com/openmrs/openmrs-content-referenceapplication-demo
Generally, the goal is to make the "referenceapplication" content package free from content that an
implementation might need to customize and to stick to only core content backing specific things. For example,
the O3 Login page requires that the "Login Location" tag be available (and associated with at least one
location), but locations vary by implementation and even site, so this package just contains the tag.
Similarly, the Immunization feature requires the CIEL Immunization History concept set to structure obs so
this is included but the list of immunizations should not be.
location), but locations vary by implementation and even site, so this package contains the tag and puts it
on the one location that is not a site's choice: the "Unknown Location" openmrs-core creates in every
database. It defines no facility of its own. Similarly, the Immunization feature requires the CIEL
Immunization History concept set to structure obs so this is included but the list of immunizations should
not be.

## What's here

Metadata that **must be set this way** — an O3 app or module resolves it by uuid, code or name, so an
implementation changing it breaks the feature rather than customising it:

- **Encounters** — the encounter types and encounter roles that O3's apps and the emrapi mappings
reference by uuid.
- **Access control** — the `Privilege Level: Full`/`High` roles, the `Application: ...` roles that O3
checks by name, and the module privileges they grant.
- **emrapi wiring** — the metadata source, and the term mappings whose *targets* are fixed
(`emr.admissionEncounterType`, `emr.visitNoteEncounterType`, `emr.clinicianEncounterRole`, ...).
- **ADT** — the dispositions, and the ADT concepts they resolve against by concept code.
- **Vitals** — the vital sign concepts `esm-patient-vitals-app` resolves by uuid, and the `Vital signs`
convenience set.
- **Dictionaries a feature depends on structurally** — the allergy set, dosing units, dispensing
statuses, frequencies, cause of death, stock management concepts.

What an implementation may reasonably want its own version of stays in the demo package, even when O3
needs *something* there: locations, the identifier types and their generator, visit types, order
frequencies, relationship and person attribute types, procedure types, reference ranges, print
defaults, programs, forms, service queues, appointment services, the formulary, the lab and diagnosis
catalogs and the address hierarchy.

That distinction is the point, and it is not the same as "needed to run O3" — most of what is in the
demo package is strictly necessary too. The question is whether a site should be **able** to change it.

### The one bootstrap exception

Locations are the canonical thing an implementation defines for itself, so this package defines **no
facility**. But O3's login page only offers locations tagged `Login Location`, so with the demo package
left out there is nothing to log in *to*. The compromise here is to tag the one location that is not a
site's choice — the `Unknown Location` openmrs-core creates in every database — as a `Login Location`, a
`Visit Location` and a `Queue Location`. No facility is invented and no uuid is created.

`Queue Location` is not optional decoration: `/home` resolves to the Service Queues dashboard, and with
no location carrying that tag `@openmrs/esm-service-queues-app` throws
`Cannot read properties of undefined (reading 'id')`, so the first screen after login is an error page.
Deliberately *not* tagged: `Admission Location` and `Transfer Location` (admitting a patient to "Unknown
Location" is meaningless — a site tags its own wards) and `Facility Location`.

This is a bootstrap concern rather than content, and it arguably belongs in a separate minimal package
alongside an identifier source and a visit type, so that a distribution can boot before an
implementation has authored anything. Until such a package exists it lives here. It is a placeholder,
not a facility: a site is expected to add its own locations, tag those, and retire `Unknown Location` —
anything recorded against it in the meantime stays attached to it.

**Logging in is as far as this package gets you.** Measured on a distribution built from it alone, with
no demo package: login completes and every O3 route renders, but there are no visit types and no idgen
identifier source, so you cannot start a visit and O3's registration has nothing to generate a primary
identifier from. Both are things a site defines for itself, so they stay in the demo package by design —
an implementation is expected to supply them, using that package as the worked example.
2 changes: 2 additions & 0 deletions configuration/backend_configuration/concepts/convsets.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Uuid,Void/Retire,Same as mappings,Fully specified name:en,Fully specified name:fr,Short name:en,Short name:fr,Description:en,Description:fr,Data class,Data type,Answers,Members,_version:1,_order:1001
1114AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:1114;AMPATH:1114;PIH:1335,Vital signs,Signes vitaux,Vital Signs,Signes vitaux,Convenience set. Listing of vital signs.,,ConvSet,N/A,,5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;1343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;5283AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Uuid,Void/Retire,Same as mappings,Fully specified name:en,Fully specified name:fr,Fully specified name:es,Short name:en,Short name:fr,Short name:es,Description:en,Description:fr,Description:es,Data class,Data type,_version:1,_order:500
488b58ff-64f5-4f8a-8979-fa79940b1594,true,,False,Faux,Falso,,,,,,,Misc,N/A,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Uuid,Void/Retire,Same as mappings,Fully specified name:en,Fully specified name:fr,Short name:en,Short name:fr,Description:en,Description:fr,Data class,Data type,Absolute low,Critical low,Normal low,Normal high,Critical high,Absolute high,Units,Allow decimals,Display precision,_version:1,_order:1000
5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5085;PIH:5085;AMPATH:5085;SNOMED CT:271649006,Systolic blood pressure,Tension arterielle systolique,SBP,,A patient's systolic blood pressure measurement (taken with a manual cuff in either a sitting or standing position),,Finding,Numeric,0,85,100,140,180,250,mmHg,No,,,
5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5086;PIH:5086;AMPATH:5086;SNOMED CT:271650006;LOINC:35094-2,Diastolic blood pressure,Tension arterielle diastolique,DBP,,A patient's diastolic blood pressure measurement (taken with a manual cuff in either a sitting or standing position),,Finding,Numeric,0,40,55,90,120,150,mmHg,No,,,
5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5088;PIH:5088;AMPATH:5088,Temperature (c),Température (c),Temp (c),,Patient's temperature in degrees centigrade.,,Finding,Numeric,25,,35,37.7,39,43,DEG C,Yes,,,
5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5090;PIH:5090;AMPATH:5090,Height (cm),Taille (cm),HT,,Patient's height in centimeters.,,Finding,Numeric,10,,,,,272,cm,Yes,,,
5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5089;PIH:5089;AMPATH:5089,Weight (kg),Poids (kg),WT,,Patient's weight in kilograms.,,Finding,Numeric,0,,,,,250,kg,Yes,,,
5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5087;PIH:5087;AMPATH:5087;SNOMED CT:78564009,Pulse,Pouls,HR,,"Patient pulse rate, as measured with a peripheral oximeter.",,Finding,Numeric,0,49,55,100,130,230,beats/min,No,,,
1343AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:1343;PIH:1290;AMPATH:1343;SNOMED CT:284473002,Mid-upper arm circumference,Circonférence du haut du bras,MUAC,,"MUAC is the circumference of the left upper arm, measured at the mid-point between the tip of the shoulder and the tip of the elbow. MUAC is useful for the assessment of nutritional status.",,Finding,Numeric,,,,,,,cm,Yes,,,
5242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5242;PIH:5242;AMPATH:5242;SNOMED CT:86290005,Respiratory rate,Rythme respiratoire,RR,,Measured respiratory rate in breaths per minute,Frequence respiratoire,Finding,Numeric,0,8,12,18,26,999,breaths/min,No,,,
5283AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5283;AMPATH:5283,Karnofsky performance score,,KPS,,"Zero to 100 scale commonly used for assessing terminally ill patients.",,Finding,Numeric,,,,,,,%,,0,,
5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:5092;AMPATH:5092;SNOMED CT:431314004,Arterial blood oxygen saturation (pulse oximeter),Saturation d'oxygène dans le sang,SpO2,,"Oxygen saturation, as measured from a peripheral oximeter.",,Finding,Numeric,0,90,95,,,100,%,Yes,,,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Uuid,Void/Retire,Same as mappings,Fully specified name:en,Fully specified name:fr,Fully specified name:es,Short name:en,Short name:fr,Short name:es,Description:en,Description:fr,Description:es,Data class,Data type,_version:1,_order:1000
165095AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:165095,General patient note,,,,,,A general patient note,,,Question,Text,,
162169AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,CIEL:162169,Text of encounter note,,,,,,Free text note field intended to capture unstructured description of the patient encounter,,,Question,Text,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"uuid": "66de7f60-b73a-11e2-9e96-0800200c9a66",
"name": "disposition.admit",
"type": "ADMIT",
"conceptCode": "CIEL:168619",
"actions": [],
"additionalObs": []
},
{
"uuid": "8297651b-4046-11ef-ba6a-0242ac120002",
"name": "disposition.transfer",
"type": "TRANSFER",
"conceptCode": "CIEL:167731",
"actions": [],
"additionalObs": []
},
{
"uuid": "12129630-b698-11e2-9e96-0800200c9a66",
"name": "disposition.discharge",
"type": "DISCHARGE",
"conceptCode": "CIEL:169401",
"actions": [],
"additionalObs": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Uuid,Void/Retire,Name,Description
a0b03050-c99b-11e0-9572-0800200c9a66,,Unknown,Unknown encounter role for legacy providers with no encounter role set
240b26f9-dd88-4172-823d-4a8bfeb7841f,,Clinician,"Doctor or Nurse who is the primary provider for an encounter, and will sign the note"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Uuid,Void/Retire,Name,Description,View privilege,Edit privilege,_order:1000
0e8230ce-bd1d-43f5-a863-cf44344fa4b0,,Adult Visit,Encounter for adult visit form,,,,
dd528487-82a5-4082-9c72-ed246bd49591,,Consultation,Consultation encounter,,,,
ca3aed11-1aa4-42a1-b85c-8332fc8001fc,,Check In,Indicates the patient has done the required paperwork and check-in to begin a visit to the clinic/hospital.,,,
67a71486-1a54-468f-ac3e-7091a9a79584,,Vitals,For capturing vital signs,,,
e22e39fd-7db2-45e7-80f1-60fa0d5a4378,,Admission,"Indicates that the patient has been admitted for inpatient care, and is not expected to leave the hospital unless discharged.",,,
181820aa-88c9-479b-9077-af92f5364329,,Discharge,"Indicates that a patient's inpatient care at the hospital is ending, and they are expected to leave soon.",,,
d7151f82-c1f3-4152-a605-2f9ea7414a79,,Visit Note,"Encounter where a full or abbreviated examination is done, usually leading to a presumptive or confirmed diagnosis, recorded by the examining clinician.",,,
25a042b2-60bc-4940-a909-debd098b7d82,,Check Out,The patient is explicitly leaving the hospital/clinic. (Usually no formal encounter is captured for this.),,,
7b68d557-85ef-4fc8-b767-4fa4f5eb5c23,,Intra-Hospital Transfer,Indicates that a patient is being transferred into a different department within the hospital. (Transfers out of the hospital should not use this encounter type.),,,
5021b1a1-e7f6-44b4-ba02-da2f2bcf8718,,Attachment Upload,Encounters used to record uploads of attachments.,,,
3596fafb-6f6f-4396-8c87-6e63a0f1bd71,,Lab Results,Encounter for capturing lab results,,,
39da3525-afe4-45ff-8977-c53b7b359158,,Order,Encounter for capturing orders,,,
29c02aff-9a93-46c9-bf6f-48b552fcb1fa,,Immunizations,Encounter for capturing immunizations,,,
36db5123-0ad5-41c0-9037-625b46e0ceef,,Mental Health Assessment,Mental Health Assessment,,,
d3b07384-8d1c-4e6b-9b8e-2f3b8e4a1c9f,,Transfer,Indicates that a patient is being transferred into a different department within the hospital. (Transfers out of the hospital should not use this encounter type.),,,
a1f5c3d2-4b6e-4e8a-9f2d-1b3e8e4a2d7f,,Inpatient Note,A short free-text note written by a clinician about an inpatient during their stay,,,
b2c4d5e6-7f8a-4e9b-8c1d-2e3f8e4a3b8f,,Transfer Request,A stand-alone encounter type for a transfer request not part of a larger note,,,
f47ac10b-58cc-4372-a567-0e02b2c3d479,,Bed Assignment,Assigning a new bed to a patient without admitting or transferring them,,,
550e8400-e29b-41d4-a716-446655440000,,Cancel ADT,An encounter that notes that a request to admit/transfer/discharge a patient is being overridden,,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<config>
<globalProperties>
<globalProperty>
<property>order.drugDosingUnitsConceptUuid</property>
<value>162384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</value>
</globalProperty>
<globalProperty>
<property>order.drugRoutesConceptUuid</property>
<value>162394AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</value>
</globalProperty>
<globalProperty>
<property>order.drugDispensingUnitsConceptUuid</property>
<value>162402AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</value>
</globalProperty><globalProperty>
<property>order.durationUnitsConceptUuid</property>
<value>1732AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</value>
</globalProperty>
</globalProperties>

</config>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<config>
<globalProperties>
<globalProperty>
<property>fhir2.administeringEncounterRoleUuid</property>
<value>240b26f9-dd88-4172-823d-4a8bfeb7841f</value>
</globalProperty>
</globalProperties>
</config>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<config>
<globalProperties>
<!-- This requires that the sort weight for priority concepts be maintained in order of least to most urgent -->
<globalProperty>
<property>queue.sortWeightGenerator</property>
<value>basicPrioritySortWeightGenerator</value>
</globalProperty>

<!-- Cause of Death, from the DeathCause OCL package in this content package -->
<globalProperty>
<property>concept.causeOfDeath</property>
<value>9272a14b-7260-4353-9e5b-5787b5dead9d</value>
</globalProperty>

</globalProperties>
</config>
2 changes: 2 additions & 0 deletions configuration/backend_configuration/locations/locations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Uuid,Void/Retire,Name,Description,Parent,Tag|Login Location,Tag|Visit Location,Tag|Facility Location,Tag|Queue Location,Tag|Admission Location,Tag|Appointment Location,Tag|Transfer Location,Address 1,Address 2,Address 3,Address 4,Address 5,Address 6,City/Village,County/District,State/Province,Postal Code,Country,_order:1000
8d6c993e-c2cc-11de-8d13-0010c6dffd0f,,Unknown Location,Unknown Location,,TRUE,TRUE,,TRUE,,,,,,,,,,,,,,,
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Uuid,Void/Retire,Mapping code,Mapping source,Metadata class name,Metadata Uuid,_order:2000
e1a1b2c3-d4e5-6789-0abc-def123456789,,emr.admissionEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,e22e39fd-7db2-45e7-80f1-60fa0d5a4378,
f2b3c4d5-e6f7-8901-2bcd-ef3456789012,,emr.exitFromInpatientEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,181820aa-88c9-479b-9077-af92f5364329,
a3c4d5e6-f7g8-9012-3cde-f45678901234,,emr.transferWithinHospitalEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,d3b07384-8d1c-4e6b-9b8e-2f3b8e4a1c9f,
b4d5e6f7-g8h9-0123-4def-567890123456,,emr.inpatientNoteEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,a1f5c3d2-4b6e-4e8a-9f2d-1b3e8e4a2d7f,
c5e6f7g8-h9i0-1234-5ef0-678901234567,,emr.transferRequestEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,b2c4d5e6-7f8a-4e9b-8c1d-2e3f8e4a3b8f,
c9d6f8e2-3b4a-4e6b-9f8e-1a2b3c4d5e6f,,emr.clinicianEncounterRole,org.openmrs.module.emrapi,org.openmrs.EncounterRole,240b26f9-dd88-4172-823d-4a8bfeb7841f,
d039435f-233a-4d0b-a35a-75450b2e65b9,,emr.bedAssignmentEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,f47ac10b-58cc-4372-a567-0e02b2c3d479,
e9ae298d-532c-4f72-93c1-a42495270662,,emr.cancelADTRequestEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,550e8400-e29b-41d4-a716-446655440000,
efe66933-eeb3-4aa3-8cb8-501f82361c48,,emr.visitNoteEncounterType,org.openmrs.module.emrapi,org.openmrs.EncounterType,d7151f82-c1f3-4152-a605-2f9ea7414a79,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading