Skip to content

Core metadata and configuration included in all PIH distributions

Notifications You must be signed in to change notification settings

tommyiversonj/openmrs-module-pihcore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openmrs-module-pihcore

Core metadata and configuration included in all PIH distributions

Legacy means for code level configuration of metadata is found in this project (we are in the progress of migrating much of this to Iniz-based deployment in the openmrs-config-pihemr project). Metadata is set up programmatically in pih-core via methods provided by the metadata deploy module.

Some metadata which is shared across all sites is in metadata/core.

Some site-specific metadata is under directories organized by country. For example, Location and Patient Identifier Type for Mexico is under metadata/mexico.

Config Constants

Constants from the constants.yml files of the openmrs-config-* repositories are available in code. From each constants.yml file, a constants class is generated by the generate-constants-class goal of openmrs-packager-maven-plugin. See the relevant part of api/pom.xml.

For example a constant in openmrs-config-pihemr at concept.yes.uuid will be transformed into PihEmrConfigConstants.CONCEPT_YES_UUID.

To see local changes in a config repo reflected in pihcore in your IDE:

  • Run mvn clean install in the config repo
  • Reimport Maven projects in your IDE
  • Run mvn generate-sources in this project

Integration Tests

By convention, all integration tests end with "IT". Currently, these integration tests are used to run test executions that rely on MySQL and utilize the testcontainers library to orchestrate Docker container startup, shutdown, and cleanup needed for test execution. By default, these tests will not run during a standard build.

In order to run the Integration Tests during the build, one should use the "integration-test" profile:

mvn clean install -Pintegration-test

HTMLFormEntry Features

This module also defines a few HTML Form Entry features.

Tag familyHistoryRelativeCheckboxes

Usage:

<familyHistoryRelativeCheckboxes concept="uuid-of-asthma" label="Asthma" relatives="uuid-of-father,uuid-of-mother"/>

produces Asthma: [ ]Father [ ]Mother

<familyHistoryRelativeCheckboxes concept="uuid-of-cancer" label="Cancer" relatives="uuid-of-father,uuid-of-mother" specify="true"/>

produces Cancer, specify:________ [ ]Father [ ]Mother

For each relative box that is checked, an obs group will be stored with concept CIEL:160593 and members:

  • which disease? CIEL:160592 = @concept
  • which relative? CIEL:1560 = @relatives[i]
  • present? CIEL:1729 = YES
  • comments? CIEL:160618 = comment text

Tag pastMedicalHistoryCheckbox

Usage:

<pastMedicalHistoryCheckbox concept="uuid-of-asthma" />

produces [ ] Asthma

<pastMedicalHistoryCheckbox concept="uuid-of-STI" label="STI" specify="true"/>

produces [ ] STI, specify:_______

If you don't specify label, the preferred concept name in the context locale will be used.

If checked, will be stored as an obs group with concept CIEL:1633, and members:

  • which? CIEL:1628 = @concept
  • present? CIEL:1729 = YES
  • comments: CIEL:160221 = comment text

Tag causeOfDeathList

?

RedirectToDeathNoteIfMissing

When included in a form, upon any save (of a new or edited form) if all the following are true, then the user is redirected to fill out a new death certificate:

  • this form's encounter's disposition is Death
  • the user has the privilege to enter a Death Certificate
  • the patient has no non-voided Death Certificate encounter

Usage within an HTML Form:

<postSubmissionAction class="org.openmrs.module.pihcore.htmlformentry.RedirectToDeathNoteIfMissing"/>

Velocity context

The PIH Config is added to the Velocity context as config.

About

Core metadata and configuration included in all PIH distributions

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 66.2%
  • JavaScript 15.9%
  • Groovy 10.3%
  • SCSS 7.6%