-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add developer onboarding guide * Increment emap versions * Remove unnecessary check for PR in comment action * Add health endpoint to hl7 reader
- Loading branch information
1 parent
81b2002
commit 20e206f
Showing
29 changed files
with
610 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# EMAP Release | ||
|
||
**Date: 2024-02-14 Changes in this release** | ||
|
||
--- | ||
|
||
### Changes/fixes | ||
|
||
- We have added a healthcheck endpoint for the hl7-reader, so that users can check the status of the hl7-reader without | ||
needing to access the server directly. | ||
- The current live version can be found at: `http://<GAE hosting EMAP>:8080/actuator/health` | ||
- Please contact the developer team to find out the GAE hostname. | ||
- All services now run using Java 17 (LTS) | ||
- Open source release using mono-repo | ||
- Improved testing to ensure database consistency | ||
|
||
### Tables changed | ||
|
||
Department specialities can change over time, we've updated the database to reflect this. | ||
The following tables have been updated: | ||
|
||
| Table | Attributes added | Attributes removed | | ||
|:----------------|:-----------------|:-------------------| | ||
| DepartmentState | speciality | - | | ||
| Department | - | speciality | ||
|
||
|
||
```mermaid | ||
erDiagram | ||
bed { | ||
varchar(255) hl7string | ||
bigint room_id | ||
bigint bed_id | ||
} | ||
department { | ||
varchar(255) hl7string | ||
bigint internal_id | ||
varchar(255) name | ||
bigint department_id | ||
} | ||
department_state { | ||
timestamp-with-time-zone stored_from | ||
timestamp-with-time-zone valid_from | ||
timestamp-with-time-zone stored_until | ||
timestamp-with-time-zone valid_until | ||
varchar(255) speciality | ||
varchar(255) status | ||
bigint department_id | ||
bigint department_state_id | ||
} | ||
location { | ||
varchar(255) location_string | ||
bigint bed_id | ||
bigint department_id | ||
bigint room_id | ||
bigint location_id | ||
} | ||
room { | ||
varchar(255) hl7string | ||
varchar(255) name | ||
bigint department_id | ||
bigint room_id | ||
} | ||
department ||--|{ department_state: department_id | ||
location |{--o| department: department_id | ||
location |{--o| room: room_id | ||
location |{--o| bed: bed_id | ||
department ||--o{ room: room_id | ||
room ||--o{ bed: bed_id | ||
``` | ||
|
||
--- | ||
<!-- | ||
## Data sources | ||
### Repository Versions | ||
| Repository | Version | | ||
| :- | :-: | | ||
|Hl7-processor | 2.7 | | ||
|Emap_interchange | 2.7 | | ||
|Emap-Core | 2.7 | | ||
|Inform-DB | 2.7 | | ||
|Hoover | 2.7 | | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
classDiagram | ||
direction BT | ||
class InformDbOperations { | ||
+ processMessage(AdtMessage) void | ||
+ processMessage(LabOrderMsg) void | ||
} | ||
class LabCache { | ||
+ saveEntityAndUpdateCache(RowState~LabBattery, LabBatteryAudit~) LabBattery | ||
+ updateLabTestDefinitionCache(RowState~LabTestDefinition, LabTestDefinitionAudit~) LabTestDefinition | ||
+ findExistingLabTestDefinition(String, String) LabTestDefinition | ||
+ createLabBatteryElementIfNotExists(LabTestDefinition, LabBattery, Instant, Instant) LabBatteryElement | ||
} | ||
class LabController { | ||
+ processLabOrder(Mrn, HospitalVisit?, LabOrderMsg, Instant) void | ||
+ deleteLabOrdersForVisit(HospitalVisit, Instant, Instant) void | ||
+ processLabMetadata(LabMetadataMsg, Instant) void | ||
} | ||
class LabOrderAuditRepository { | ||
<<Interface>> | ||
+ findAllIds(Long, Long, Instant, String) List~Long~ | ||
+ previouslyDeleted(Long, Long, InterchangeValue~Instant~, InterchangeValue~String~) boolean | ||
+ findAllByHospitalVisitIdIn(Iterable~Long~) List~LabOrderAudit~ | ||
} | ||
class LabOrderController { | ||
+ processSampleAndOrderInformation(Mrn, HospitalVisit, LabBattery, LabOrderMsg, Instant, Instant) LabOrder | ||
+ deleteLabOrder(LabOrder, Instant, Instant) void | ||
+ findLabBatteryOrThrow(String, String) LabBattery | ||
+ getLabOrdersForVisit(HospitalVisit) List~LabOrder~ | ||
+ processLabSampleAndDeleteLabOrder(Mrn, LabBattery, HospitalVisit, LabOrderMsg, Instant, Instant) void | ||
+ getOrCreateLabBattery(String, String, Instant, Instant) LabBattery | ||
} | ||
class LabOrderRepository { | ||
<<Interface>> | ||
+ findByLabBatteryIdAndLabSampleId(LabBattery, LabSample) Optional~LabOrder~ | ||
+ findByLabBatteryIdAndLabSampleIdAndValidFromBefore(LabBattery, LabSample, Instant) Optional~LabOrder~ | ||
+ findByLabBatteryIdBatteryCodeAndLabSampleId(String, LabSample) Optional~LabOrder~ | ||
+ findByLabSampleIdExternalLabNumber(String) Optional~LabOrder~ | ||
+ findAllByHospitalVisitId(HospitalVisit) List~LabOrder~ | ||
} | ||
class LabProcessor { | ||
+ processMessage(LabMetadataMsg, Instant) void | ||
+ processMessage(LabOrderMsg, Instant) void | ||
} | ||
class LabTestDefinitionAuditRepository { | ||
<<Interface>> | ||
} | ||
class LabTestDefinitionRepository { | ||
<<Interface>> | ||
+ findByLabProviderAndTestLabCode(String, String) Optional~LabTestDefinition~ | ||
+ findByTestLabCode(String) Optional~LabTestDefinition~ | ||
} | ||
class EmapOperationMessageProcessor { | ||
<<Interface>> | ||
+ processMessage(LabMetadataMsg) void | ||
+ processMessage(AdtMessage) void | ||
} | ||
|
||
InformDbOperations *--> LabProcessor | ||
LabCache *--> LabTestDefinitionAuditRepository | ||
LabCache *--> LabTestDefinitionRepository | ||
LabController *--> LabCache | ||
LabController *--> LabOrderController | ||
LabOrderController *--> LabOrderAuditRepository | ||
LabOrderController *--> LabOrderRepository | ||
LabProcessor *--> LabController | ||
InformDbOperations ..> EmapOperationMessageProcessor |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
classDiagram | ||
direction BT | ||
class AblLabBuilder { | ||
+ build(String, ORU_R30) Collection~LabOrderMsg~ | ||
} | ||
class AppHl7 { | ||
+ main(String[]) void | ||
+ mainLoop(Publisher, IdsOperations) CommandLineRunner | ||
} | ||
class ConsultFactory { | ||
~ makeConsult(String, ORM_O01) ConsultRequest | ||
} | ||
class IdsOperations { | ||
+ getHl7DataSource() EmapDataSource | ||
+ getNextHL7IdsRecordBlocking(int) IdsMaster | ||
+ close() void | ||
+ parseAndSendNextHl7(Publisher, PipeParser) void | ||
+ getNextHL7IdsRecord(int) IdsMaster | ||
+ messageFromHl7Message(Message, int) List~EmapOperationMessage~ | ||
+ populateIDS() CommandLineRunner | ||
+ getIdsEmptyOnInit() boolean | ||
~ getLatestProcessedId() IdsProgress | ||
} | ||
class LabFunnel { | ||
+ buildMessages(String, ORU_R30, OrderCodingSystem) Collection~LabOrderMsg~ | ||
+ buildMessages(String, ORR_O02, OrderCodingSystem) Collection~LabOrderMsg~ | ||
+ buildMessages(String, ORU_R01, OrderCodingSystem) Collection~LabOrderMsg~ | ||
+ buildMessages(String, ORM_O01, OrderCodingSystem) List~LabOrderMsg~ | ||
} | ||
class LabOrderBuilder { | ||
~ getCodingSystem() OrderCodingSystem | ||
~ getEpicCareOrderNumberOrc() String | ||
~ setQuestions(Collection~NTE~, String, Pattern) void | ||
+ getMsg() LabOrderMsg | ||
~ getEpicCareOrderNumberObr() String | ||
~ setBatteryCodingSystem() void | ||
~ populateOrderInformation(ORC, OBR) void | ||
~ populateObrFields(OBR, boolean) void | ||
~ setSourceAndPatientIdentifiers(String, PatientInfoHl7) void | ||
~ populateObrFields(OBR) void | ||
~ setOrderTemporalInformation(Instant) void | ||
} | ||
class OrderAndResultService { | ||
~ buildMessages(String, ORR_O02) Collection~EmapOperationMessage~ | ||
~ buildMessages(String, ORM_O01) Collection~EmapOperationMessage~ | ||
~ buildMessages(String, ORU_R30) Collection~EmapOperationMessage~ | ||
~ buildMessages(String, ORU_R01) Collection~EmapOperationMessage~ | ||
} | ||
class WinPathLabBuilder { | ||
+ build(String, ORU_R01) Collection~LabOrderMsg~ | ||
+ build(String, ORR_O02) Collection~LabOrderMsg~ | ||
+ build(String, ORM_O01) List~LabOrderMsg~ | ||
} | ||
class ConsultRequest { | ||
+ getEpicConsultId() Long | ||
+ getMrn() String | ||
+ setQuestions(Map~String, String~) void | ||
+ getQuestions() Map~String, String~ | ||
+ setMrn(String) void | ||
+ processMessage(EmapOperationMessageProcessor) void | ||
} | ||
class LabOrderMsg { | ||
+ getSpecimenType() InterchangeValue~String~ | ||
+ getOrderControlId() String | ||
+ getLabResultMsgs() List~LabResultMsg~ | ||
+ setOrderDateTime(InterchangeValue~Instant~) void | ||
+ setOrderControlId(String) void | ||
+ setSpecimenType(InterchangeValue~String~) void | ||
+ processMessage(EmapOperationMessageProcessor) void | ||
+ addLabResult(LabResultMsg) void | ||
} | ||
|
||
AblLabBuilder --|> LabOrderBuilder | ||
AppHl7 ..> IdsOperations | ||
IdsOperations *--> OrderAndResultService | ||
LabFunnel ..> AblLabBuilder | ||
LabFunnel ..> WinPathLabBuilder | ||
OrderAndResultService *--> ConsultFactory | ||
OrderAndResultService ..> LabFunnel | ||
WinPathLabBuilder --|> LabOrderBuilder | ||
LabOrderBuilder ..> LabOrderMsg: «create» | ||
ConsultFactory ..> ConsultRequest: «create» |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
classDiagram | ||
direction BT | ||
class Application { | ||
+ main(String[]) void | ||
+ locationMetadataProcessor(LocationMetadataQueryStrategy) Processor | ||
+ flowsheetProcessor(FlowsheetQueryStrategy) Processor | ||
+ runBatchProcessor(Processor, Processor, ...) BatchProcessor | ||
} | ||
class LocationMetadata { | ||
+ getHl7String() String | ||
+ getDepartmentId() Long | ||
+ getRoomMetadata() RoomMetadata | ||
+ getBedMetadata() BedMetadata | ||
+ setHl7String(String) void | ||
+ setDepartmentId(Long) void | ||
+ setRoomMetadata(RoomMetadata) void | ||
+ setBedMetadata(BedMetadata) void | ||
+ processMessage(EmapOperationMessageProcessor) void | ||
} | ||
class LocationMetadataDTO { | ||
+ getInterchangeMessage() LocationMetadata | ||
} | ||
class LocationMetadataQueryStrategy { | ||
+ getSqlQueryFilename() String | ||
+ getInstantCalculator() InstantCalculator | ||
+ fixInitialProgress(Instant) Instant | ||
~ getClarityData(Instant) List~LocationMetadataDTO~ | ||
+ getBatchOfInterchangeMessages(Instant, Instant, String) List~ImmutablePair~ EmapOperationMessage, String~~ | ||
+ getUpdatedProgress() EtlHooverProgress | ||
+ getName() String | ||
} | ||
class QueryStrategy { | ||
<<Interface>> | ||
+ getBatchOfInterchangeMessages(Instant, Instant, String) List~ImmutablePair~ EmapOperationMessage, String~~ | ||
+ fixInitialProgress(Instant) Instant | ||
+ getInstantCalculator() InstantCalculator | ||
+ getName() String | ||
+ getUpdatedProgress() EtlHooverProgress | ||
+ getBatchOfInterchangeMessages(DataTypeProgress) List~ImmutablePair~ EmapOperationMessage, String~~ | ||
+ getSqlQueryFilename() String | ||
+ interpretPreviousProgress(EtlHooverProgress) DataTypeProgress | ||
+ getSqlQuery() String | ||
} | ||
class Processor { | ||
+ getDataType() String | ||
+ getPreviousProgress() List~EtlHooverProgress~ | ||
+ execute() boolean | ||
+ executeOne(EtlHooverProgress) boolean | ||
} | ||
|
||
class BatchProcessor { | ||
+ registerDataTypeProcessor(Processor) void | ||
} | ||
|
||
Application ..> LocationMetadataQueryStrategy | ||
LocationMetadataDTO ..> LocationMetadata: «create» | ||
LocationMetadataQueryStrategy ..> LocationMetadata | ||
LocationMetadataQueryStrategy ..> LocationMetadataDTO | ||
LocationMetadataQueryStrategy ..|> QueryStrategy | ||
Processor *--> QueryStrategy | ||
BatchProcessor "1" *--> "dataTypeProcessors *" Processor | ||
Application ..> Processor | ||
Application ..> BatchProcessor: «create» |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.