As a RS engineer I want to map values from HL7 CWE fields to FHIR coding elements and back to HL7 CWE fields based on tables defined in the Vocabulary Mapping column of the mapping inventory sheets.
Description/Use Case
The mapping inventory sheets have a column for vocabulary mapping. For some fields a table is defined identifying the fields and values to convert. Our mappings for CWE/CodeableConcept are not able to map the second alternate values for incoming data as defined by those tables. Further we do not currently have the ability to map values back to HL7 for any of the CWE fields.
Dev Notes
HL7 to FHIR
The file datatype/CodeableConcept.yml has these elements defined:
# Generalized CWE for alternate codes handles mismatched systems and codes
coding_3:
valueOf: $coding
generateList: true
condition: $coding NOT_NULL
specs: CWE
vars:
coding: CODING_SYSTEM_V2_ALTERNATE, CWE
# Generalized CWE through CODING_SYSTEM_V2 handles mismatched systems and codes
coding_4:
valueOf: $coding
generateList: true
condition: $coding NOT_NULL && nameOfSystem NOT_EQUALS SCT
specs: CWE
vars:
coding: CODING_SYSTEM_V2, CWE
nameOfSystem: CWE.3
We need to add elements to the coding element in CWE/CodeableConcept.yml using the data types CODING_SYSTEM_V2 and CODING_SYSTEM_V2_ALTERNATIVE.
There is no data type for CODING_SYSTEM_V2_SECOND_ALTERNATE. That will need to be added to the hl7v2-fhir-converter library. See CODING_SYSTEM_V2 in SimpleDataValueResolver and SimpleDataTypeMapper classes for a guide on implementation.
FHIR to HL7
The linuxforhealth Terminology.lookup() function uses the FHIR Registry to retrieve mappings from HL7 to FHIR. Using the same library we could add a CustomFHIRFunction to maps the values from FHIR back to HL7.
Acceptance Criteria
[ ] CODING_SYSTEM_V2_SECOND_ALTERNATE added as a type to the hl7v2-fhir-converter library
[ ] CODING_SYSTEM_V2, CODING_SYSTEM_V2_ALTERNATE, and CODING_SYSTEM_V2_SECOND_ALTERNATE types are implemented in CWE/CodeableConcept coding element
[ ] CustomFHIRFunction added to map values from FHIR to HL7 and implemented in the FHIR mapping schemas
User Story
As a RS engineer I want to map values from HL7 CWE fields to FHIR
coding
elements and back to HL7 CWE fields based on tables defined in the Vocabulary Mapping column of the mapping inventory sheets.Description/Use Case
The mapping inventory sheets have a column for vocabulary mapping. For some fields a table is defined identifying the fields and values to convert. Our mappings for CWE/CodeableConcept are not able to map the second alternate values for incoming data as defined by those tables. Further we do not currently have the ability to map values back to HL7 for any of the CWE fields.
Dev Notes
HL7 to FHIR
The file
datatype/CodeableConcept.yml
has these elements defined:We need to add elements to the
coding
element inCWE/CodeableConcept.yml
using the data typesCODING_SYSTEM_V2
andCODING_SYSTEM_V2_ALTERNATIVE
.There is no data type for
CODING_SYSTEM_V2_SECOND_ALTERNATE
. That will need to be added to the hl7v2-fhir-converter library. SeeCODING_SYSTEM_V2
inSimpleDataValueResolver
andSimpleDataTypeMapper
classes for a guide on implementation.FHIR to HL7
The linuxforhealth Terminology.lookup() function uses the FHIR Registry to retrieve mappings from HL7 to FHIR. Using the same library we could add a CustomFHIRFunction to maps the values from FHIR back to HL7.
Acceptance Criteria
CODING_SYSTEM_V2_SECOND_ALTERNATE
added as a type to the hl7v2-fhir-converter libraryCODING_SYSTEM_V2
,CODING_SYSTEM_V2_ALTERNATE
, andCODING_SYSTEM_V2_SECOND_ALTERNATE
types are implemented in CWE/CodeableConcept coding element