Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rmrlangford committed Jan 31, 2024
1 parent 5070462 commit 16c2141
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 5 deletions.
39 changes: 39 additions & 0 deletions input/fsh/conceptmaps/client-registration.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,42 @@ Usage: #definition
* target = $SEX
* insert ElementMap(male, M, equivalent)
* insert ElementMap(female, F, equivalent)

Instance: PropietaryEducationLevelToLOINCEducationLevel
InstanceOf: ConceptMap
Title: "Propietary Education Level to LOINC Education Level"
Description: "Mapping to and from Propietary Education Level to LOINC Education Level."
Usage: #definition

* name = "PropietaryEducationLevelToLOINCEducationLevel"
* description = "Mapping to and from Propietary Education Level to LOINC Education Level."
* title = "ConceptMap to and From propietary education level to LOINC education Level"
* status = #active
* experimental = false
* date = "2024-01-31"

* group[+]
* source = $PROPRIETARY_EDU_LEVEL
* target = $LNC
* insert ElementMap(CertificateGraduate, LA30193-9, equivalent)
* insert ElementMap(DegreeGraduate, LA42-7, equivalent)
* insert ElementMap(DiplomaGraduate, LA32469-1, equivalent)
* insert ElementMap(JuniorSecondary, LA36-9, equivalent)
* insert ElementMap(MastersGraduate, LA12461-2, equivalent)
* insert ElementMap(NoFormalEducation, LA35-1, equivalent)
* insert ElementMap(PhDGraduate, LA30185-5, equivalent)
* insert ElementMap(Primary, LA32466-7, equivalent)
* insert ElementMap(SeniorSecondary, LA37-7, equivalent)

* group[+]
* source = $LNC
* target = $PROPRIETARY_EDU_LEVEL
* insert ElementMap(LA30193-9, CertificateGraduate, equivalent)
* insert ElementMap(LA42-7, DegreeGraduate, equivalent)
* insert ElementMap(LA32469-1, DiplomaGraduate, equivalent)
* insert ElementMap(LA36-9, JuniorSecondary, equivalent)
* insert ElementMap(LA12461-2, MastersGraduate, equivalent)
* insert ElementMap(LA35-1, NoFormalEducation, equivalent)
* insert ElementMap(LA30185-5, PhDGraduate, equivalent)
* insert ElementMap(LA32466-7, Primary, equivalent)
* insert ElementMap(LA37-7, SeniorSecondary, equivalent)
4 changes: 3 additions & 1 deletion input/fsh/examples.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ Description: "Is used to document demographics and other administrative informat
* birthDate = "1990-12-12"
* birthDate.extension[birthTime].valueDateTime = "1983-05-22T16:40:17+02:00"
* extension[BIZ].valueBoolean = true
* extension[IsEstimatedDOB].valueBoolean = false
* extension[IsEstimatedDOB].valueBoolean = false
* extension[EducationLevelAttained].valueCodeableConcept.coding.code = $LNC#LA42-7
* extension[EducationLevelAttained].valueCodeableConcept.coding.system = "http://loinc.org"
14 changes: 13 additions & 1 deletion input/fsh/extensions.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@ Description: "This is an extension to capture whether the patient's date of birt
* value[x] only boolean
* value[x] 1..
* ^context[+].type = #element
* ^context[=].expression = "Patient"
* ^context[=].expression = "Patient"

Extension: EducationLevelAttained
Id: education-level-attained
Title: "Patient's highest education level attained"
Description: "A list of education levels."
* value[x] only CodeableConcept
* valueCodeableConcept from VSLOINCEducationLevelAttained (required)
* valueCodeableConcept.text = "Highest education level attained"
* valueCodeableConcept.coding.system 1..1
* valueCodeableConcept.coding.code 1..1
* ^context[0].type = #element
* ^context[0].expression = "Patient"
7 changes: 7 additions & 0 deletions input/fsh/smartcare.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ Description: "Is used to document demographics and other administrative informat
* birthDate.extension[birthTime] ^definition =
"reason(s) why this should be supported."

* address.district 0..1 MS
* address.district ^definition =
"reason(s) why this should be supported."

* extension contains BornInZambia named BIZ 1..1
* extension contains IsEstimatedDateOfBirth named IsEstimatedDOB 0..1 MS
* extension[IsEstimatedDOB] ^definition =
"reason(s) why this should be supported."
* extension contains EducationLevelAttained named EduLevelAttained 0..1 MS
* extension[EduLevelAttained] ^definition =
"reason(s) why this should be supported."
44 changes: 43 additions & 1 deletion input/fsh/terminology.fsh
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
Alias: $LNC = http://loinc.org

Alias: $GENDER = http://hl7.org/fhir/administrative-gender
Alias: $SEX = http://terminology.hl7.org/CodeSystem/v2-0001
Alias: $SEX = http://terminology.hl7.org/CodeSystem/v2-0001

Alias: $PROPRIETARY_EDU_LEVEL = http://openhie.org/fhir/zambia-immunizations/CodeSystem/cs-propietary-education-level-attained

CodeSystem: CSPropietaryEducationLevelAttained
Id: cs-propietary-education-level-attained
Title: "Patient's highest education level attained (Propietary)"
Description: "A list of propietary education levels."
* ^experimental = false
* ^caseSensitive = true
* #CertificateGraduate "Certificate Graduate" "The description"
* #DegreeGraduate "Degree Graduate" "The description"
* #DiplomaGraduate "Diploma Graduate" "The description"
* #JuniorSecondary "Junior Secondary" "The description"
* #MastersGraduate "Masters Graduate" "The description"
* #NoFormalEducation "No Formal Education" "The description"
* #PhDGraduate "PhD Graduate" "The description"
* #Primary "Primary" "The description"
* #SeniorSecondary "Senior Secondary" "The description"

ValueSet: VSPropietaryEducationLevelAttained
Id: vs-propietary-education-level-attained
Title: "Patient's highest education level attained (Propietary)"
Description: "A list of propietary education levels."
* ^experimental = false
* include codes from system CSPropietaryEducationLevelAttained

ValueSet: VSLOINCEducationLevelAttained
Id: vs-loinc-education-level-attained
Title: "Patient's highest education level attained (LOINC)"
Description: "A list of LOINC education levels."
* ^experimental = false
* $LNC#LA35-1 "No schooling"
* $LNC#LA42-7 "Graduate degree"
* $LNC#LA30193-9 "More than high school"
* $LNC#LA32469-1 "University undergraduate degree"
* $LNC#LA32466-7 "Primary school education"
* $LNC#LA36-9 "8th grade/less"
* $LNC#LA37-7 "9-11 grades"
* $LNC#LA12461-2 "Master's degree (e.g., MA, MS, MEng, MEd, MSW, MBA)"
* $LNC#LA30185-5 "Doctoral degree (e.g., PhD, EdD)"
4 changes: 2 additions & 2 deletions input/maps/AdministrativeSexToAdministrativeGender.fml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/// status = 'active'

uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias PatientProfile as source
uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as target
uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias Patient as target

group makePatient(source pat : PatientProfile, target patient : Patient) {
group SetPatientGender(source pat : PatientProfile, target patient : Patient) {
pat.gender as gender -> patient.gender = translate(gender, 'http://openhie.org/fhir/zambia-immunizations/ConceptMap/AdministrativeSexToAdministrativeGender', 'code') "SetGender";
}
14 changes: 14 additions & 0 deletions input/maps/PropietaryEducationLevelToLOINCEducationLevel.fml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*/// url = 'http://openhie.org/fhir/zambia-immunizations/StructureMap/PropietaryEducationLevelToLOINCEducationLevel'
/// name = 'PropietaryEducationLevelToLOINCEducationLevel'
/// description = 'Maps the Propietary Educational Level codes To LOINC Educational Level codes.'
/// title = 'Propietary Educational Level To LOINC Educational Level'
/// status = 'active'

uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias PatientProfile as source
uses "http://openhie.org/fhir/zambia-immunizations/StructureDefinition/immunization-patient" alias Patient as target

group SetPatientEducationalLevel(source pat : PatientProfile, target patient : Patient) {
pat.extension:EduLevelAttained as eduLevelAttained -> patient as patty then {
//eduLevelAttained -> patty.code = translate(eduLevelAttained, 'http://openhie.org/fhir/zambia-immunizations/ConceptMap/PropietaryEducationLevelToLOINCEducationLevel', 'code') "SetEducationalLevel";
}
}*/

0 comments on commit 16c2141

Please sign in to comment.