Skip to content

Commit

Permalink
hpv-profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Xhanti2309 committed Feb 8, 2024
1 parent 3e0b341 commit 717fea3
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 16 deletions.
20 changes: 19 additions & 1 deletion input/fsh/extensions.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,22 @@ Description: "This is an extension to capture that patient's administrative sex.
* valueCodeableConcept from AdministrativeSex (required)
* value[x] 1..
* ^context[+].type = #element
* ^context[=].expression = "Patient"
* ^context[=].expression = "Patient"
* ^context[+].type = #element
* ^context[=].expression = "Observation"

Extension: HPVPatientVaccinationRegistrationDate
Id: hpv-vaccination-patient-registration-date
Title: "HPV Patient Registration Date"
Description: "A date representing when the patient was registered for HPV vaccination."
* value[x] only dateTime
* ^context[0].type = #element
* ^context[0].expression = "Immunization"

Extension: HPVVaccineBatchNumber
Id: hpv-vaccine-batch-number
Title: "HPV Vaccine Batch Number"
Description: "This is to document the vaccine batch number."
* value[x] only string
* ^context[0].type = #element
* ^context[0].expression = "Immunization"
100 changes: 100 additions & 0 deletions input/fsh/hpv-examples.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Instance: HPVPatientExample
InstanceOf: HPVPatient
Usage: #example
Title: "HPV Patient Example"
Description: "Is used to document demographics and other administrative information about an individual receiving care or other health-related services."
* identifier[CN].value = "CN0000000"
* identifier[CN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/cn" (exactly)
* identifier[PN].value = "PN0000000"
* identifier[PN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/pn" (exactly)
* identifier[PN].type.coding.code = #PPN
* identifier[PN].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[PN].type.coding.display = "Passport number"
* identifier[PN].type.text = "Patient passport number"

* name.family = "Zinga"
* name.given[0] = "Zam"
* name.given[1] = "Bia"
* name.given[0] = "Dolo"

* birthDate = "2000-01-01"
* link.other = Reference(HPVRelatedPersonExample)
* link.type = #refer

* telecom[email].value = "[email protected]"
* telecom[email].system = #email
* telecom[phone].value = "+27821234567"
* telecom[phone].system = #phone

* address.city = "Ndola"
* address.line[0] = "100"
* address.line[1] = "Zimi Road"
* address.line[2] = "Ndola City"
* address.district = "Ndola District"
* address.state = "Copperbelt Province"
* address.country = "Zambia"

* managingOrganization = Reference(OrganizationExample)
* extension[sex].valueCodeableConcept = $SEX#F

Instance: HPVRelatedPersonExample
InstanceOf: HPVRelatedPerson
Usage: #example
Title: "HPV Related Person Example"
Description: "This is used to document details of the guardian related to the HPV Patient."
* identifier[CN].value = "CN0000000"
* identifier[CN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/cn" (exactly)
* identifier[PN].value = "PN0000000"
* identifier[PN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/pn" (exactly)
* identifier[PN].type.coding.code = #PPN
* identifier[PN].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[PN].type.coding.display = "Passport number"
* identifier[PN].type.text = "Patient passport number"
* patient = Reference(HPVPatientExample)

Instance: HPVImmunocomprommisedExample
InstanceOf: HPVImmunocomprommised
Usage: #example
Title: "HPV Immunocomprommised"
Description: "This is to document whether the HPV patient has been observed to be immunocomprommised."
* status = #final
* code.coding.code = #370388006
* code.coding.system = $SCT
* code.coding.display = "Patient immunocompromised (finding)"
* code.text = "Immunocompromised"
* subject = Reference(HPVPatientExample)
* encounter = Reference(HPVEncounterExample)
* effectiveDateTime = "2024-01-31"
* valueBoolean = true
* performer = Reference(OrganizationExample)

Instance: HPVEncounterExample
InstanceOf: HPVEncounter
Usage: #example
Title: "HPV Encounter Example"
Description: "This is to document the patient visit at the facility related to HPV."
* status = #completed
* class.coding.code = #AMB
* class.coding.system = "http://terminology.hl7.org/CodeSystem/v3-ActCode"
* subject = Reference(HPVPatientExample)
* serviceProvider = Reference(OrganizationExample)
* actualPeriod.start = "2024-01-31"
* actualPeriod.end = "2024-01-31"

Instance: HPVImmunizationExample
InstanceOf: HPVImmunization
Usage: #example
Title: "HPV Immunization Example"
Description: "Records the vaccine administered to the patient."
* status = #completed
* occurrenceDateTime = "2024-01-31"
* vaccineCode.coding.code = #836374004
* vaccineCode.coding.system = $SCT
* vaccineCode.coding.display = "Hepatitis B virus antigen-containing vaccine product"
* vaccineCode.text = "Vaccine Name"
* patient = Reference(HPVPatientExample)
* encounter = Reference(HPVEncounterExample)
* performer.actor = Reference(OrganizationExample)
* protocolApplied.doseNumber = "DN0000000"
* extension[HPVPatientVaccinationRegistrationDate].valueDateTime = "2024-01-31"
* extension[HVBN].valueString = "BN0000000"
145 changes: 145 additions & 0 deletions input/fsh/hpv.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
Profile: HPVPatient
Parent: Patient
Id: hpv-patient
Title: "HPV Patient"
Description: "Is used to document demographics and other administrative information about an individual receiving care or other health-related services."
* identifier 1..*
* 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
CN 1..1 and
PN 0..1 MS and
NRC 0..1 MS
* identifier[CN].value 1..1
* identifier[CN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/cn"

* identifier[PN] ^definition =
"reason(s) why this should be supported."
* identifier[PN].value 1..1
* obeys PN-Passport
* identifier[PN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/pn"
* identifier[PN].type.coding.code = #PPN
* identifier[PN].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[PN].type.coding.display = "Passport number"
* identifier[PN].type.text = "Patient passport number"

* identifier[NRC] ^definition =
"reason(s) why this should be supported."
* identifier[NRC].value 1..1
* obeys NRC-SmartcareID-1
* identifier[NRC].system 1..1
* identifier[NRC].system = "http://openhie.org/fhir/zambia-immunizations/identifier/patient-nrc"

* name 1..*
* name.family 1..1
* name.given 1..*

* birthDate 1..1
* link 0..*
* link ^definition =
"reason(s) why this should be supported."
* link.other 1..1
* link.type 1..1
* link.other only Reference(HPVRelatedPerson)

* telecom 0..*
* telecom ^slicing.discriminator.type = #value
* telecom ^slicing.discriminator.path = "system"
* telecom ^slicing.rules = #open
* telecom ^slicing.ordered = false
* telecom ^slicing.description = "Slice based on the type of telecom system."
* telecom contains
email 0..* and
phone 0..*
* telecom ^definition =
"reason(s) why this should be supported."
* telecom[email].value 1..1
* telecom[email].system = #email
* telecom[phone].value 1..1
* telecom[phone].system = #phone

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

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

* extension contains AdministrativeSex named sex 1..1

Profile: HPVRelatedPerson
Parent: RelatedPerson
Id: hpv-related-person
Title: "HPV Related Person"
Description: "This is used to document details of the guardian related to the HPV Patient."
* identifier 0..*
* 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
CN 0..1 MS and
PN 0..* MS
* identifier[CN].value 1..1
* identifier[CN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/cn"
* identifier[PN].value 1..1
* identifier[PN].system = "http://openhie.org/fhir/zambia-immunizations/identifier/pn"
* identifier[PN].type.coding.code = #PPN
* identifier[PN].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[PN].type.coding.display = "Passport number"
* identifier[PN].type.text = "Patient passport number"
* patient 1..1
* patient only Reference(HPVPatient)

Profile: HPVImmunocomprommised
Parent: Observation
Id: hpv-immunocomprommised
Title: "HPV Immunocomprommised"
Description: "This is to document whether the HPV patient has been observed to be immunocomprommised."
* status = #final
* code = $SCT#370388006
* code.text = "Immunocompromised"
* subject 1..1
* encounter 1..1
* effectiveDateTime 1..1
* valueBoolean 1..1
* performer 1..*

Profile: HPVEncounter
Parent: TargetFacilityEncounter
Id: hpv-encounter
Title: "HPV Encounter"
Description: "This is to document the patient visit at the facility related to HPV."
* serviceProvider 0..1 MS
* serviceProvider ^definition =
"reason(s) why this should be supported."

Profile: HPVImmunization
Parent: Immunization
Id: hpv-immunization
Title: "HPV Immunization"
Description: "Records the vaccine administered to the patient."
* status 1..1
* vaccineCode 1..1
* patient 1..1
* encounter 0..1 MS
* encounter ^definition =
"reason(s) why this should be supported."
* occurrenceDateTime 1..1
* vaccineCode = $SCT#836374004
* performer.actor 1..1
* protocolApplied.doseNumber 1..1
* extension contains HPVPatientVaccinationRegistrationDate named HPVRD 0..1 MS
* extension[HPVRD] ^definition =
"reason(s) why this should be supported."
* extension contains HPVVaccineBatchNumber named HVBN 0..1 MS
19 changes: 19 additions & 0 deletions input/fsh/invariant-constraints.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Invariant: NUPIN-SmartcareID-1
Description: "Only letters, special characters (dash) and numbers are allowed. For example: 1001-XXGB0-12345-5, 5010-010-12345-5"
Expression: "$this.matches('[0-9A-Za-z]{1,4}-[0-9A-Za-z]{1,5}-[0-9]{1,5}-[0-9]{1}')"
Severity: #error

Invariant: NRC-SmartcareID-1
Description: "Only special characters (forward slash) and numbers are allowed. For example: 999999/99/9"
Expression: "$this.matches('[0-9]{1,6}/[0-9]{1,2}/[0-9]{1}')"
Severity: #error

Invariant: PatientName-Smartcare-1
Description: "If name.use is NOT nickname then name.family SHALL be present."
Expression: "use.exists() and use != 'nickname' implies family.exists()"
Severity: #error

Invariant: PN-Passport
Description: "Only uppercase alphanumeric characters and numbers are allowed. For example: AA000000"
Expression: "$this.matches('[A-Z]{1,2}[0-9]{1,8}')"
Severity: #error
15 changes: 0 additions & 15 deletions input/fsh/smartcare.fsh
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
Invariant: NUPIN-SmartcareID-1
Description: "Only letters, special characters (dash) and numbers are allowed. For example: 1001-XXGB0-12345-5, 5010-010-12345-5"
Expression: "$this.matches('[0-9A-Za-z]{1,4}-[0-9A-Za-z]{1,5}-[0-9]{1,5}-[0-9]{1}')"
Severity: #error

Invariant: NRC-SmartcareID-1
Description: "Only special characters (forward slash) and numbers are allowed. For example: 999999/99/9"
Expression: "$this.matches('[0-9]{1,6}/[0-9]{1,2}/[0-9]{1}')"
Severity: #error

Invariant: PatientName-Smartcare-1
Description: "If name.use is NOT nickname then name.family SHALL be present."
Expression: "use.exists() and use != 'nickname' implies family.exists()"
Severity: #error

Profile: ImmunizationPatient
Parent: Patient
Id: immunization-patient
Expand Down

0 comments on commit 717fea3

Please sign in to comment.