Skip to content

Commit

Permalink
Merge pull request #5 from jembi/smartcare-initial
Browse files Browse the repository at this point in the history
Smartcare initial
  • Loading branch information
rmrlangford authored Feb 2, 2024
2 parents 8fc881a + 9792ab6 commit 5112961
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 75 deletions.
4 changes: 2 additions & 2 deletions input/fsh/conceptmaps/client-registration.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Usage: #definition
* date = "2024-01-31"

* group[+]
* source = $PROPRrietary_EDU_LEVEL
* source = $PROPRIETARY_EDU_LEVEL
* target = $LNC
* insert ElementMap(CertificateGraduate, LA30193-9, equivalent)
* insert ElementMap(DegreeGraduate, LA32469-1, equivalent)
Expand All @@ -51,7 +51,7 @@ Usage: #definition

* group[+]
* source = $LNC
* target = $PROPRrietary_EDU_LEVEL
* target = $PROPRIETARY_EDU_LEVEL
* insert ElementMap(LA30193-9, CertificateGraduate, equivalent)
* insert ElementMap(LA32469-1, DegreeGraduate, equivalent)
* insert ElementMap(LA12459-6, DiplomaGraduate, equivalent)
Expand Down
67 changes: 55 additions & 12 deletions input/fsh/examples.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ Description: "Is used to document demographics and other administrative informat
* identifier[NUPIN][=].system = "http://openhie.org/fhir/zambia-immunizations/identifier/patient-nupin"
* identifier[NRC][+].value = "999999/99/9"
* identifier[NRC][=].system = "http://openhie.org/fhir/zambia-immunizations/identifier/patient-nrc"
* name[+][official].use = #official
* name[=][official].family = "Smith"
* name[=][official].given[+] = "Jane"
* name[=][official].given[+] = "Maria"

* name[+][otherName].use = #official
* name[=][otherName].family = "Smith"
* name[=][otherName].given[+] = "Jane"
* name[=][otherName].given[+] = "Maria"

* name[+][nickname].use = #nickname
* name[=][nickname].given[+] = "Smitty"

* gender = #female
* birthDate = "1990-12-12"
* birthDate.extension[birthTime].valueDateTime = "1983-05-22T16:40:17+02:00"
* birthDate.extension[IsEstimatedDOB].valueBoolean = false
* maritalStatus.coding.code = #M
* maritalStatus.coding.system = "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus"
//* maritalStatus.extension[DateFirstMarried].valueDateTime = "2001-11-10T12:05:17+02:00"
* extension[bornInZambia].valueBoolean = true
* link[+].other = Reference(SpouseRelatedPersonExample)
* link[=].type = #seealso
Expand Down Expand Up @@ -70,13 +74,15 @@ Description: "Represents the current facility at which the patient is receiving
Instance: OrganizationExample
InstanceOf: ServiceProvider
Usage: #example
Title: "Organization"
Description: "Organization providing health related services."
Title: "Healthcare Service Provider"
Description: "An organization that provides healthcare services."
* identifier[XX].value = "facility-1"
* identifier[XX].system = "http://openhie.org/fhir/zambia-immunizations/identifier/organization"
* identifier[XX].system = "http://openhie.org/fhir/zambia-immunizations/identifier/healthcare-service-provider"
* identifier[XX].type.coding.code = #XX
* identifier[XX].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[XX].type.text = "Organization identifier"
* identifier[XX].type.text = "Healthcare service provider identifier"
* type.coding.system = "http://terminology.hl7.org/CodeSystem/organization-type"
* type.coding.code = #prov
* name = "Facility one"

Instance: ChiefAtBirthRelatedPersonExample
Expand Down Expand Up @@ -136,7 +142,7 @@ Description: "Records the current occupation for the guardian"
* status = #final
* code = $LNC#11341-5
* encounter = Reference(TargetFacilityEncounterExample)
* effectiveDateTime = "2022-11-30"
* effectivePeriod.start = "2017-03-01"
* category.coding.code = #social-history
* category.coding.system = "http://terminology.hl7.org/CodeSystem/observation-category"
* subject = Reference (ImmunizationPatientExample)
Expand Down Expand Up @@ -177,7 +183,6 @@ Description: "This profile acts as a base profile from which more specific Relat
* name[+].use = #official
* name[=].given[+] = "Olivia"
* name[=].family = "Smith"
* relationship = $PARENT_RELATIONSHIP_CODES#MTH

Instance: RelativeRelatedPersonExample
InstanceOf: RelativeRelatedPerson
Expand Down Expand Up @@ -221,4 +226,42 @@ Description: "Records the home language for the patient"
* performer = Reference(OrganizationExample)
* valueCodeableConcept.coding.code = #Chokwe
* valueCodeableConcept.coding.system = "http://openhie.org/fhir/zambia-immunizations/CodeSystem/cs-home-language"
* valueCodeableConcept.text = "Chokwe"
* valueCodeableConcept.text = "Chokwe"

Instance: MedicalInsuranceCompanyExample
InstanceOf: MedicalInsuranceCompany
Usage: #example
Title: "Medical Insurance Company"
Description: "A company that provides insurance to its subscribers that may include healthcare related policies."
* identifier[XX].value = "medical-insurance-company-1"
* identifier[XX].system = "http://openhie.org/fhir/zambia-immunizations/identifier/medical-insurance-company"
* identifier[XX].type.coding.code = #XX
* identifier[XX].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[XX].type.text = "Medical insurance company identifier"
* type.coding.system = "http://terminology.hl7.org/CodeSystem/organization-type"
* type.coding.code = #ins
* name = "Medical Insurance Company 1"

Instance: MedicalInsuranceExample
InstanceOf: MedicalInsurance
Usage: #example
Title: "Insurance or Medical Plan"
Description: "Insurance or medical plan details"
* status = #active
* kind = #insurance
* beneficiary = Reference(ImmunizationPatientExample)
* subscriberId.value = "504342245"
* subscriberId.system = "http://openhie.org/fhir/zambia-immunizations/identifier/beneficiary-insurance-id"
* policyHolder = Reference(MedicalInsuranceCompanyExample)

Instance: VaccinesExample
InstanceOf: Vaccines
Usage: #example
Title: "Vaccine Administration"
Description: "Records the vaccine administered to the patient."
* status = #completed
* vaccineCode = $SCT#82622003
* patient = Reference(ImmunizationPatientExample)
* occurrenceDateTime = "2022-11-30"
* encounter = Reference(TargetFacilityEncounterExample)
* protocolApplied.doseNumber = "0"
23 changes: 1 addition & 22 deletions input/fsh/extensions.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,4 @@ 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.birthDate"

/*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"*/

/*Extension: DateOfFirstMarriage
Id: date-of-first-marriage
Title: "Patient's Date of First Marriage"
Description: "This is an extension to capture the date when the patient first got married."
* value[x] only dateTime
* value[x] 1..
* ^context[+].type = #element
* ^context[=].expression = "Patient.maritalStatus"*/
* ^context[=].expression = "Patient.birthDate"
141 changes: 108 additions & 33 deletions input/fsh/smartcare.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,24 @@ Description: "Is used to document demographics and other administrative informat
* identifier[NRC].system 1..1
* identifier[NRC].system = "http://openhie.org/fhir/zambia-immunizations/identifier/patient-nrc"

* name 1..*
* name 1..*
* name ^slicing.discriminator.type = #value
* name ^slicing.discriminator.path = "use"
* name ^slicing.rules = #open
* name ^slicing.ordered = false
* name ^slicing.description = "Slice based on the type of identifier."
* name contains
official 1..1 and
otherName 1..1 and
nickname 0..1 MS

* name[official].given 1..*
* name[official].family 1..1
* name[official].use 1..1
* name[official].use = #official
* name[otherName].given 1..*
* name[otherName].family 1..1
* name[otherName].use 1..1
* name[otherName].use from HumanNameCodes (required)

* name[nickname] ^definition =
"reason(s) why this should be supported."
* name[nickname].given 1..*
* name[nickname].family 1..1
* name[nickname].use 1..1
* name[nickname].use = #nickname

Expand All @@ -76,16 +74,16 @@ Description: "Is used to document demographics and other administrative informat
* extension[religion] ^definition =
"reason(s) why this should be supported."
* extension[religion].valueCodeableConcept.text 1..1
* extension[religion].valueCodeableConcept.coding 1..1
* extension[religion].valueCodeableConcept.coding.system 1..1
* extension[religion].valueCodeableConcept.coding.code 1..1

* maritalStatus 0..1 MS
* maritalStatus.coding 1..1
* maritalStatus.coding.code 1..1
* maritalStatus.coding.system 1..1
* maritalStatus ^definition =
"reason(s) why this should be supported."
//* maritalStatus.extension contains DateOfFirstMarriage named DateFirstMarried 0..1 MS
//* maritalStatus.extension[DateFirstMarried] ^definition =
// "reason(s) why this should be supported."
* link 1..*
* link.other only Reference(SpouseRelatedPerson or GuardianRelatedPerson or PatientMotherRelatedPerson or PatientFatherRelatedPerson or RelativeRelatedPerson or ChiefAtBirthRelatedPerson)
* contact 0..* MS
Expand Down Expand Up @@ -127,6 +125,7 @@ Description: "This profile acts as a base profile from which more specific Relat

* patient 1..1
* patient only Reference(ImmunizationPatient)
* relationship.coding 1..1
* relationship.coding.code 1..1
* relationship.coding.system 1..1
* name 0..* MS
Expand Down Expand Up @@ -185,6 +184,9 @@ Description: "A patient's highest education level attained"
* effectiveDateTime ^definition =
"reason(s) why this should be supported."
* valueCodeableConcept 1..1
* valueCodeableConcept.coding 1..1
* valueCodeableConcept.coding.code 1..1
* valueCodeableConcept.coding.system 1..1
* valueCodeableConcept from VSLOINCEducationLevelAttained (required)

Profile: TargetFacilityEncounter
Expand All @@ -194,32 +196,12 @@ Title: "Target Facility Encounter"
Description: "Represents the current facility at which the patient is receiving health services."
* status 1..1
* class 1..1
* class.coding 1..1
* class.coding.code = #AMB
* class.coding.system = "http://terminology.hl7.org/CodeSystem/v3-ActCode"
* subject 1..1
* actualPeriod 1..1

Profile: ServiceProvider
Parent: Organization
Id: organization
Title: "Organization"
Description: "Organization providing health related services."
* identifier 0..*
* identifier ^definition =
"reason(s) why this should be supported."
* identifier ^slicing.discriminator.type = #value
* identifier ^slicing.discriminator.path = "system"
* identifier ^slicing.rules = #open
* identifier ^slicing.ordered = false
* identifier ^slicing.description = "Slice based on the type of identifier."
* identifier contains
XX 1..1
* identifier[XX].value 1..1
* identifier[XX].system = "http://openhie.org/fhir/zambia-immunizations/identifier/organization"
* identifier[XX].type.coding.code = #XX
* identifier[XX].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[XX].type.text = "Organization identifier"
* name 1..1

Profile: GenericObservation
Parent: Observation
Id: generic-social-hsitory-observation-profile
Expand All @@ -228,6 +210,7 @@ Description: "This profile acts as a base profile from which more specific socia
* status 1..1
* code 1..1
* category 1..1
* category.coding 1..1
* category.coding.code 1..1
* category.coding.code = #social-history
* category.coding.system 1..1
Expand All @@ -237,6 +220,7 @@ Description: "This profile acts as a base profile from which more specific socia
* subject 1..1
* subject only Reference(ImmunizationPatient)
* valueCodeableConcept only CodeableConcept
* valueCodeableConcept.coding 1..1
* valueCodeableConcept.coding.system 1..1
* valueCodeableConcept.coding.code 1..1
* valueCodeableConcept.text 1..1
Expand Down Expand Up @@ -340,4 +324,95 @@ Description: "Records the home language for the patient"
* effectiveDateTime ^definition =
"reason(s) why this should be supported."
* valueCodeableConcept 1..1
* valueCodeableConcept from VSHomeLanguage (extensible)
* valueCodeableConcept from VSHomeLanguage (extensible)

Profile: MedicalInsurance
Parent: Coverage
Id: medical-insurance
Title: "Insurance or Medical Plan"
Description: "Insurance or medical plan details"
* status 1..1
* kind 1..1
* kind = #insurance
* beneficiary only Reference(ImmunizationPatient)
* subscriberId 1..1
* subscriberId.value 1..1
* subscriberId.system 1..1
* subscriberId.system = "http://openhie.org/fhir/zambia-immunizations/identifier/beneficiary-insurance-id"
* policyHolder 1..1
* policyHolder only Reference(MedicalInsuranceCompany)

Profile: MedicalInsuranceCompany
Parent: Organization
Id: medical-insurance-company
Title: "Medical Insurance Company"
Description: "A company that provides insurance to its subscribers that may include healthcare related policies."
* identifier 0..*
* identifier ^definition =
"reason(s) why this should be supported."
* identifier ^slicing.discriminator.type = #value
* identifier ^slicing.discriminator.path = "system"
* identifier ^slicing.rules = #open
* identifier ^slicing.ordered = false
* identifier ^slicing.description = "Slice based on the type of identifier."
* identifier contains
XX 0..1
* identifier[XX].value 1..1
* identifier[XX].system = "http://openhie.org/fhir/zambia-immunizations/identifier/medical-insurance-company"
* identifier[XX].type.coding.code = #XX
* identifier[XX].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[XX].type.text = "Medical insurance company identifier"
* type 1..1
* type.coding 1..1
* type.coding.code 1..1
* type.coding.system 1..1
* type.coding.system = "http://terminology.hl7.org/CodeSystem/organization-type"
* type.coding.code = #ins
* name 1..1

Profile: ServiceProvider
Parent: Organization
Id: healthcare-service-provider
Title: "Healthcare Service Provider"
Description: "An organization that provides healthcare services."
* identifier 0..*
* identifier ^definition =
"reason(s) why this should be supported."
* identifier ^slicing.discriminator.type = #value
* identifier ^slicing.discriminator.path = "system"
* identifier ^slicing.rules = #open
* identifier ^slicing.ordered = false
* identifier ^slicing.description = "Slice based on the type of identifier."
* identifier contains
XX 1..1
* identifier[XX].value 1..1
* identifier[XX].system = "http://openhie.org/fhir/zambia-immunizations/identifier/healthcare-service-provider"
* identifier[XX].type.coding.code = #XX
* identifier[XX].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[XX].type.text = "Healthcare service provider identifier"
* type 1..1
* type.coding 1..1
* type.coding.code 1..1
* type.coding.system 1..1
* type.coding.system = "http://terminology.hl7.org/CodeSystem/organization-type"
* type.coding.code = #prov
* name 1..1

Profile: Vaccines
Parent: Immunization
Id: Vaccines
Title: "Vaccine Administration"
Description: "Records the vaccine administered to the patient."
* status 1..1
* vaccineCode 1..1
* vaccineCode.coding 1..1
* vaccineCode.coding.code 1..1
* vaccineCode.coding.system 1..1
* vaccineCode from VSVaccines (extensible)
* patient 1..1
* patient only Reference(ImmunizationPatient)
* occurrenceDateTime 1..1
* occurrenceDateTime only dateTime
* encounter 1..1
* encounter only Reference(TargetFacilityEncounter)
* protocolApplied.doseNumber
Loading

0 comments on commit 5112961

Please sign in to comment.