Skip to content

Commit

Permalink
Merge pull request #502 from CDCgov/story/485-IG-logical_model_for_om…
Browse files Browse the repository at this point in the history
…l_output

Story/485 IG logical model for OML output
  • Loading branch information
tjohnson7021 authored Aug 28, 2023
2 parents a4637a4 + 6ac2ed6 commit 561388f
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 97 deletions.
52 changes: 2 additions & 50 deletions ig/input/fsh/logical-adt-01.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,7 @@ Description: "The expected input for the demographic data for the newborn screen
* PID 1..1 SU PIDSegment "PID segment"
* messageString 0..1 SU string "the full message as delimeted text"

Logical: MSHSegment
Id: segment-msh-logical-model
Title: "MSH Segment"
Description: "The MSH Segment"
* segmentType 1..1 SU string "MSH"
* delimeters 1..1 SU string "MSH-1 The delimeters for the message"
* sendingApplication 1..1 SU string "MSH-3 The sending application"
* sendingFacility 1..1 SU string "MSH-4 The sending facility"
* receivingApplication 1..1 SU string "MSH-5 The receiving application"
* receivingFacility 1..1 SU string "MSH-6 The receiving facility"
* messageDateTime 1..1 SU string "MSH-7 The date and time the message was created"
* security 0..1 SU string "indicates if security features should be followed"
* messageType 1..1 SU string "MSH-9 The type of message"
* messageControlId 1..1 SU string "MSH-10 a control id for the message"
* processingId 1..1 SU string "MSH-11 the processing id"
* versionId 1..1 SU string "MSH-12 the HL7 version of this message"
// there are other optional fields we might want to define

Logical: EVNSegment
Id: segment-evn-logical-model
Title: "EVN Segment"
Description: "The EVN Segment"
* segmentType 1..1 SU string "EVN"
* eventTypeCode 1..1 SU string "A01" // this is apparently not in the spec anymore but retained for backward compatibility
* eventDateTime 1..1 SU string "Date and time of the event"
// there are other optional fields we might want to define

Logical: PIDSegment
Id: segment-pid-logical-model
Title: "PID Segment"
Description: "The PID Segment"
* segmentType 1..1 SU string "PID"
* setId 1..1 SU string "PID-1 a sequence number"
* patientId 0..1 SU string "a patient id (retained for backward compatibility, but should be blank"
* patientIdList 1..1 SU string "PID-3 a list of patient identifiers"
* alternatePatientId 0..1 SU string "alternate patient id, should be blank"
* patientName 1..1 SU string "PID-5 patient name"
* mothersMaidenName 0..1 SU string "PID-6 mothers maiden name"
* birthDateTime 1..1 SU string "PID-7 birth date and time"
* administrativeSex 1..1 SU string "PID-8 administrative sex"
* patientAlias 0..1 SU string "should be blank"
* race 1..1 SU string "race/ethnicity"
* patientAddress 1..1 SU string "PID-11 patient address"
* countyCode 0..1 SU string "retained for backward compatibility"
* homePhone 1..1 SU string "home phone number"
* businessPhone 0..1 SU string "business phone number"
* primaryLanguage 0..1 SU string "language"
* maritalStatus 1..1 SU string "marital status"
* religion 0..1 SU string "religion"
* patientAccountNumber 1..1 SU string "patient account number"
* ssn 0..1 SU string "retained for backward compatibility"
// other optional fields


16 changes: 16 additions & 0 deletions ig/input/fsh/logical-oml-021.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// defines the OML-O01 (loosely) input that is expected for newborn screening

Logical: OML021
Id: oml-021-logical-model
Title: "OML-021"
Description: "The expected output for OML formatted data for the newborn screening ETOR workflow"
* MSH 1..1 SU MSHSegment "MSH segment"
* PID 1..1 SU PIDSegment "PID segment"
* NK1 1..1 SU NK1Segment "NK1 segment"
* ORC 1..* SU ORCSegment "ORC segment"
* OBR 1..* SU OBRSegment "OBR segment"
* SPM 1..1 SU SPMSegment "SPM segment"
* OBX 1..* SU OBXSegment "OBX segment"



46 changes: 0 additions & 46 deletions ig/input/fsh/logical-orm-O01.fsh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// defines the ORM-O01 (loosely) input that is expected for newborn screening

//TODO: lines 11-12; Do we want to cross refernce the MSH and PID Segments fron the ADT message, or should they be custom to the ORM?
//TODO: Check for correct fields for each segment
//TODO: We need proper cardinality for ORM segment fields

Logical: ORMO01
Id: orm-O01-logical-model
Title: "ORM-O01"
Expand All @@ -14,46 +10,4 @@ Description: "The expected input for ORM formatted data for the newborn screenin
* OBR 1..* SU OBRSegment "OBR segment"
* OBX 1..* SU OBXSegment "OBX segment"

Logical: ORCSegment
Id: segment-orc-logical-model
Title: "ORC Segment"
Description: "The ORC Segment"
* orderControl 1..1 SU string "ORC-1 Order Control"
* ORCPlacerOrderNumber 1..1 SU string "ORC-2 Placer Order Number"
* fillerOrderNumber 1..1 SU string "ORC-3 Filler Order Number"
* placerGroupNumber 1..1 SU string "ORC-4 Placer Group Number"
* dateTimeOfTransaction 1..1 SU string "ORC-9 Date/Time of Transaction"
* orderingProvider 1..1 SU string "ORC-12 Ordering Provider"
* orderingFacilityName 1..1 SU string "ORC-11 prdering Facility Name"
// other optional fields

Logical: OBRSegment
Id: segment-obr-logical-model
Title: "OBR Segment"
Description: "The OBR Segment"
* setOBRId 1..1 SU string "OBR-1 Set ID"
* OBRplacerOrderNumber 1..1 SU string "OBR-2 Placer Order Number"
* fillerOrderNumber 1..1 SU string "OBR-3 Filler Order Number"
* universalServiceIdentifier 1..1 SU string "OBR-4 Universal Service Identifier"
* observationDateTime 1..1 SU string "OBR-7 Observation Date/Time"
* observationEndDateTime 1..1 SU string "OBR-8 Observation End Time"
* specimenID 1..1 SU string "OBR-15 or OBR-16 Specimen Id"
* specimenType 1..1 SU string "OBR-15 or OBR-16 Specimen Type"
* specimenCollectionDateTime 1..1 SU string "OBR-7 Specimen Collection Date/Time"
// other optional fields

Logical: OBXSegment
Id: segment-obx-logical-model
Title: "OBX Segment"
Description: "The OBX Segment"
* setOBXId 1..1 SU string "OBX-1 (1) Birthweight an identifier"
* valueType 1..1 SU string "OBX-2 A Value Type"
* observationIdentifier 1..1 SU string "OBX-3 Observation Identifier"
* observationSubID 1..1 SU string "OBX-4 (LOINC 54089-8) Observation Sub-ID"
* observationValue 1..1 SU string "OBX-5 (LOINC or 99MDH) Observation Value"
* units 1..1 SU string "OBX-6 Unit For Observation Value"
* observationResultStatus 1..1 SU string "OBX-11 Observation Result Status"
* dateTimeOfTheObservation 1..1 SU string "OBX-14 Date/time Of Observation"
* observationType 1..1 SU string "OBX-29 Observation Type"
* observationSubType 1..1 SU string "OBX-30 Observation Sub-type"
// other optional fields
8 changes: 8 additions & 0 deletions ig/input/fsh/nbs-evn-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Logical: EVNSegment
Id: segment-evn-logical-model
Title: "EVN Segment"
Description: "The EVN Segment"
* segmentType 1..1 SU string "EVN"
* eventTypeCode 1..1 SU string "A01" // this is apparently not in the spec anymore but retained for backward compatibility
* eventDateTime 1..1 SU string "Date and time of the event"
// there are other optional fields we might want to define
17 changes: 17 additions & 0 deletions ig/input/fsh/nbs-msh-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Logical: MSHSegment
Id: segment-msh-logical-model
Title: "MSH Segment"
Description: "The MSH Segment"
* segmentType 1..1 SU string "MSH"
* delimeters 1..1 SU string "MSH-1 The delimeters for the message"
* sendingApplication 1..1 SU string "MSH-3 The sending application"
* sendingFacility 1..1 SU string "MSH-4 The sending facility"
* receivingApplication 1..1 SU string "MSH-5 The receiving application"
* receivingFacility 1..1 SU string "MSH-6 The receiving facility"
* messageDateTime 1..1 SU string "MSH-7 The date and time the message was created"
* security 0..1 SU string "indicates if security features should be followed"
* messageType 1..1 SU string "MSH-9 The type of message"
* messageControlId 1..1 SU string "MSH-10 a control id for the message"
* processingId 1..1 SU string "MSH-11 the processing id"
* versionId 1..1 SU string "MSH-12 the HL7 version of this message"
// there are other optional fields we might want to define
23 changes: 23 additions & 0 deletions ig/input/fsh/nbs-nk1-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Logical: NK1Segment
Id: segment-nk1-logical-model
Title: "NK1 Segment"
Description: "The NK1 Segment (HL7 Description)"
* setNK1Id 1..1 SU string "NK1-1: Set ID - NK1"
* name 1..1 SU string "NK1-2 Name"
* familyName 1..1 SU string "NK1-2.1 Family Name"
* surname 1..1 SU string "NK1-2.1.1 Surname"
* relationship 1..1 SU string "NK1-3 Relationship"
* relationshipIdentifier 1..1 SU string "NK1-3.1 idenitifier"
* relationshipCodingSystem 1..1 SU string "Name of Coding System"
* originalText 1..1 SU string "NK1-3.9 Original Text"
* streetAddress 1..1 SU string "NK1-4.1 Street Address"
* streetOrMailingAddress 1..1 SU string "NK1-4.1.1 Street or Mailing Address"
* city 1..1 SU string "NK1-4.3 City"
* stateOrProvince 1..1 SU string "NK1-4.4 State or Province"
* zipOrPostalCode 1..1 SU string "NK1-4.5 Zip or Postal Code"
* equipType 1..1 SU string "NK1-5.3 Telecommunication Equipment Type"
* cityCode 1..1 SU string "NK1-5.6 Area/City Code"
* localNumber 1..1 SU string "NK1-5.7 Local Number"
* contactIdentifier 1..1 SU string "NK1-7.1 Identifier"
* contactCodingSystem 1..1 SU string "NK1-7.3 Name of Coding System"

14 changes: 14 additions & 0 deletions ig/input/fsh/nbs-obr-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Logical: OBRSegment
Id: segment-obr-logical-model
Title: "OBR Segment"
Description: "The OBR Segment"
* setOBRId 1..1 SU string "OBR-1 Set ID"
* OBRplacerOrderNumber 1..1 SU string "OBR-2 Placer Order Number"
* fillerOrderNumber 1..1 SU string "OBR-3 Filler Order Number"
* universalServiceIdentifier 1..1 SU string "OBR-4 Universal Service Identifier"
* observationDateTime 1..1 SU string "OBR-7 Observation Date/Time"
* observationEndDateTime 1..1 SU string "OBR-8 Observation End Time"
* specimenID 1..1 SU string "OBR-15 or OBR-16 Specimen Id"
* specimenType 1..1 SU string "OBR-15 or OBR-16 Specimen Type"
* specimenCollectionDateTime 1..1 SU string "OBR-7 Specimen Collection Date/Time"
// other optional fields
15 changes: 15 additions & 0 deletions ig/input/fsh/nbs-obx-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Logical: OBXSegment
Id: segment-obx-logical-model
Title: "OBX Segment"
Description: "The OBX Segment"
* setOBXId 1..1 SU string "OBX-1 (1) Birthweight an identifier"
* valueType 1..1 SU string "OBX-2 A Value Type"
* observationIdentifier 1..1 SU string "OBX-3 Observation Identifier"
* observationSubID 1..1 SU string "OBX-4 (LOINC 54089-8) Observation Sub-ID"
* observationValue 1..1 SU string "OBX-5 (LOINC or 99MDH) Observation Value"
* units 1..1 SU string "OBX-6 Unit For Observation Value"
* observationResultStatus 1..1 SU string "OBX-11 Observation Result Status"
* dateTimeOfTheObservation 1..1 SU string "OBX-14 Date/time Of Observation"
* observationType 1..1 SU string "OBX-29 Observation Type"
* observationSubType 1..1 SU string "OBX-30 Observation Sub-type"
// other optional fields
12 changes: 12 additions & 0 deletions ig/input/fsh/nbs-orc-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Logical: ORCSegment
Id: segment-orc-logical-model
Title: "ORC Segment"
Description: "The ORC Segment"
* orderControl 1..1 SU string "ORC-1 Order Control"
* ORCPlacerOrderNumber 1..1 SU string "ORC-2 Placer Order Number"
* fillerOrderNumber 1..1 SU string "ORC-3 Filler Order Number"
* placerGroupNumber 1..1 SU string "ORC-4 Placer Group Number"
* dateTimeOfTransaction 1..1 SU string "ORC-9 Date/Time of Transaction"
* orderingProvider 1..1 SU string "ORC-12 Ordering Provider"
* orderingFacilityName 1..1 SU string "ORC-11 prdering Facility Name"
// other optional fields
1 change: 0 additions & 1 deletion ig/input/fsh/nbs-patient.fsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// definition of the Patient resource we expect for CDC TI NBS

Profile: NBSPatient
Parent: $USCorePatient
Description: "The Patient resource containing demographic data for a newborn"
Expand Down
25 changes: 25 additions & 0 deletions ig/input/fsh/nbs-pid-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Logical: PIDSegment
Id: segment-pid-logical-model
Title: "PID Segment"
Description: "The PID Segment"
* segmentType 1..1 SU string "PID"
* setId 1..1 SU string "PID-1 a sequence number"
* patientId 0..1 SU string "a patient id (retained for backward compatibility, but should be blank"
* patientIdList 1..1 SU string "PID-3 a list of patient identifiers"
* alternatePatientId 0..1 SU string "alternate patient id, should be blank"
* patientName 1..1 SU string "PID-5 patient name"
* mothersMaidenName 0..1 SU string "PID-6 mothers maiden name"
* birthDateTime 1..1 SU string "PID-7 birth date and time"
* administrativeSex 1..1 SU string "PID-8 administrative sex"
* patientAlias 0..1 SU string "should be blank"
* race 1..1 SU string "race/ethnicity"
* patientAddress 0..1 SU string "PID-11 patient address"
* countyCode 0..1 SU string "retained for backward compatibility"
* homePhone 1..1 SU string "home phone number"
* businessPhone 0..1 SU string "business phone number"
* primaryLanguage 0..1 SU string "language"
* maritalStatus 1..1 SU string "marital status"
* religion 0..1 SU string "religion"
* patientAccountNumber 1..1 SU string "patient account number"
* ssn 0..1 SU string "retained for backward compatibility"
// other optional fields
12 changes: 12 additions & 0 deletions ig/input/fsh/nbs-spm-segment.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Logical: SPMSegment
Id: segment-spm-logical-model
Title: "SPM Segment"
Description: "The SPM Segment"
* setSPMId 1..1 SU string "SPM-1 Set ID - SPM"
* assignedIdentifier 1..1 SU string "SPM-2.1 Placer Assigned Identifier"
* entityIdentifier 1..1 SU string "SPM-2.1.1 Entity Identifier"
* specimenType 1..1 SU string "SPM-4 Specimen Type"
* identifier 1..1 SU string "SPM-4.1 Identifier"
* codingSystem 1..1 SU string "SPM-4.3 Name of Coding System"
* specimenCollectionDateTime 1..1 SU string "SPM-17 Specimen Collection Date Time"
* rangeStartDateTime 1..1 SU string "SPM-17.1: Range Start Date Time"

0 comments on commit 561388f

Please sign in to comment.