diff --git a/_gencontinuous.sh b/_gencontinuous.sh old mode 100644 new mode 100755 diff --git a/_genonce.sh b/_genonce.sh index 38efcb44e..4f981f055 100755 --- a/_genonce.sh +++ b/_genonce.sh @@ -14,6 +14,8 @@ fi echo "$txoption" +export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8" + publisher=$input_cache_path/$publisher_jar if test -f "$publisher"; then java -jar $publisher -ig . $txoption $* diff --git a/_updatePublisher.bat b/_updatePublisher.bat index c89247652..67aebf583 100644 --- a/_updatePublisher.bat +++ b/_updatePublisher.bat @@ -216,4 +216,4 @@ start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updat IF "%skipPrompts%"=="true" ( PAUSE -} \ No newline at end of file +) diff --git a/_updatePublisher.sh b/_updatePublisher.sh index e28128be6..0f9ecbed9 100755 --- a/_updatePublisher.sh +++ b/_updatePublisher.sh @@ -31,11 +31,7 @@ while [ "$#" -gt 0 ]; do done echo "Checking internet connection" -case "$OSTYPE" in - linux-gnu* ) ping tx.fhir.org -4 -c 1 -w 1000 >/dev/null ;; - darwin* ) ping tx.fhir.org -c 1 >/dev/null ;; - *) echo "unknown: $OSTYPE"; exit 1 ;; -esac +curl -sSf tx.fhir.org > /dev/null if [ $? -ne 0 ] ; then echo "Offline (or the terminology server is down), unable to update. Exiting" @@ -121,13 +117,16 @@ if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then curl -L $gencont_sh_url -o /tmp/_gencontinuous.new cp /tmp/_gencontinuous.new _gencontinuous.sh + chmod +x _gencontinuous.sh rm /tmp/_gencontinuous.new curl -L $gen_sh_url -o /tmp/_genonce.new cp /tmp/_genonce.new _genonce.sh + chmod +x _genonce.sh rm /tmp/_genonce.new curl -L $update_sh_url -o /tmp/_updatePublisher.new cp /tmp/_updatePublisher.new _updatePublisher.sh + chmod +x _updatePublisher.sh rm /tmp/_updatePublisher.new fi diff --git a/input/fsh/alias.fsh b/input/fsh/alias.fsh index b4922c946..b3dbe81c4 100644 --- a/input/fsh/alias.fsh +++ b/input/fsh/alias.fsh @@ -27,8 +27,6 @@ Alias: $TPTEligibilityStatusCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/t Alias: $TPTAlternateFollowUpCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/tpt-alternate-follow-up-code-system Alias: $TPTFollowUpFollowUpCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/tpt-follow-up-code-system Alias: $TPTProphylaxisTypeCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/tpt-prophylaxis-type-code-system -Alias: $TPTAlternateProphylaxisTypeCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/tpt-alternate-prophylaxis-type-code-system -Alias: $TPT3HPFollowUpCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/tpt-3hp-follow-up-code-system Alias: $ARVTreatmentCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/arv-treatment-code-system Alias: $ReasonForARTEligibilityCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/reason-for-art-eligibility-code-system Alias: $ARTEligibilityStatusCodeSystem = http://moh.gov.et/fhir/hiv/CodeSystem/art-eligibility-status-code-system @@ -56,4 +54,5 @@ Alias: $ReferralReason = http://moh.gov.et/fhir/hiv/CodeSystem/referral-reason-c Alias: $EpisodeOfCareID = http://moh.gov.et/fhir/hiv/identifier/episode-of-care Alias: $EACGiven = http://moh.gov.et/fhir/hiv/CodeSystem/eac-given-code-system Alias: $TBScreeningDiagnosticTest = http://moh.gov.et/fhir/hiv/CodeSystem/tb-screening-diagnostic-test-type-code-system -Alias: $ReferenceRangeMeaning = http://terminology.hl7.org/CodeSystem/referencerange-meaning \ No newline at end of file +Alias: $ReferenceRangeMeaning = http://terminology.hl7.org/CodeSystem/referencerange-meaning +Alias: $TPTAlternateProphylaxisType = http://moh.gov.et/fhir/hiv/CodeSystem/tpt-alternate-prophylaxis-type-code-system \ No newline at end of file diff --git a/input/fsh/examples.fsh b/input/fsh/examples.fsh index 3a8b3800a..00f3133bf 100644 --- a/input/fsh/examples.fsh +++ b/input/fsh/examples.fsh @@ -468,33 +468,6 @@ Description: "Records the ARV Treatment details for the patient during an ART fo * reasonReference = Reference(AliveOnArtARTFollowupStatusExample) * basedOn = Reference(ARTAliveOnARTFollowUpCareplanExample) -Instance: TbTreatmentStartedMedicationStatementExample -InstanceOf: TBTreatmentMedicationStatement -Usage: #example -Title: "Medication Statement - Started Tuberculosis Treatment" -Description: "Records the Tuberculosis medication details for the patient who started treatment." -* status = #active -* reasonCode[+] = $LNC#LA6762-4 -* reasonCode[=].text = "Currently on TB treatment" -* medicationReference = Reference(TBMedicationExample) -* subject = Reference(GeneralPatientExample) -* context = Reference(GeneralEncounterExample) -* effectivePeriod.start = "2021-07-25" - -Instance: TbPreventiveTherapyStartedMedicationStatementExample -InstanceOf: TBPreventiveTherapyMedicationStatement -Usage: #example -Title: "Medication Statement - Started Tuberculosis Preventive Therapy" -Description: "Records the tuberculosis preventive therapy details for the patient who started treatment." -* status = #active -* reasonCode[+] = $SCT#699618001 -* reasonCode[=].text = "Administration of prophylactic antituberculosis agent" -* medicationReference = Reference(TBMedicationExample) -* subject = Reference(GeneralPatientExample) -* context = Reference(GeneralEncounterExample) -* effectivePeriod.start = "2021-07-25" -* basedOn[+] = Reference(TPTStartedExample) - Instance: CotrimoxazoleMedicationStatementExample InstanceOf: OIMedicationStatement Usage: #example @@ -718,7 +691,6 @@ Description: "Documents whether the patient is eligibile for TB Prevention Thera * effectiveDateTime = "2023-12-11" * performer = Reference(CurrentServiceProviderExample) * valueCodeableConcept = $YesNoCodeSystem#true -* derivedFrom[+] = Reference(ScreenedForTBExample) * derivedFrom[+] = Reference(TBScreeningExample) Instance: NotEligibleForTPTExample @@ -735,28 +707,9 @@ Description: "Documents whether the patient is eligibile for TB Prevention Thera * effectiveDateTime = "2023-12-11" * performer = Reference(CurrentServiceProviderExample) * valueCodeableConcept = $YesNoCodeSystem#false -* derivedFrom[+] = Reference(ScreenedForTBExample) * derivedFrom[+] = Reference(TBScreeningExample) * hasMember = Reference(ReasonNotEligibleForTPTExample) -Instance: EligibleForTPTAndLinkedToTPTCareExample -InstanceOf: EligibleForTPTObservation -Usage: #example -Title: "Observation - Eligible For TPT and Linked To TPT Care" -Description: "Indicates that the patient is eligibile for TB Prevention Therapy (TPT) and is lined to TPT care." -* status = #final -* category = $OBSERVATION_CATEGORY#exam -* code = $TPTEligibilityStatusCodeSystem#Eligible-For-TPT -* code.text = "Is Eligible for TPT" -* subject = Reference(GeneralPatientExample) -* encounter = Reference(GeneralEncounterExample) -* effectiveDateTime = "2023-12-11" -* performer = Reference(CurrentServiceProviderExample) -* valueCodeableConcept = $YesNoCodeSystem#true -* derivedFrom[+] = Reference(ScreenedForTBExample) -* derivedFrom[+] = Reference(TBScreeningExample) -* basedOn[+] = Reference(TPTStartedExample) - Instance: ReasonNotEligibleForTPTExample InstanceOf: ReasonNotEligibleForTPTObservation Usage: #example @@ -775,125 +728,6 @@ Description: "Documents the reason why the patient is not eligibile for TB Preve * derivedFrom[+] = Reference(ScreenedForTBExample) * derivedFrom[+] = Reference(TBScreeningExample) -Instance: TPTStartedExample -InstanceOf: TBPreventiveTherapyCareplan -Usage: #example -Title: "TPT Care Plan - Treatment Started with INH" -Description: "Used to record the TPT treatment started details for the patient." -* status = #active -* intent = #order -* category[+] = $SCT#1280002000 -* category[=].text = "Currently on TPT" -* subject = Reference(GeneralPatientExample) -* encounter = Reference(GeneralEncounterExample) - -* activity[TPTStarted][+].detail.code = $SCT#306807008 -* activity[TPTStarted][=].detail.code.text = "Recommendation to start drug treatment" -* activity[TPTStarted][=].detail.status = #completed -* activity[TPTStarted][=].detail.reasonReference = Reference(EligibleForTPTExample) -* activity[TPTStarted][=].detail.scheduledPeriod.start = "2023-11-27" - -* activity[ProphylaxisType][+].detail.code = $SCT#422181004 -* activity[ProphylaxisType][=].detail.code.text = "Administration of prophylactic antibiotic" -* activity[ProphylaxisType][=].detail.status = #completed -* activity[ProphylaxisType][=].detail.reasonCode = $LNC#LA6759-0 -* activity[ProphylaxisType][=].detail.scheduledPeriod.start = "2023-11-27" - -* activity[TPTFollowUp][+].detail.code = $SCT#185389009 -* activity[TPTFollowUp][=].detail.code.text = "Follow-up visit" -* activity[TPTFollowUp][=].detail.status = #completed -* activity[TPTFollowUp][=].detail.reasonCode = $TPTFollowUpFollowUpCodeSystem#INH1 -* activity[TPTFollowUp][=].detail.scheduledPeriod.start = "2023-11-27" - -Instance: TPTFollowUpExample -InstanceOf: TBPreventiveTherapyCareplan -Usage: #example -Title: "TPT Care Plan - Follow-up with INH" -Description: "Used to record the TPT treatment follow-up details for the patient." -* status = #active -* intent = #order -* category[+] = $SCT#1280002000 -* category[=].text = "Currently on TPT" -* subject = Reference(GeneralPatientExample) -* encounter = Reference(GeneralEncounterExample) - -* activity[ProphylaxisType][+].detail.code = $SCT#422181004 -* activity[ProphylaxisType][=].detail.code.text = "Administration of prophylactic antibiotic" -* activity[ProphylaxisType][=].detail.status = #completed -* activity[ProphylaxisType][=].detail.reasonCode = $LNC#LA6759-0 -* activity[ProphylaxisType][=].detail.scheduledPeriod.start = "2023-11-27" - -* activity[TPTFollowUp][+].detail.code = $SCT#185389009 -* activity[TPTFollowUp][=].detail.code.text = "Follow-up visit" -* activity[TPTFollowUp][=].detail.status = #completed -* activity[TPTFollowUp][=].detail.reasonCode = $TPTFollowUpFollowUpCodeSystem#INH1 -* activity[TPTFollowUp][=].detail.scheduledPeriod.start = "2023-11-27" - -Instance: TPTAlternateExample -InstanceOf: TBPreventiveTherapyCareplan -Usage: #example -Title: "TPT Care Plan - Alternate Prophylaxis Type" -Description: "Used to record the alternate TPT treatment details for the patient." -* status = #active -* intent = #order -* category[+] = $SCT#1280002000 -* category[=].text = "Currently on TPT" -* subject = Reference(GeneralPatientExample) -* encounter = Reference(GeneralEncounterExample) - -* activity[ProphylaxisType][+].detail.code = $SCT#422181004 -* activity[ProphylaxisType][=].detail.code.text = "Administration of prophylactic antibiotic" -* activity[ProphylaxisType][=].detail.status = #completed -* activity[ProphylaxisType][=].detail.reasonCode = $TPTProphylaxisTypeCodeSystem#Alternate -* activity[ProphylaxisType][=].detail.scheduledPeriod.start = "2023-11-27" - -* activity[AlternateProphylaxisType][+].detail.code = $SCT#182838006 -* activity[AlternateProphylaxisType][=].detail.code.text = "Change of medication" -* activity[AlternateProphylaxisType][=].detail.status = #completed -* activity[AlternateProphylaxisType][=].detail.reasonCode = $TPTAlternateProphylaxisTypeCodeSystem#3HP -* activity[AlternateProphylaxisType][=].detail.scheduledPeriod.start = "2023-11-27" - -* activity[AlternateTPTFollowUp][+].detail.code = $TPTAlternateFollowUpCodeSystem#TPT-Alternate-Follow-Up -* activity[AlternateTPTFollowUp][=].detail.code.text = "TPT Alternate Follow Up" -* activity[AlternateTPTFollowUp][=].detail.status = #completed -* activity[AlternateTPTFollowUp][=].detail.reasonCode = $TPT3HPFollowUpCodeSystem#TPT-3HP-M1 -* activity[AlternateTPTFollowUp][=].detail.scheduledPeriod.start = "2023-11-27" - -Instance: TPTCompletedExample -InstanceOf: TBPreventiveTherapyCareplan -Usage: #example -Title: "TPT Care Plan - Completed" -Description: "Used to record the TPT treatment ccompleted details for the patient." -* status = #active -* intent = #order -* category[+] = $SCT#1280002000 -* category[=].text = "Currently on TPT" -* subject = Reference(GeneralPatientExample) -* encounter = Reference(GeneralEncounterExample) - -* activity[TPTCompleted][+].detail.code = $SCT#255594003 -* activity[TPTCompleted][=].detail.code.text = "Complete" -* activity[TPTCompleted][=].detail.status = #completed -* activity[TPTCompleted][=].detail.scheduledPeriod.start = "2023-11-27" - -Instance: TPTContinuousExample -InstanceOf: TBPreventiveTherapyCareplan -Usage: #example -Title: "TPT Care Plan - Continuous Prophylaxis Type" -Description: "Used to record the continuous TPT treatment details for the patient." -* status = #active -* intent = #order -* category[+] = $SCT#1280002000 -* category[=].text = "Currently on TPT" -* subject = Reference(GeneralPatientExample) -* encounter = Reference(GeneralEncounterExample) - -* activity[ProphylaxisType][+].detail.code = $SCT#422181004 -* activity[ProphylaxisType][=].detail.code.text = "Administration of prophylactic antibiotic" -* activity[ProphylaxisType][=].detail.status = #completed -* activity[ProphylaxisType][=].detail.reasonCode = $TPTProphylaxisTypeCodeSystem#Continuous -* activity[ProphylaxisType][=].detail.scheduledPeriod.start = "2023-11-27" - Instance: ARTAliveOnARTFollowUpCareplanExample InstanceOf: ARTFollowUpCareplan Usage: #example @@ -2118,14 +1952,6 @@ Description: "Used to record the ARV regimen that will be prescribed to the pati * code = $ARVTreatmentCodeSystem#1j * code.text = "1j (TDF + 3TC + DTG)" -Instance: TBMedicationExample -InstanceOf: TBMedication -Usage: #example -Title: "Medication - Represents TB Medication" -Description: "Used to record the TB medication that will be prescribed to the patient." -* code = $LNC#18934-0 -* code.text = "Isoniazid" - Instance: CotrimoxazoleMedicationExample InstanceOf: OIMedication Usage: #example @@ -3564,7 +3390,7 @@ Description: "Indicates that the patient did start TB treatment after being test * hasMember[+] = Reference(TBDiagnosticTestResultExample) Instance: ActiveTBDiscontinuedObservationExample -InstanceOf: ActiveTBDiscontinuedObservation +InstanceOf: TreatmentDiscontinuedObservation Usage: #example Title: "Observation - Active TB Discontinued" Description: "Documents the details for the patient who discontinued TB treatment." @@ -3579,7 +3405,7 @@ Description: "Documents the details for the patient who discontinued TB treatmen * valueDateTime = "2023-12-11" Instance: ActiveTBCompletedObservationExample -InstanceOf: ActiveTBCompletedObservation +InstanceOf: TreatmentCompletedObservation Usage: #example Title: "Observation - Active TB Completed" Description: "Documents the details for the patient who completed TB treatment." @@ -3641,4 +3467,303 @@ Description: "Indicates that the patient's current TB treatment status is TBRx-c * performer = Reference(CurrentServiceProviderExample) * valueCodeableConcept = $TBTreatmentStatusCodeSystem#TBRx-completed * hasMember[ActiveTBCompleted] = Reference(ActiveTBCompletedObservationExample) -* derivedFrom = Reference(TBTreatmentStartedAfterDiagnosticTestObservationExample) \ No newline at end of file +* derivedFrom = Reference(TBTreatmentStartedAfterDiagnosticTestObservationExample) + +Instance: TPTStartedObservationExample +InstanceOf: TPTStartedObservation +Usage: #example +Title: "Observation - TPT Started" +Description: "Documents the date when the patient started TB Prevention Therapy (TPT)." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $SCT#422181004 +* code.text = "TPT start date" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueDateTime = "2023-12-11" +* derivedFrom = Reference(EligibleForTPTExample) + +Instance: TPTStartedWithINHObservationExample +InstanceOf: TPTStartedObservation +Usage: #example +Title: "Observation - TPT Started with INH" +Description: "Documents the date when the patient started TB Prevention Therapy (TPT) and in this case, with INH." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $SCT#422181004 +* code.text = "TPT start date" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueDateTime = "2023-12-11" +* derivedFrom = Reference(EligibleForTPTExample) +* hasMember = Reference(TBProphylaxisTypeINHObservationExample) + +Instance: TBProphylaxisTypeINHObservationExample +InstanceOf: TBProphylaxisTypeObservation +Usage: #example +Title: "Observation - TB Prophylaxis Type is \"Isoniazid (INH)\"" +Description: "Indicates that the patient is currently receiving INH." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $LNC#18934-0 + +Instance: TBProphylaxisTypeisINHAtFollowUpObservationExample +InstanceOf: TBProphylaxisTypeObservation +Usage: #example +Title: "Observation - TB Prophylaxis Type is \"Isoniazid (INH)\" at Follow-up" +Description: "Indicates that the patient is receiving another dose of INH at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $LNC#18934-0 +* hasMember[INHFollowUp] = Reference(INHAtFollowupObservationExample) + +Instance: TBProphylaxisTypeAlternateAndFor3HPObservationExample +InstanceOf: TBProphylaxisTypeObservation +Usage: #example +Title: "Observation - TB Prophylaxis Type is \"Alternate\" (3HP)" +Description: "Indicates that the patient will be receiving an alternate TPT as 3HP." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $TPTProphylaxisTypeCodeSystem#Alternate +* hasMember[AltenateProphylaxisType] = Reference(AlternateTBProphylaxisType3HPObservationExample) + +Instance: INHAtFollowupObservationExample +InstanceOf: INHAtFollowupObservation +Usage: #example +Title: "Observation - INH1 At Follow-up" +Description: "Indicates that the patient is receiving INH1 at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* code.text = "TPT follow-up isit" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#255216001 + +Instance: AlternateTBProphylaxisType3HPObservationExample +InstanceOf: AlternateTBProphylaxisTypeObservation +Usage: #example +Title: "Observation - Alternate TB Prophylaxis Type is \"3HP\"" +Description: "Indicates that the patient is currently receiving 3HP." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#346670008 +* hasMember[3HP] = Reference(AlternateTPT3HPAtFollowupObservationExample) + +Instance: AlternateTPT3HPAtFollowupObservationExample +InstanceOf: AlternateTPTAtFollowupObservation +Usage: #example +Title: "Observation - 3HP At Follow-up" +Description: "Documents the TPT as 3HP at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* code.text = "TPT follow-up isit" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#255216001 + +Instance: ProphylaxisTypeisINHAtFollowUpAndCompletedObservationExample +InstanceOf: TBProphylaxisTypeObservation +Usage: #example +Title: "Observation - TB Prophylaxis Type is \"Isoniazid (INH)\" at Follow-up and TPT was completed" +Description: "Indicates that the patient has completed INH at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $LNC#18934-0 +* hasMember[INHFollowUp] = Reference(INHAtFollowupCompletedObservationExample) + +Instance: INHAtFollowupCompletedObservationExample +InstanceOf: INHAtFollowupObservation +Usage: #example +Title: "Observation - INH Completed At Follow-up" +Description: "Indicates that the patient has completed INH at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* code.text = "TPT follow-up isit" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#182992009 +* hasMember[TPTCompleted] = Reference(TPTCompletedObservationExample) + +Instance: TPTCompletedObservationExample +InstanceOf: TreatmentCompletedObservation +Usage: #example +Title: "Observation - TPT Completed" +Description: "Documents the details for the patient who completed TPT." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $SCT#182992009 +* code.text = "Tuberculosis treatment completed" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueDateTime = "2023-12-11" + +Instance: TPTDiscontinuedObservationExample +InstanceOf: TreatmentDiscontinuedObservation +Usage: #example +Title: "Observation - TPT Discontinued" +Description: "Documents the details for the patient who discontinued TPT." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $SCT#182840001 +* code.text = "Tuberculosis treatment discontinued" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueDateTime = "2023-12-11" + +Instance: AlternateTPT3HPAtFollowupCompletedObservationExample +InstanceOf: AlternateTPTAtFollowupObservation +Usage: #example +Title: "Observation - 3HP Completed At Follow-up" +Description: "Indicates that the patient has completed 3HP at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* code.text = "TPT follow-up isit" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#255216001 +* hasMember[TPTCompleted] = Reference(TPTCompletedObservationExample) + +Instance: AlternateTBProphylaxisCompletedObservationExample +InstanceOf: AlternateTBProphylaxisTypeObservation +Usage: #example +Title: "Observation - Alternate TB Prophylaxis Type is \"3HP\" and TPT was Completed" +Description: "Indicates that the patient has completed 3HP." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#346670008 +* hasMember[3HP] = Reference(AlternateTPT3HPAtFollowupCompletedObservationExample) + +Instance: TBProphylaxisTypeAlternateAndFor3HRObservationExample +InstanceOf: TBProphylaxisTypeObservation +Usage: #example +Title: "Observation - TB Prophylaxis Type is \"Alternate\" (3HR)" +Description: "Indicates that the patient will be receiving an alternate TPT as 3HR." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $TPTProphylaxisTypeCodeSystem#Alternate +* hasMember[AltenateProphylaxisType] = Reference(AlternateTBProphylaxisType3HRObservationExample) + +Instance: AlternateTBProphylaxisType3HRObservationExample +InstanceOf: AlternateTBProphylaxisTypeObservation +Usage: #example +Title: "Observation - Alternate TB Prophylaxis Type is \"3HR\"" +Description: "Indicates that the patient is currently receiving 3HR." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#410831004 +* hasMember[3HR] = Reference(AlternateTPT3HRAtFollowupObservationExample) + +Instance: AlternateTPT3HRAtFollowupObservationExample +InstanceOf: AlternateTPTAtFollowupObservation +Usage: #example +Title: "Observation - 3HR At Follow-up" +Description: "Documents the TPT as 3HR at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* code.text = "TPT follow-up isit" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#255216001 + +Instance: AlternateTPT3HRAtFollowupDiscontinuedObservationExample +InstanceOf: AlternateTPTAtFollowupObservation +Usage: #example +Title: "Observation - 3HR Discontinued At Follow-up" +Description: "Indicates that the patient has discontinued 3HR at follow-up." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* code.text = "TPT follow-up isit" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#182840001 +* hasMember[TPTDiscontinued] = Reference(TPTDiscontinuedObservationExample) + +Instance: AlternateTBProphylaxisDiscontinuedObservationExample +InstanceOf: AlternateTBProphylaxisTypeObservation +Usage: #example +Title: "Observation - Alternate TB Prophylaxis Type is \"3HR\" and TPT was Discontinued" +Description: "Indicates that the patient has discontinued 3HR." +* status = #final +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* code.text = "Administered prophylaxis" +* subject = Reference(GeneralPatientExample) +* encounter = Reference(GeneralEncounterExample) +* effectiveDateTime = "2023-12-11" +* performer = Reference(CurrentServiceProviderExample) +* valueCodeableConcept = $SCT#410831004 +* hasMember[3HR] = Reference(AlternateTPT3HRAtFollowupDiscontinuedObservationExample) \ No newline at end of file diff --git a/input/fsh/invariant-constraints.fsh b/input/fsh/invariant-constraints.fsh index fb938de39..ff7aee699 100644 --- a/input/fsh/invariant-constraints.fsh +++ b/input/fsh/invariant-constraints.fsh @@ -13,21 +13,6 @@ Description: "If Observation.valueBoolean is false then Observation.hasMember SH Expression: "value = false implies Observation.hasMember.exists()" Severity: #error -Invariant: Careplan-TPT-1 -Description: "If CarePlan.activity.detail.reasonCode for slice \"ProphylaxisType\" is https://loinc.org/LA6759-0 then CarePlan.activity for slice \"TPTFollowUp\" SHALL be present." -Expression: "activity.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/tb-preventive-therapy-care-plan', 'ProphylaxisType').detail.reasonCode.coding.where(system = 'http://loinc.org' and code = 'LA6759-0').exists() implies activity.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/tb-preventive-therapy-care-plan', 'TPTFollowUp').exists()" -Severity: #error - -Invariant: Careplan-TPT-2 -Description: "If CarePlan.activity.detail.reasonCode for slice \"ProphylaxisType\" is \"Alternate\" then CarePlan.activity for slice \"AlternateProphylaxisType\" SHALL be present." -Expression: "activity.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/tb-preventive-therapy-care-plan', 'ProphylaxisType').detail.reasonCode.coding.where(system = 'http://moh.gov.et/fhir/hiv/CodeSystem/tpt-prophylaxis-type-code-system' and code = 'Alternate').exists() implies activity.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/tb-preventive-therapy-care-plan', 'AlternateProphylaxisType').exists()" -Severity: #error - -Invariant: Careplan-TPT-3 -Description: "If CarePlan.activity for slice \"AlternateProphylaxisType\" exists then CarePlan.activity for slice \"AlternateTPTFollowUp\" SHALL be present." -Expression: "activity.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/tb-preventive-therapy-care-plan', 'AlternateProphylaxisType').exists() implies activity.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/tb-preventive-therapy-care-plan', 'AlternateTPTFollowUp').exists()" -Severity: #error - Invariant: Observation-HIV-confirmed-1 Description: "If Observation.code is \"89365-1\" then Observation.category SHALL be \"exam\"." Expression: "code.coding.where(system = 'http://loinc.org' and code = '89365-1').exists() implies Observation.category.coding.where(system = 'http://terminology.hl7.org/CodeSystem/observation-category' and code = 'exam').exists()" @@ -146,4 +131,24 @@ Severity: #error Invariant: Observation-TB-Treatment-Started-1 Description: "If Observation.valueCodeableConcept.coding.code is \"true\" then extension for \"ObservedDate\" SHALL be present." Expression: "coding.where(system = 'http://moh.gov.et/fhir/hiv/CodeSystem/yes-no-code-system' and code = 'true').exists() implies extension.exists(url = 'http://moh.gov.et/fhir/hiv/StructureDefinition/observed-date')" +Severity: #error + +Invariant: Observation-INH-Follow-Up-1 +Description: "If Observation.valueCodeableConcept.coding.code is \"INH-discontinued\" then Observation.hasMember for slice \"TPTDiscontinued\" SHALL be present." +Expression: "value.coding.where(system = 'http://moh.gov.et/fhir/hiv/CodeSystem/inh-follow-up-code-system' and code = 'INH-discontinued').exists() implies hasMember.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/inh-at-follow-up-observation', 'TPTDiscontinued').exists()" +Severity: #error + +Invariant: Observation-INH-Follow-Up-2 +Description: "If Observation.valueCodeableConcept.coding.code is \"INH-completed\" then Observation.hasMember for slice \"TPTCompleted\" SHALL be present." +Expression: "value.coding.where(system = 'http://moh.gov.et/fhir/hiv/CodeSystem/inh-follow-up-code-system' and code = 'INH-completed').exists() implies hasMember.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/inh-at-follow-up-observation', 'TPTCompleted').exists()" +Severity: #error + +Invariant: Observation-alternate-tpt-Follow-Up-1 +Description: "If Observation.valueCodeableConcept.coding.code is \"182840001\" then Observation.hasMember for slice \"TPTDiscontinued\" SHALL be present." +Expression: "value.coding.where(system = 'http://snomed.info/sct' and code = '182840001').exists() implies hasMember.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/alternate-tpt-at-follow-up-observation', 'TPTDiscontinued').exists()" +Severity: #error + +Invariant: Observation-alternate-tpt-Follow-Up-2 +Description: "If Observation.valueCodeableConcept.coding.code is \"182992009\" then Observation.hasMember for slice \"TPTCompleted\" SHALL be present." +Expression: "value.coding.where(system = 'http://snomed.info/sct' and code = '182992009').exists() implies hasMember.slice('http://moh.gov.et/fhir/hiv/StructureDefinition/alternate-tpt-at-follow-up-observation', 'TPTCompleted').exists()" Severity: #error \ No newline at end of file diff --git a/input/fsh/profiles.fsh b/input/fsh/profiles.fsh index c26700dd5..eb68914f3 100644 --- a/input/fsh/profiles.fsh +++ b/input/fsh/profiles.fsh @@ -586,119 +586,6 @@ Description: "Documents the whether the patient is TB Active." "reason(s) why this should be supported." * derivedFrom only Reference(TBDiagnosticTestResultObservation) -Profile: EligibleForTPTObservation -Parent: GenericObservation -Id: tpt-eligbility-observation -Title: "Observation - TPT Eligibility" -Description: "Documents whether the patient is eligibile for TB Prevention Therapy (TPT)." -* obeys Observation-TB-Eligibility-1 -* category 1..1 -* category = $OBSERVATION_CATEGORY#exam -* code = $TPTEligibilityStatusCodeSystem#Eligible-For-TPT -* value[x] only CodeableConcept -* valueCodeableConcept 1..1 -* valueCodeableConcept from YesNoValueSet (required) -* derivedFrom 1..* -* derivedFrom only Reference(ScreenedForTBObservation or TBScreeningResultObservation) -* hasMember 0..1 MS -* hasMember ^definition = - "reason(s) why this should be supported." -* hasMember only Reference(ReasonNotEligibleForTPTObservation) -* basedOn 0..1 MS -* basedOn ^definition = - "reason(s) why this should be supported." -* basedOn only Reference(TBPreventiveTherapyCareplan) - -Profile: ReasonNotEligibleForTPTObservation -Parent: GenericObservation -Id: reason-not-eligbile-for-tpt-observation -Title: "Observation - Reason Not Eligibile For TPT" -Description: "Documents the reason why the patient is not eligibile for TB Prevention Therapy (TPT)." -* category 1..1 -* category = $OBSERVATION_CATEGORY#exam -* code = $TPTEligibilityStatusCodeSystem#TPT-Reason-Not-Eligible -* value[x] only CodeableConcept -* valueCodeableConcept 1..1 -* valueCodeableConcept from TPTReasonNotEligibileValueSet (required) -* valueCodeableConcept.text 1..1 - -Profile: TBPreventiveTherapyCareplan -Parent: CarePlan -Id: tb-preventive-therapy-care-plan -Title: "Care Plan - TB Preventive Therapy" -Description: "Used to record the TB preventive therapy details for the patient." -* obeys Careplan-TPT-1 and Careplan-TPT-2 and Careplan-TPT-3 -* status 1..1 -* intent 1..1 -* category 1..1 -* category = $SCT#1280002000 -* subject 1..1 -* subject only Reference(EthPatient) -* encounter 1..1 -* encounter only Reference(TargetFacilityEncounter) - -* activity 1..* -* activity.detail.code 1..1 -* activity.detail.code.coding only StrictCoding -* activity.detail.scheduledPeriod 1..1 -* activity.detail.scheduledPeriod.start 1..1 -* activity.detail.status 1..1 -* activity.detail.statusReason 0..1 MS -* activity.detail.statusReason ^definition = "reason(s) why this should be supported." -* activity.detail.statusReason from TBTreatmentStatusValueSet (required) -* activity.detail.statusReason.coding only StrictCoding - -* activity.detail.reasonCode.coding only StrictCoding - -* insert Slice(activity, reasons why this should be supported, value, detail.code, open, Slicing the TB Preventive Therapy activities based on the code value, false) - -* activity contains - TPTStarted 0..1 MS and - TPTCompleted 0..1 MS and - TPTDiscontinued 0..1 MS and - ProphylaxisType 0..1 MS and - AlternateProphylaxisType 0..1 MS and - TPTFollowUp 0..1 MS and - AlternateTPTFollowUp 0..1 MS - -* activity[TPTStarted] ^definition = "reason(s) why this should be supported." -* activity[TPTStarted].detail.code 1..1 -* activity[TPTStarted].detail.code = $SCT#306807008 -* activity[TPTStarted].detail.reasonReference 1..1 -* activity[TPTStarted].detail.reasonReference only Reference(TBDiagnosticTestResultObservation or EligibleForTPTObservation) - -* activity[ProphylaxisType] ^definition = "reason(s) why this should be supported." -* activity[ProphylaxisType].detail.code 1..1 -* activity[ProphylaxisType].detail.code = $SCT#422181004 -* activity[ProphylaxisType].detail.reasonCode 1..1 -* activity[ProphylaxisType].detail.reasonCode from TPTProphylaxisTypeValueSet (required) - -* activity[AlternateProphylaxisType] ^definition = "reason(s) why this should be supported." -* activity[AlternateProphylaxisType].detail.code 1..1 -* activity[AlternateProphylaxisType].detail.code = $SCT#182838006 -* activity[AlternateProphylaxisType].detail.reasonCode 1..1 -* activity[AlternateProphylaxisType].detail.reasonCode from AlternateTPTProphylaxisTypeValueSet (required) - -* activity[TPTFollowUp] ^definition = "reason(s) why this should be supported." -* activity[TPTFollowUp].detail.code 1..1 -* activity[TPTFollowUp].detail.code = $SCT#185389009 -* activity[TPTFollowUp].detail.reasonCode 1..1 -* activity[TPTFollowUp].detail.reasonCode from TPTFollowUpValueSet (required) - -* activity[AlternateTPTFollowUp] ^definition = "reason(s) why this should be supported." -* activity[AlternateTPTFollowUp].detail.code 1..1 -* activity[AlternateTPTFollowUp].detail.code = $TPTAlternateFollowUpCodeSystem#TPT-Alternate-Follow-Up -* activity[AlternateTPTFollowUp].detail.reasonCode 1..1 -* activity[AlternateTPTFollowUp].detail.reasonCode from AlternateTPTFollowUpValueSet (required) - -* activity[TPTCompleted] ^definition = "reason(s) why this should be supported." -* activity[TPTCompleted].detail.code 1..1 -* activity[TPTCompleted].detail.code = $SCT#255594003 - -* activity[TPTDiscontinued] ^definition = "reason(s) why this should be supported." -* activity[TPTDiscontinued].detail.code 1..1 -* activity[TPTDiscontinued].detail.code = $SCT#410545000 - Profile: ARTTreatmentMedicationStatement Parent: GenericMedicationStatement Id: arv-treatment-medication-statement @@ -711,28 +598,6 @@ Description: "Records the medication history for the HIV+ patient." * basedOn 1..1 * basedOn only Reference(ARTFollowUpCareplan) -Profile: TBTreatmentMedicationStatement -Parent: GenericMedicationStatement -Id: tb-treatment-medication-statement -Title: "Medication Statement - TB Treatment" -Description: "Records the medication history for the TB infected patient." -* medication[x] only Reference -* medicationReference only Reference(TBMedication) -* reasonCode 1..1 -* reasonCode = $LNC#LA6762-4 - -Profile: TBPreventiveTherapyMedicationStatement -Parent: GenericMedicationStatement -Id: tb-preventive-therapy-medication-statement -Title: "Medication Statement - TB Preventive Therapy" -Description: "Records the medication history for the patient who has been exposed to the TB infection." -* medication[x] only Reference -* medicationReference only Reference(TBMedication) -* reasonCode 1..1 -* reasonCode = $SCT#699618001 -* basedOn 1..1 -* basedOn only Reference(TBPreventiveTherapyCareplan) - Profile: OIMedicationStatement Parent: GenericMedicationStatement Id: oi-medication-statement @@ -769,7 +634,7 @@ Description: "Represents the reasons why a patient is considered eligibile for H * value[x] only CodeableConcept * valueCodeableConcept 1..1 -* insert Slice(valueCodeableConcept.coding, reasons why this should be supported, value, code, open, Slicing the eligibility reason based on the extension value, false) +* insert Slice(valueCodeableConcept.coding, reasons why this should be supported, value, code, open, Slicing the eligibility reason, false) * valueCodeableConcept.coding contains WhyEligible 1..* MS @@ -1471,7 +1336,7 @@ Description: "This is used to record the patient's cervical cancer screening res * code = $LNC#21864-4 * value[x] only CodeableConcept * valueCodeableConcept 1..1 -* insert Slice(valueCodeableConcept.coding, reasons why this should be supported, value, code, open, Slicing the screening result based on the extension value, false) +* insert Slice(valueCodeableConcept.coding, reasons why this should be supported, value, code, open, Slicing the screening result based on the value, false) * valueCodeableConcept.coding contains VIA 0..1 MS and @@ -1623,7 +1488,7 @@ Description: "This is used to record the type for the ARV regimen change categor * code = $SCT#182838006 * value[x] only CodeableConcept * valueCodeableConcept 1..1 -* insert Slice(valueCodeableConcept.coding, reasons why this should be supported, value, code, open, Slicing the screening result based on the extension value, false) +* insert Slice(valueCodeableConcept.coding, reasons why this should be supported, value, code, open, Slicing the screening result based on the value, false) * valueCodeableConcept.coding contains SwitchType 0..1 MS and @@ -1680,16 +1545,6 @@ Description: "Used to record the ARV regimen that will be prescribed to the pati * code from ARVTreatmentValueSet (required) * code.text 1..1 -Profile: TBMedication -Parent: Medication -Id: tb-medication -Title: "Medication - Represents TB Medication" -Description: "Used to record the TB medication that will be prescribed to the patient." -* code 1..1 -* code.coding only StrictCoding -* code from TBTreatmentValueSet (required) -* code.text 1..1 - Profile: OIMedication Parent: Medication Id: oi-medication @@ -2608,30 +2463,220 @@ Description: "Documents the patient's TB treatment status." * hasMember[ActiveTBDiscontinued] ^definition = "reason(s) why this should be supported." -* hasMember[ActiveTBDiscontinued] only Reference(ActiveTBDiscontinuedObservation) +* hasMember[ActiveTBDiscontinued] only Reference(TreatmentDiscontinuedObservation) * hasMember[ActiveTBCompleted] ^definition = "reason(s) why this should be supported." -* hasMember[ActiveTBCompleted] only Reference(ActiveTBCompletedObservation) +* hasMember[ActiveTBCompleted] only Reference(TreatmentCompletedObservation) -Profile: ActiveTBDiscontinuedObservation +Profile: TreatmentDiscontinuedObservation Parent: GenericObservation -Id: active-tb-discontinued-observation -Title: "Observation - Active TB Discontinued" -Description: "Documents the details for the patient who discontinued TB treatment." +Id: treatment-discontinued-observation +Title: "Observation - Treatment Discontinued" +Description: "Documents the details for the patient who discontinued treatment." * category 1..1 * category = $OBSERVATION_CATEGORY#therapy * code = $SCT#182840001 * value[x] only dateTime * valueDateTime 1..1 -Profile: ActiveTBCompletedObservation +Profile: TreatmentCompletedObservation Parent: GenericObservation -Id: active-tb-completed-observation -Title: "Observation - Active TB Completed" -Description: "Documents the details for the patient who completed TB treatment." +Id: treatment-completed-observation +Title: "Observation - Treatment Completed" +Description: "Documents the details for the patient who completed treatment." * category 1..1 * category = $OBSERVATION_CATEGORY#therapy * code = $SCT#182992009 * value[x] only dateTime -* valueDateTime 1..1 \ No newline at end of file +* valueDateTime 1..1 + +Profile: EligibleForTPTObservation +Parent: GenericObservation +Id: tpt-eligbility-observation +Title: "Observation - TPT Eligibility" +Description: "Documents whether the patient is eligibile for TB Prevention Therapy (TPT)." +* obeys Observation-TB-Eligibility-1 +* category 1..1 +* category = $OBSERVATION_CATEGORY#exam +* code = $TPTEligibilityStatusCodeSystem#Eligible-For-TPT +* value[x] only CodeableConcept +* valueCodeableConcept 1..1 +* valueCodeableConcept from YesNoValueSet (required) +* derivedFrom 1..1 +* derivedFrom only Reference(TBScreeningResultObservation) +* hasMember 0..1 MS +* hasMember ^definition = + "reason(s) why this should be supported." +* hasMember only Reference(ReasonNotEligibleForTPTObservation) + +Profile: ReasonNotEligibleForTPTObservation +Parent: GenericObservation +Id: reason-not-eligbile-for-tpt-observation +Title: "Observation - Reason Not Eligibile For TPT" +Description: "Documents the reason why the patient is not eligibile for TB Prevention Therapy (TPT)." +* category 1..1 +* category = $OBSERVATION_CATEGORY#exam +* code = $TPTEligibilityStatusCodeSystem#TPT-Reason-Not-Eligible +* value[x] only CodeableConcept +* valueCodeableConcept 1..1 +* valueCodeableConcept from TPTReasonNotEligibileValueSet (required) +* valueCodeableConcept.text 1..1 + +Profile: TPTStartedObservation +Parent: GenericObservation +Id: tpt-started-observation +Title: "Observation - TPT Started" +Description: "Documents the date when the patient started TB Prevention Therapy (TPT)." +* category 1..1 +* category = $OBSERVATION_CATEGORY#therapy +* value[x] only dateTime +* valueDateTime 1..1 +* code = $SCT#422181004 +* derivedFrom 0..1 MS +* derivedFrom ^definition = + "reason(s) why this should be supported." +* derivedFrom only Reference(EligibleForTPTObservation) +* hasMember 0..* MS +* hasMember ^definition = + "reason(s) why this should be supported." +* hasMember only Reference(TBProphylaxisTypeObservation) + +Profile: TBProphylaxisTypeObservation +Parent: GenericObservation +Id: tb-prophylaxis-type-observation +Title: "Observation - TB Prophylaxis Type" +Description: "Documents the type of prophylaxis the patient is currently receiving." +* category 1..1 +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* value[x] only CodeableConcept +* valueCodeableConcept 1..1 +* valueCodeableConcept from TPTProphylaxisTypeValueSet (required) + +* hasMember 0..* MS +* hasMember ^definition = + "reason(s) why this should be supported." + +* insert SliceForResolve(hasMember, reasons why this should be supported, open, Slicing hasMember based on the profile value, false) + +* hasMember contains + INHFollowUp 0..1 MS and + AltenateProphylaxisType 0..1 MS + +* hasMember[INHFollowUp] ^definition = + "reason(s) why this should be supported." +* hasMember[INHFollowUp] only Reference(INHAtFollowupObservation) + +* hasMember[AltenateProphylaxisType] ^definition = + "reason(s) why this should be supported." +* hasMember[AltenateProphylaxisType] only Reference(AlternateTBProphylaxisTypeObservation) + +Profile: INHAtFollowupObservation +Parent: GenericObservation +Id: inh-at-follow-up-observation +Title: "Observation - INH At Follow-up" +Description: "Indicates that the patient is receiving INH at follow-up." +* obeys Observation-INH-Follow-Up-1 and Observation-INH-Follow-Up-2 +* category 1..1 +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* value[x] only CodeableConcept +* valueCodeableConcept 1..1 +* valueCodeableConcept from MonthOrdinalsValueSet (extensible) +* valueCodeableConcept ^binding.extension[+].extension[+].url = "purpose" +* valueCodeableConcept ^binding.extension[=].extension[=].valueCode = #required +* valueCodeableConcept ^binding.extension[=].extension[+].url = "valueSet" +* valueCodeableConcept ^binding.extension[=].extension[=].valueCanonical = "http://moh.gov.et/fhir/hiv/ValueSet/treatment-outcome-value-set" +* valueCodeableConcept ^binding.extension[=].extension[+].url = "documentation" +* valueCodeableConcept ^binding.extension[=].extension[=].valueMarkdown = "A list of codes indicating the status of the treatment." +* valueCodeableConcept ^binding.extension[=].url = "http://hl7.org/fhir/tools/StructureDefinition/additional-binding" + +* hasMember 0..* MS +* hasMember ^definition = + "reason(s) why this should be supported." + +* insert SliceForResolve(hasMember, reasons why this should be supported, open, Slicing hasMember based on the profile value, false) + +* hasMember contains + TPTDiscontinued 0..1 MS and + TPTCompleted 0..1 MS + +* hasMember[TPTDiscontinued] ^definition = + "reason(s) why this should be supported." +* hasMember[TPTDiscontinued] only Reference(TreatmentDiscontinuedObservation) + +* hasMember[TPTCompleted] ^definition = + "reason(s) why this should be supported." +* hasMember[TPTCompleted] only Reference(TreatmentCompletedObservation) + +Profile: AlternateTBProphylaxisTypeObservation +Parent: GenericObservation +Id: alternate-tb-prophylaxis-type-observation +Title: "Observation - Alternate TB Prophylaxis Type" +Description: "Documents the alternate type of prophylaxis the patient is currently receiving." +* category 1..1 +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LP149760-3 +* value[x] only CodeableConcept +* valueCodeableConcept 1..1 +* valueCodeableConcept from AlternateTPTProphylaxisTypeValueSet (required) +* hasMember 1..* + +* insert SliceForResolve(hasMember, reasons why this should be supported, open, Slicing hasMember based on the profile value, false) +* hasMember ^slicing.discriminator[+].type = #value +* hasMember ^slicing.discriminator[=].path = "resolve().value.ofType(CodeableConcept).coding" +* hasMember ^slicing.discriminator[+].type = #value +* hasMember ^slicing.discriminator[=].path = "display" + +* hasMember contains + 3HP 0..1 MS and + 3HR 0..1 MS + +* hasMember[3HP] ^definition = + "reason(s) why this should be supported." +* hasMember[3HP] only Reference(AlternateTPTAtFollowupObservation) +* hasMember[3HP].display = "3HP" + +* hasMember[3HR] ^definition = + "reason(s) why this should be supported." +* hasMember[3HR] only Reference(AlternateTPTAtFollowupObservation) +* hasMember[3HR].display = "3HR" + +Profile: AlternateTPTAtFollowupObservation +Parent: GenericObservation +Id: alternate-tpt-at-follow-up-observation +Title: "Observation - Alternate TPT At Follow-up" +Description: "Documents the alternate TPT at follow-up." +* obeys Observation-alternate-tpt-Follow-Up-1 and Observation-alternate-tpt-Follow-Up-2 +* category 1..1 +* category = $OBSERVATION_CATEGORY#therapy +* code = $LNC#LA21590-7 +* value[x] only CodeableConcept +* valueCodeableConcept 1..1 +* valueCodeableConcept from MonthOrdinalsValueSet (extensible) +* valueCodeableConcept ^binding.extension[+].extension[+].url = "purpose" +* valueCodeableConcept ^binding.extension[=].extension[=].valueCode = #required +* valueCodeableConcept ^binding.extension[=].extension[+].url = "valueSet" +* valueCodeableConcept ^binding.extension[=].extension[=].valueCanonical = "http://moh.gov.et/fhir/hiv/ValueSet/treatment-outcome-value-set" +* valueCodeableConcept ^binding.extension[=].extension[+].url = "documentation" +* valueCodeableConcept ^binding.extension[=].extension[=].valueMarkdown = "A list of codes indicating the status of the treatment." +* valueCodeableConcept ^binding.extension[=].url = "http://hl7.org/fhir/tools/StructureDefinition/additional-binding" + +* hasMember 0..* MS +* hasMember ^definition = + "reason(s) why this should be supported." + +* insert SliceForResolve(hasMember, reasons why this should be supported, open, Slicing hasMember based on the profile value, false) + +* hasMember contains + TPTDiscontinued 0..1 MS and + TPTCompleted 0..1 MS + +* hasMember[TPTDiscontinued] ^definition = + "reason(s) why this should be supported." +* hasMember[TPTDiscontinued] only Reference(TreatmentDiscontinuedObservation) + +* hasMember[TPTCompleted] ^definition = + "reason(s) why this should be supported." +* hasMember[TPTCompleted] only Reference(TreatmentCompletedObservation) \ No newline at end of file diff --git a/input/fsh/terminology.fsh b/input/fsh/terminology.fsh index 33eba0606..506430470 100644 --- a/input/fsh/terminology.fsh +++ b/input/fsh/terminology.fsh @@ -456,7 +456,7 @@ Description: "A list of codes describing the medication for opportunistic infect * $LNC#18998-5 "Trimethoprim+Sulfamethoxazole [Susceptibility]" * $LNC#18924-1 "Fluconazole [Susceptibility]" -ValueSet: TBTreatmentValueSet +/*ValueSet: TBTreatmentValueSet Id: tb-treatment-value-set Title: "Tuberculosis Medication Codes" Description: "A list of codes describing Tuberculosis medication." @@ -472,7 +472,7 @@ Description: "A list of codes describing Tuberculosis medication." * $LNC#31039-1 "Moxifloxacin [Susceptibility]" * $LNC#18982-9 "Streptomycin [Susceptibility]" * $LNC#100059-5 "Rifapentine [Susceptibility]" -* include codes from system AlternateTPTProphylaxisTypeCodeSystem +* include codes from system AlternateTPTProphylaxisTypeCodeSystem*/ ValueSet: TBScreeningTypeValueSet Id: tb-screening-type-value-set @@ -599,78 +599,43 @@ Id: tpt-prophylaxis-type-value-set Title: "TPT Prophylaxis Type Codes" Description: "A list of codes describing the TPT prophylaxis type." * ^experimental = false -* $LNC#LA6759-0 "Currently on INH prophylaxis dose, adherence" +* $LNC#18934-0 "Isoniazid [Susceptibility]" * include codes from system TPTProphylaxisTypeCodeSystem -CodeSystem: TPTFollowUpCodeSystem -Id: tpt-follow-up-code-system -Title: "TPT Follow-Up Codes" -Description: "A list of codes indicating the TPT follow-up status." +ValueSet: TreatmentOutcomeValueSet +Id: treatment-outcome-value-set +Title: "Treatment Outcome Codes" +Description: "A list of codes indicating the status of the treatment." * ^experimental = false -* ^caseSensitive = true -* #INH1 "INH1" -* #INH2 "INH2" -* #INH3 "INH3" -* #INH4 "INH4" -* #INH5 "INH5" -* #INH6 "INH6" -* #INH-completed "INH completed" -* #INH-discontinued "INH discontinued" - -ValueSet: TPTFollowUpValueSet -Id: tpt-follow-up-value-set -Title: "TPT Follow-Up Codes" -Description: "A list of codes indicating the TPT follow-up status." -* ^experimental = false -* include codes from system TPTFollowUpCodeSystem - -CodeSystem: AlternateTPTProphylaxisTypeCodeSystem -Id: tpt-alternate-prophylaxis-type-code-system -Title: "Alternate TPT Prophylaxis Type Codes" -Description: "A list of codes describing the alternate TPT prophylaxis types to INH." +* $SCT#182992009 "Treatment completed" +* $SCT#182840001 "Drug treatment stopped - medical advice" + +ValueSet: MonthOrdinalsValueSet +Id: month-ordinals-value-set +Title: "Month Ordinal Codes" +Description: "A list of codes indicating the month ordinals." * ^experimental = false -* ^caseSensitive = true -* #3HP "Isoniazid (INH) and Rifapentine (RPT)" -* #3HR "Isoniazid (INH) and Rifampin (RIF)" +* $SCT#255216001 "First" +* $SCT#81170007 "Second" +* $SCT#70905002 "Third" +* $SCT#29970001 "Fourth" +* $SCT#32088001 "Fifth" +* $SCT#53046009 "Sixth" ValueSet: AlternateTPTProphylaxisTypeValueSet Id: tpt-alternate-prophylaxis-type-value-set Title: "Alternate TPT Prophylaxis Type Codes" Description: "A list of codes describing the alternate TPT prophylaxis types to INH." * ^experimental = false -* include codes from system AlternateTPTProphylaxisTypeCodeSystem +* $SCT#346670008 "Product containing isoniazid and rifampicin" +* $SCT#410831004 "Product containing rifapentine" -CodeSystem: TPT3HPFollowUpCodeSystem -Id: tpt-3hp-follow-up-code-system -Title: "TPT 3HP Follow-Up Codes" -Description: "A list of 3HP codes indicating the alternate TPT follow-up status." -* ^experimental = false -* ^caseSensitive = true -* #TPT-3HP-M1 "TPT(3HP)M1" -* #TPT-3HP-M2 "TPT(3HP)M2" -* #TPT-3HP-M3 "TPT(3HP)M3" -* #TPT-3HP-completed "TPT(3HP)completed" -* #TPT-3HP-discontinued "TPT(3HP)discontinued" - -CodeSystem: TPT3HRFollowUpCodeSystem -Id: tpt-3hr-follow-up-code-system +/*ValueSet: TPT3HRFollowUpValueSet +Id: tpt-3hr-follow-up-value-set Title: "TPT 3HR Follow-Up Codes" Description: "A list of 3HR codes indicating the alternate TPT follow-up status." * ^experimental = false -* ^caseSensitive = true -* #TPT-3HR-M1 "TPT(3HR)M1" -* #TPT-3HR-M2 "TPT(3HR)M2" -* #TPT-3HR-M3 "TPT(3HR)M3" -* #TPT-3HR-completed "TPT(3HR)completed" -* #TPT-3HR-discontinued "TPT(3HR)discontinued" - -ValueSet: AlternateTPTFollowUpValueSet -Id: tpt-alternate-follow-up-value-set -Title: "Alternate TPT Follow-Up Codes" -Description: "A list of codes indicating the alternate TPT follow-up status." -* ^experimental = false -* include codes from system TPT3HPFollowUpCodeSystem -* include codes from system TPT3HRFollowUpCodeSystem +* include codes from system TPT3HRFollowUpCodeSystem*/ CodeSystem: TPTAlternateFollowUpCodeSystem Id: tpt-alternate-follow-up-code-system