Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EA-182 - Update minimum OpenMRS version to 2.2.1 and consolidate legacy code #225

Merged
merged 46 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
71c0b99
Initial analysis of functionality added to README
mseaton May 2, 2024
d29f02e
Increase OpenMRS version requirement to 2.2.0 and remove all pre-2.2 …
mseaton May 4, 2024
afe863a
Move api-1.12 into api
mseaton May 4, 2024
3b96c5e
Move api-2.2 into api
mseaton May 4, 2024
a75e53d
Move web-2.2 into omod
mseaton May 4, 2024
690da90
Increase version to 2.2.1 to match required version from web-2.2
mseaton May 4, 2024
f183496
Consolidate different versions of EmrOrderService
mseaton May 4, 2024
76bbdf5
Move OrderMetadataService
mseaton May 4, 2024
a7aeb88
Consolidate ObservationMapper version and ObsBuilder versions
mseaton May 4, 2024
47511e5
Consolidate ObsMapper versions
mseaton May 4, 2024
434e8c3
Consolidate ObsMapper versions (move tests)
mseaton May 4, 2024
b79690f
Consolidate DrugMapper and OrderMapper versions
mseaton May 5, 2024
285f49b
Rename 1.12 files
mseaton May 5, 2024
a0765b7
Update REST versions
mseaton May 5, 2024
97c2e32
Update reporting module dependencies to reflect increased OpenMRS pla…
mseaton May 5, 2024
543161a
Unit test fixes following upgrade to depend on 2.2
mseaton May 5, 2024
48c08bf
Unit test fixes following upgrade to depend on 2.2
mseaton May 5, 2024
97552f9
Unit test fixes following upgrade to depend on 2.2
mseaton May 5, 2024
066a353
Consolidate 2_2 implementations
mseaton May 5, 2024
d416870
Revert "Consolidate 2_2 implementations"
mseaton May 5, 2024
a9c6453
Remove provider name tests that are not supported in OpenMRS 2.2+
mseaton May 5, 2024
4e2e588
Fix test failing due to millis precision
mseaton May 6, 2024
57d7497
Fix test failing due to millis precision
mseaton May 6, 2024
be862f2
Fix metadata mapping and sharing versions
mseaton May 6, 2024
229287b
Fix test data creation
mseaton May 6, 2024
d366b69
Fix missing status column for obs in test data
mseaton May 6, 2024
0a611fb
Fix test data creation
mseaton May 6, 2024
0730149
Fix test data creation
mseaton May 6, 2024
65c65d3
Fix test data creation
mseaton May 6, 2024
391c487
Add assertion to fix out of range error on failure
mseaton May 6, 2024
d280a21
Consolidate diagnosis service implementations
mseaton May 6, 2024
4a42d3c
Consolidate 2_2 classes
mseaton May 6, 2024
6dbae27
Remove EmrVisitService in favor of DiagnosisService as all methods ar…
mseaton May 6, 2024
df5c208
Fix code that returned incorrect results
mseaton May 6, 2024
2e3d7eb
Fix unit test to use appropriate diagnosis service
mseaton May 6, 2024
730c2b6
Ignore out unit test that fails due to multi-threading and configuration
mseaton May 6, 2024
34b2292
Initial fix of omod tests
mseaton May 6, 2024
760615e
Additional fix of omod tests
mseaton May 6, 2024
b74e0ce
Additional fix of omod tests
mseaton May 6, 2024
0f9e11e
Attempt to fix intermittent error with transient object saving
mseaton May 6, 2024
562bad2
Remove legacy condition code
mseaton May 6, 2024
8b63bc9
Revert "Remove legacy condition code"
mseaton May 6, 2024
4d66675
Remove custom CareSettingType in favor of the core version
mseaton May 23, 2024
9ffa6fa
Update README
mseaton May 23, 2024
1804762
Merge branch 'master' into EA-182
mseaton May 23, 2024
1c58efc
Removing directories that were re-added during merge
mseaton May 23, 2024
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
144 changes: 142 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,145 @@
openmrs-module-emrapi
====================

Higher-level APIs to support building EMR functionality in OpenMRS, to supplement the data-level APIs
in the OpenMRS core.
Higher-level APIs to support building EMR functionality in OpenMRS, to supplement the data-level APIs in the OpenMRS core.

# Dependencies

## Required core version

* 2.2.1

## Required modules

* reporting (+ serialization.xstream, htmlwidgets, calculation)
* providermanagement
* metadatamapping
* event
* webservices.rest

## Aware of modules

* fhir2
* metadatasharing

# Configuration

* EmrApiProperties + EmrApiConstants wraps much of the configuration, much of which is in GPs and metadata mappings

# Startup

* Creates a role named "Privilege Level: Full", if it doesn't exist, and ensures it has every privilege that does not start with "App:" or "Task:"
* Creates a role named "Privilege Level: High", if it doesn't exist, and ensures it has every privilege that does not start with "App:" or "Task:" and is not in a list of "unsafe" privileges
* Creates metadata source, metadata mappings, and metadata sets that are required for the configuration
* Creates an "Unknown Provider" provider if it does not exist
* Sets default visit assignment handler via global property
* Sets up the patient viewed event listener subscription
* Ensures the person image folder exists

# API

## account

* AccountDomainWrapper - wrapper for Person + User + Provider with methods for getting and manipulating account-related data
* AccountService - CRUD operations for AccountDomainWrapper and opinionated methods for getting roles and privileges
* AccountValidator - validates an AccountDomainWrapper
* ProviderIdentifierGenerator - interface for generating a provider identifier

## adt

* Provides higher level APIs around Admission, Discharge, and Transfer
* These are based on the "Disposition" configuration in DispositionService / DispositionDescriptor and metadata in EmrApiProperties
* A/D/T based around specific encounter type and optional form
* Provides an implementation of automatically creating visits and assigning encounters to visits with appropriate visit types, if no visit is associated with the encounter
* Provides an implementation of closing "stale" visits and a scheduled task to automate this
* Provides additional service methods to manage visits, ensure active visit, deal with overlapping visits, manage visit locations, enter retrospective visits
* Provides implementations for merging patients and merging visits
* Provides APIs for creating checkin encounters, adt encounters, and identify and get inpatient visits

* (reporting module) definitions and evaluators for getting:
* AwaitingAdmissionVisitQuery - any Visits that are in the state of "awaiting admission"
* MostRecentAdmissionRequestVisitDataDefinition - data from a Visit relevant for "admission request"

## concept

* Provides additional service methods for getting and searching for concepts

## db

* Various utility classes for dealing with DB and Hibernate queries and access and DAO implementations in support of other services

## descriptor

* Utilities for working defining concept sets and members and creating and manipulating obs groups

## diagnosis

* Diagnosis and CodedOrFreeTextAnswer wrapper classes to represent a diagnosis as a concept set / obs group
* Deprecated services and utility classes (is core as of 2.2) related to Diagnosis

## disposition

* Concept Set / Obs Group specification for modeling a disposition
* Configuration relating disposition to Admission / Discharge / Transfer
* Json parsing and handling specification for reading in a dispositionConfig.json that determines how disposition obs behave
* Services and DispositionAction interface and implementations for performing operations as a result of a disposition

## domainwrapper

* Utility classes for creating and manaing domain wrapper classes

## encounter

* EncounterTransaction that provides a json model object for encounter, obs, order, diagnosis, disposition, providers, and additional extensions and context
* Mappers to convert to/from data and EncounterTransaction / json
* Matcher interface and base implementations to find an existing Encounter given a set of parameters
* Processor interface for reading and saving Encounter and EncounterTransaction
* Service methods to leverage the other entities to enable saving/finding/retrieving encounters based on the EncounterTransaction construct
* Logic for handling evolution of Orders through to OpenMRS 1.9

## event

* Basic interface and implementation for publishing events with the event module whenever a user views a patient
* Event listener on patient view events to track in the user's property of emrapi.lastViewedPatientIds

## exitfromcare

* Service with methods to close/reopen programs, visits, patient death information

## merge

* Interfaces for PatientMergeAction and VisitMergeAction, used within the merge methods in the adt package
* Should really have this and the service methods in the adt package together

## metadata

* Utility classes for mds import specifications, likely no longer used

## patient

* PatientDomainWrapper - convenience methods around Patient and related tables, including primary identifier, telephone number, unknown patient, and test patient
* EmrPatientProfileService - allows associating a patient with a PersonImage
* EmrPatientService - methods to find patients by visit location or primary identifier
* (reporting module) definitions and evaluators for getting patient Primary Identifier

## person

* Services and convenience entities for saving person images to a configurable directory

## test

* Convenience classes for constructing concepts, concept data types, and obs

## utils

* Utility classes / functions in support of the other packages as needed

## visit

* Service and parameter objects to find visits and return associated EncounterTransactions in that visit
* Service methods to get diagnoses obs and patients with particular diagnoses
* VisitDomainWrapper - convenience wrapper to get info around active / open status, encounters contained, diagnoses, dispositions, ADT status

# condition-list

This provides an implementation of condition list functionality, but condition was added to core in 2.2, so this is likely no longer needed
99 changes: 0 additions & 99 deletions api-1.10/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading