From a4f757435a68da9b3f16ddca920c437e17b597de Mon Sep 17 00:00:00 2001 From: gabriel090 Date: Tue, 5 Apr 2022 18:43:15 +0300 Subject: [PATCH 1/3] created height field --- .../library/hiv/art/BMICalculation.java | 64 +++++++++++++++++++ .../art/HeightAtArtInitiationCalculation.java | 64 +++++++++++++++++++ .../library/models/PatientSummary.java | 22 ++++++- .../SummariesFragmentController.java | 30 ++++++--- omod/src/main/webapp/fragments/summaries.gsp | 10 ++- 5 files changed, 177 insertions(+), 13 deletions(-) create mode 100644 api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BMICalculation.java create mode 100644 api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/HeightAtArtInitiationCalculation.java diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BMICalculation.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BMICalculation.java new file mode 100644 index 0000000000..2a5fe951fe --- /dev/null +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BMICalculation.java @@ -0,0 +1,64 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.kenyaemr.calculation.library.hiv.art; + +import org.openmrs.Concept; +import org.openmrs.Obs; +import org.openmrs.calculation.patient.PatientCalculationContext; +import org.openmrs.calculation.result.CalculationResultMap; +import org.openmrs.calculation.result.ListResult; +import org.openmrs.calculation.result.SimpleResult; +import org.openmrs.module.kenyacore.calculation.AbstractPatientCalculation; +import org.openmrs.module.kenyacore.calculation.CalculationUtils; +import org.openmrs.module.kenyacore.calculation.Calculations; +import org.openmrs.module.kenyaemr.Dictionary; +import org.openmrs.module.kenyaemr.calculation.EmrCalculationUtils; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +public class BMICalculation extends AbstractPatientCalculation { + + /** + * @see org.openmrs.calculation.patient.PatientCalculation#evaluate(Collection, Map, PatientCalculationContext) + */ + @Override + public CalculationResultMap evaluate(Collection cohort, Map parameterValues, PatientCalculationContext context) { + + Concept currentBMI = Dictionary.getConcept(Dictionary.HEIGHT_CM); + CalculationResultMap artStartDates = calculate(new InitialArtStartDateCalculation(), cohort, context); + CalculationResultMap bmiObss = Calculations.allObs(currentBMI, cohort, context); + + CalculationResultMap ret = new CalculationResultMap(); + for (Integer ptId : cohort) { + SimpleResult result = null; + Date artStartDate = EmrCalculationUtils.datetimeResultForPatient(artStartDates, ptId); + ListResult bmiObsResult = (ListResult) bmiObss.get(ptId); + + if (artStartDate != null && bmiObsResult != null && !bmiObsResult.isEmpty()) { + List bmi = CalculationUtils.extractResultValues(bmiObsResult); + Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(bmi, artStartDate); + + if (lastBeforeArtStart != null) { + Double bmiValue = lastBeforeArtStart.getValueNumeric(); + if (bmiValue != null) { + result = new SimpleResult(bmiValue, this); + } + } + } + + ret.put(ptId, result); + } + return ret; + } +} \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/HeightAtArtInitiationCalculation.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/HeightAtArtInitiationCalculation.java new file mode 100644 index 0000000000..8b0400cb2f --- /dev/null +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/HeightAtArtInitiationCalculation.java @@ -0,0 +1,64 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.kenyaemr.calculation.library.hiv.art; + +import org.openmrs.Concept; +import org.openmrs.Obs; +import org.openmrs.calculation.patient.PatientCalculationContext; +import org.openmrs.calculation.result.CalculationResultMap; +import org.openmrs.calculation.result.ListResult; +import org.openmrs.calculation.result.SimpleResult; +import org.openmrs.module.kenyacore.calculation.AbstractPatientCalculation; +import org.openmrs.module.kenyacore.calculation.CalculationUtils; +import org.openmrs.module.kenyacore.calculation.Calculations; +import org.openmrs.module.kenyaemr.Dictionary; +import org.openmrs.module.kenyaemr.calculation.EmrCalculationUtils; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +public class HeightAtArtInitiationCalculation extends AbstractPatientCalculation { + + /** + * @see org.openmrs.calculation.patient.PatientCalculation#evaluate(Collection, Map, PatientCalculationContext) + */ + @Override + public CalculationResultMap evaluate(Collection cohort, Map parameterValues, PatientCalculationContext context) { + + Concept currentHeight = Dictionary.getConcept(Dictionary.HEIGHT_CM); + CalculationResultMap artStartDates = calculate(new InitialArtStartDateCalculation(), cohort, context); + CalculationResultMap heightObss = Calculations.allObs(currentHeight, cohort, context); + + CalculationResultMap ret = new CalculationResultMap(); + for (Integer ptId : cohort) { + SimpleResult result = null; + Date artStartDate = EmrCalculationUtils.datetimeResultForPatient(artStartDates, ptId); + ListResult heightObsResult = (ListResult) heightObss.get(ptId); + + if (artStartDate != null && heightObsResult != null && !heightObsResult.isEmpty()) { + List height = CalculationUtils.extractResultValues(heightObsResult); + Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(height, artStartDate); + + if (lastBeforeArtStart != null) { + Double heightValue = lastBeforeArtStart.getValueNumeric(); + if (heightValue != null) { + result = new SimpleResult(heightValue, this); + } + } + } + + ret.put(ptId, result); + } + return ret; + } +} \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java index 08a691c513..f58de3ab8d 100755 --- a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java @@ -46,6 +46,8 @@ public class PatientSummary { private String purposeDrugs; private String purposeDate; private String weightAtArtStart; + private String heightAtArtStart; + private String bmi; private String currentRegimen; private List ois; private String dateOfReport; @@ -80,7 +82,7 @@ public class PatientSummary { public PatientSummary() { } - public PatientSummary(Set names, String upn, String birthDate, Integer age, String maritalStatus, String hivConfrimedDate, String firstCd4, String firstCd4Date, String dateEnrolledIntoCare, String whoStagingAtEnrollment, String patientEntryPoint, String dateEntryPoint, String transferInStatus, String transferInDate, String nameOfTreatmentSupporter, String relationshipToTreatmentSupporter, String contactOfTreatmentSupporter, String drigAllergies, String previousArt, String dateStartedArt, String artPurpose, String clinicalStageAtArtStart, String currentCd4, String purposeDrugs, String purposeDate, String weightAtArtStart, String currentRegimen, List ois, String dateOfReport, String clinicName, String mflCode, String gender, String firstRegimen, String cd4AtArtStart, String currentArtRegimen, String currentWhoStaging, String onCtx, String dapsone, String onIpt, String clinicsEnrolled, String mostRecentCd4, String mostRecentCd4Date, String mostRecentVl, String mostRecentVlDate, String artInterruptions, String artInterruptionReason, String artInterruptionDate, String substitutionWithFirstLine, String substitutionWithFirstLineReason, String substitutionWithFirstLineDate, String switchToSecondLineRegimen, String switchToSecondLineRegimenReason, String switchToSecondLineRegimenDate, String transferOutDate, String deathDate, String nextAppointmentDate) { + public PatientSummary(Set names, String upn, String birthDate, Integer age, String maritalStatus, String hivConfrimedDate, String firstCd4, String firstCd4Date, String dateEnrolledIntoCare, String whoStagingAtEnrollment, String patientEntryPoint, String dateEntryPoint, String transferInStatus, String transferInDate, String nameOfTreatmentSupporter, String relationshipToTreatmentSupporter, String contactOfTreatmentSupporter, String drigAllergies, String previousArt, String dateStartedArt, String artPurpose, String clinicalStageAtArtStart, String currentCd4, String purposeDrugs, String purposeDate, String weightAtArtStart,String bmi, String heightAtArtStart, String currentRegimen, List ois, String dateOfReport, String clinicName, String mflCode, String gender, String firstRegimen, String cd4AtArtStart, String currentArtRegimen, String currentWhoStaging, String onCtx, String dapsone, String onIpt, String clinicsEnrolled, String mostRecentCd4, String mostRecentCd4Date, String mostRecentVl, String mostRecentVlDate, String artInterruptions, String artInterruptionReason, String artInterruptionDate, String substitutionWithFirstLine, String substitutionWithFirstLineReason, String substitutionWithFirstLineDate, String switchToSecondLineRegimen, String switchToSecondLineRegimenReason, String switchToSecondLineRegimenDate, String transferOutDate, String deathDate, String nextAppointmentDate) { this.names = names; this.upn = upn; this.birthDate = birthDate; @@ -107,6 +109,8 @@ public PatientSummary(Set names, String upn, String birthDate, Integ this.purposeDrugs = purposeDrugs; this.purposeDate = purposeDate; this.weightAtArtStart = weightAtArtStart; + this.heightAtArtStart = heightAtArtStart; + this.bmi = bmi; this.currentRegimen = currentRegimen; this.ois = ois; this.dateOfReport = dateOfReport; @@ -347,6 +351,22 @@ public void setWeightAtArtStart(String weightAtArtStart) { this.weightAtArtStart = weightAtArtStart; } + public String getBmi() { + return bmi; + } + + public void setBmi(String bmi) { + this.bmi = bmi; + } + + public String getHeightAtArtStart() { + return heightAtArtStart; + } + + public void setHeightAtArtStart(String heightAtArtStart) { + this.heightAtArtStart = heightAtArtStart; + } + public String getCurrentRegimen() { return currentRegimen; } diff --git a/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java b/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java index c84f4e0577..22bafd5a58 100755 --- a/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java +++ b/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java @@ -38,16 +38,7 @@ import org.openmrs.module.kenyaemr.calculation.EmrCalculationUtils; import org.openmrs.module.kenyaemr.calculation.library.hiv.LastReturnVisitDateCalculation; import org.openmrs.module.kenyaemr.calculation.library.hiv.LastWhoStageCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.CD4AtARTInitiationCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.CurrentArtRegimenCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.InitialArtRegimenCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.InitialArtStartDateCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.LastCd4CountDateCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.TransferInDateCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.TransferOutDateCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.ViralLoadAndLdlCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.WeightAtArtInitiationCalculation; -import org.openmrs.module.kenyaemr.calculation.library.hiv.art.WhoStageAtArtStartCalculation; +import org.openmrs.module.kenyaemr.calculation.library.hiv.art.*; import org.openmrs.module.kenyaemr.calculation.library.models.PatientSummary; import org.openmrs.module.kenyaemr.calculation.library.rdqa.DateOfDeathCalculation; import org.openmrs.module.kenyaemr.calculation.library.rdqa.PatientProgramEnrollmentCalculation; @@ -313,6 +304,25 @@ else if(listOfAllergies.size() == 1){ patientSummary.setWeightAtArtStart(""); } + //bmi at art initiation + CalculationResult bmiResults = EmrCalculationUtils.evaluateForPatient(BMICalculation.class, null,patient); + if(bmiResults != null){ + patientSummary.setBmi(bmiResults.getValue().toString()); + } + else { + patientSummary.setBmi(""); + } + + + //height at art initiation + CalculationResult heightAtArtStartResults = EmrCalculationUtils.evaluateForPatient(HeightAtArtInitiationCalculation.class, null,patient); + if(heightAtArtStartResults != null){ + patientSummary.setHeightAtArtStart(heightAtArtStartResults.getValue().toString()); + } + else { + patientSummary.setHeightAtArtStart(""); + } + //first regimen for the patient CalculationResult firstRegimenResults = EmrCalculationUtils.evaluateForPatient(InitialArtRegimenCalculation.class, null, patient); String firstRegimen; diff --git a/omod/src/main/webapp/fragments/summaries.gsp b/omod/src/main/webapp/fragments/summaries.gsp index 9a1351e11c..86beb22cd8 100755 --- a/omod/src/main/webapp/fragments/summaries.gsp +++ b/omod/src/main/webapp/fragments/summaries.gsp @@ -88,10 +88,16 @@ table.moh257 > tbody > tr > td, table.moh257 > tbody > tr > th { Drugs/Regimen: ${patient.purposeDrugs} - Weight at ART: ${patient.weightAtArtStart} + + Weight at ART: ${patient.weightAtArtStart} + Height at ART: ${patient.heightAtArtStart} - + + BMI: + ${patient.heightAtArtStart} + + Date: ${patient.purposeDate} First regimen: ${firstRegimen} From d09244ecf319bb92d31f9b22498b844c493317b9 Mon Sep 17 00:00:00 2001 From: gabriel090 Date: Wed, 6 Apr 2022 07:46:43 +0300 Subject: [PATCH 2/3] creation of blood pressure, lmp,oxygen saturation, pulse rate --- api/src/main/distro/metadata/concepts.xml | 7 ++ .../hiv/art/BloodPressureCalculation.java | 64 +++++++++++++++++++ .../library/hiv/art/LMPCalculation.java | 64 +++++++++++++++++++ .../hiv/art/OxygenSaturationCalculation.java | 64 +++++++++++++++++++ ...ulation.java => PulseRateCalculation.java} | 14 ++-- .../hiv/art/RespitatoryRateCalculation.java | 64 +++++++++++++++++++ .../library/models/PatientSummary.java | 49 +++++++++++++- .../SummariesFragmentController.java | 49 +++++++++++--- omod/src/main/webapp/fragments/summaries.gsp | 27 ++++++-- 9 files changed, 378 insertions(+), 24 deletions(-) create mode 100644 api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BloodPressureCalculation.java create mode 100644 api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/LMPCalculation.java create mode 100644 api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/OxygenSaturationCalculation.java rename api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/{BMICalculation.java => PulseRateCalculation.java} (79%) create mode 100644 api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/RespitatoryRateCalculation.java diff --git a/api/src/main/distro/metadata/concepts.xml b/api/src/main/distro/metadata/concepts.xml index 67f1600997..0bf9c19449 100755 --- a/api/src/main/distro/metadata/concepts.xml +++ b/api/src/main/distro/metadata/concepts.xml @@ -279,4 +279,11 @@ + + + + + + + \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BloodPressureCalculation.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BloodPressureCalculation.java new file mode 100644 index 0000000000..4ea252bbdc --- /dev/null +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BloodPressureCalculation.java @@ -0,0 +1,64 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.kenyaemr.calculation.library.hiv.art; + +import org.openmrs.Concept; +import org.openmrs.Obs; +import org.openmrs.calculation.patient.PatientCalculationContext; +import org.openmrs.calculation.result.CalculationResultMap; +import org.openmrs.calculation.result.ListResult; +import org.openmrs.calculation.result.SimpleResult; +import org.openmrs.module.kenyacore.calculation.AbstractPatientCalculation; +import org.openmrs.module.kenyacore.calculation.CalculationUtils; +import org.openmrs.module.kenyacore.calculation.Calculations; +import org.openmrs.module.kenyaemr.Dictionary; +import org.openmrs.module.kenyaemr.calculation.EmrCalculationUtils; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +public class BloodPressureCalculation extends AbstractPatientCalculation { + + /** + * @see org.openmrs.calculation.patient.PatientCalculation#evaluate(Collection, Map, PatientCalculationContext) + */ + @Override + public CalculationResultMap evaluate(Collection cohort, Map parameterValues, PatientCalculationContext context) { + + Concept currentBloodPressure = Dictionary.getConcept(Dictionary.BLOOD_PRESSURE); + CalculationResultMap artStartDates = calculate(new InitialArtStartDateCalculation(), cohort, context); + CalculationResultMap bloodPressureObss = Calculations.allObs(currentBloodPressure, cohort, context); + + CalculationResultMap ret = new CalculationResultMap(); + for (Integer ptId : cohort) { + SimpleResult result = null; + Date artStartDate = EmrCalculationUtils.datetimeResultForPatient(artStartDates, ptId); + ListResult bloodPressureObsResult = (ListResult) bloodPressureObss.get(ptId); + + if (artStartDate != null && bloodPressureObsResult != null && !bloodPressureObsResult.isEmpty()) { + List bloodPressure = CalculationUtils.extractResultValues(bloodPressureObsResult); + Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(bloodPressure, artStartDate); + + if (lastBeforeArtStart != null) { + Double bloodPressureValue = lastBeforeArtStart.getValueNumeric(); + if (bloodPressureValue != null) { + result = new SimpleResult(bloodPressureValue, this); + } + } + } + + ret.put(ptId, result); + } + return ret; + } +} \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/LMPCalculation.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/LMPCalculation.java new file mode 100644 index 0000000000..cd8a98aff6 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/LMPCalculation.java @@ -0,0 +1,64 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.kenyaemr.calculation.library.hiv.art; + +import org.openmrs.Concept; +import org.openmrs.Obs; +import org.openmrs.calculation.patient.PatientCalculationContext; +import org.openmrs.calculation.result.CalculationResultMap; +import org.openmrs.calculation.result.ListResult; +import org.openmrs.calculation.result.SimpleResult; +import org.openmrs.module.kenyacore.calculation.AbstractPatientCalculation; +import org.openmrs.module.kenyacore.calculation.CalculationUtils; +import org.openmrs.module.kenyacore.calculation.Calculations; +import org.openmrs.module.kenyaemr.Dictionary; +import org.openmrs.module.kenyaemr.calculation.EmrCalculationUtils; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +public class LMPCalculation extends AbstractPatientCalculation { + + /** + * @see org.openmrs.calculation.patient.PatientCalculation#evaluate(Collection, Map, PatientCalculationContext) + */ + @Override + public CalculationResultMap evaluate(Collection cohort, Map parameterValues, PatientCalculationContext context) { + + Concept currentLMP = Dictionary.getConcept(Dictionary.LMP); + CalculationResultMap artStartDates = calculate(new InitialArtStartDateCalculation(), cohort, context); + CalculationResultMap lmpObss = Calculations.allObs(currentLMP, cohort, context); + + CalculationResultMap ret = new CalculationResultMap(); + for (Integer ptId : cohort) { + SimpleResult result = null; + Date artStartDate = EmrCalculationUtils.datetimeResultForPatient(artStartDates, ptId); + ListResult lmpObsResult = (ListResult) lmpObss.get(ptId); + + if (artStartDate != null && lmpObsResult != null && !lmpObsResult.isEmpty()) { + List lmp = CalculationUtils.extractResultValues(lmpObsResult); + Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(lmp, artStartDate); + + if (lastBeforeArtStart != null) { + Double lmpValue = lastBeforeArtStart.getValueNumeric(); + if (lmpValue != null) { + result = new SimpleResult(lmpValue, this); + } + } + } + + ret.put(ptId, result); + } + return ret; + } +} \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/OxygenSaturationCalculation.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/OxygenSaturationCalculation.java new file mode 100644 index 0000000000..40b7b35992 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/OxygenSaturationCalculation.java @@ -0,0 +1,64 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.kenyaemr.calculation.library.hiv.art; + +import org.openmrs.Concept; +import org.openmrs.Obs; +import org.openmrs.calculation.patient.PatientCalculationContext; +import org.openmrs.calculation.result.CalculationResultMap; +import org.openmrs.calculation.result.ListResult; +import org.openmrs.calculation.result.SimpleResult; +import org.openmrs.module.kenyacore.calculation.AbstractPatientCalculation; +import org.openmrs.module.kenyacore.calculation.CalculationUtils; +import org.openmrs.module.kenyacore.calculation.Calculations; +import org.openmrs.module.kenyaemr.Dictionary; +import org.openmrs.module.kenyaemr.calculation.EmrCalculationUtils; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +public class OxygenSaturationCalculation extends AbstractPatientCalculation { + + /** + * @see org.openmrs.calculation.patient.PatientCalculation#evaluate(Collection, Map, PatientCalculationContext) + */ + @Override + public CalculationResultMap evaluate(Collection cohort, Map parameterValues, PatientCalculationContext context) { + + Concept currentOxygenSaturation = Dictionary.getConcept(Dictionary.OXYGEN_SATURATION); + CalculationResultMap artStartDates = calculate(new InitialArtStartDateCalculation(), cohort, context); + CalculationResultMap oxygenSaturationObss = Calculations.allObs(currentOxygenSaturation, cohort, context); + + CalculationResultMap ret = new CalculationResultMap(); + for (Integer ptId : cohort) { + SimpleResult result = null; + Date artStartDate = EmrCalculationUtils.datetimeResultForPatient(artStartDates, ptId); + ListResult oxygenSaturationObsResult = (ListResult) oxygenSaturationObss.get(ptId); + + if (artStartDate != null && oxygenSaturationObsResult != null && !oxygenSaturationObsResult.isEmpty()) { + List oxygenSaturation = CalculationUtils.extractResultValues(oxygenSaturationObsResult); + Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(oxygenSaturation, artStartDate); + + if (lastBeforeArtStart != null) { + Double oxygenSaturationValue = lastBeforeArtStart.getValueNumeric(); + if (oxygenSaturationValue != null) { + result = new SimpleResult(oxygenSaturationValue, this); + } + } + } + + ret.put(ptId, result); + } + return ret; + } +} \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BMICalculation.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/PulseRateCalculation.java similarity index 79% rename from api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BMICalculation.java rename to api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/PulseRateCalculation.java index 2a5fe951fe..018d59cb90 100644 --- a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/BMICalculation.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/PulseRateCalculation.java @@ -27,7 +27,7 @@ import java.util.Map; -public class BMICalculation extends AbstractPatientCalculation { +public class PulseRateCalculation extends AbstractPatientCalculation { /** * @see org.openmrs.calculation.patient.PatientCalculation#evaluate(Collection, Map, PatientCalculationContext) @@ -35,19 +35,19 @@ public class BMICalculation extends AbstractPatientCalculation { @Override public CalculationResultMap evaluate(Collection cohort, Map parameterValues, PatientCalculationContext context) { - Concept currentBMI = Dictionary.getConcept(Dictionary.HEIGHT_CM); + Concept currentPulseRate = Dictionary.getConcept(Dictionary.PULSE_RATE); CalculationResultMap artStartDates = calculate(new InitialArtStartDateCalculation(), cohort, context); - CalculationResultMap bmiObss = Calculations.allObs(currentBMI, cohort, context); + CalculationResultMap pulseRateObss = Calculations.allObs(currentPulseRate, cohort, context); CalculationResultMap ret = new CalculationResultMap(); for (Integer ptId : cohort) { SimpleResult result = null; Date artStartDate = EmrCalculationUtils.datetimeResultForPatient(artStartDates, ptId); - ListResult bmiObsResult = (ListResult) bmiObss.get(ptId); + ListResult pulseRateObsResult = (ListResult) pulseRateObss.get(ptId); - if (artStartDate != null && bmiObsResult != null && !bmiObsResult.isEmpty()) { - List bmi = CalculationUtils.extractResultValues(bmiObsResult); - Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(bmi, artStartDate); + if (artStartDate != null && pulseRateObsResult != null && !pulseRateObsResult.isEmpty()) { + List pulseRate = CalculationUtils.extractResultValues(pulseRateObsResult); + Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(pulseRate, artStartDate); if (lastBeforeArtStart != null) { Double bmiValue = lastBeforeArtStart.getValueNumeric(); diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/RespitatoryRateCalculation.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/RespitatoryRateCalculation.java new file mode 100644 index 0000000000..eb0e7a0fe7 --- /dev/null +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/hiv/art/RespitatoryRateCalculation.java @@ -0,0 +1,64 @@ +/** + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under + * the terms of the Healthcare Disclaimer located at http://openmrs.org/license. + * + * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS + * graphic logo is a trademark of OpenMRS Inc. + */ +package org.openmrs.module.kenyaemr.calculation.library.hiv.art; + +import org.openmrs.Concept; +import org.openmrs.Obs; +import org.openmrs.calculation.patient.PatientCalculationContext; +import org.openmrs.calculation.result.CalculationResultMap; +import org.openmrs.calculation.result.ListResult; +import org.openmrs.calculation.result.SimpleResult; +import org.openmrs.module.kenyacore.calculation.AbstractPatientCalculation; +import org.openmrs.module.kenyacore.calculation.CalculationUtils; +import org.openmrs.module.kenyacore.calculation.Calculations; +import org.openmrs.module.kenyaemr.Dictionary; +import org.openmrs.module.kenyaemr.calculation.EmrCalculationUtils; + +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +public class RespitatoryRateCalculation extends AbstractPatientCalculation { + + /** + * @see org.openmrs.calculation.patient.PatientCalculation#evaluate(Collection, Map, PatientCalculationContext) + */ + @Override + public CalculationResultMap evaluate(Collection cohort, Map parameterValues, PatientCalculationContext context) { + + Concept currentRespiratoryRate = Dictionary.getConcept(Dictionary.RESPIRATORY_RATE); + CalculationResultMap artStartDates = calculate(new InitialArtStartDateCalculation(), cohort, context); + CalculationResultMap respiratoryRateObss = Calculations.allObs(currentRespiratoryRate, cohort, context); + + CalculationResultMap ret = new CalculationResultMap(); + for (Integer ptId : cohort) { + SimpleResult result = null; + Date artStartDate = EmrCalculationUtils.datetimeResultForPatient(artStartDates, ptId); + ListResult respiratoryRateObsResult = (ListResult) respiratoryRateObss.get(ptId); + + if (artStartDate != null && respiratoryRateObsResult != null && !respiratoryRateObsResult.isEmpty()) { + List pulseRate = CalculationUtils.extractResultValues(respiratoryRateObsResult); + Obs lastBeforeArtStart = EmrCalculationUtils.findLastOnOrBefore(pulseRate, artStartDate); + + if (lastBeforeArtStart != null) { + Double respiratoryRateValue = lastBeforeArtStart.getValueNumeric(); + if (respiratoryRateValue != null) { + result = new SimpleResult(respiratoryRateValue, this); + } + } + } + + ret.put(ptId, result); + } + return ret; + } +} \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java index f58de3ab8d..7961e4b34a 100755 --- a/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/calculation/library/models/PatientSummary.java @@ -35,6 +35,12 @@ public class PatientSummary { private String transferInFacility; private String transferInDate; private String nameOfTreatmentSupporter; + private String pulseRate; + private String respiratoryRate; + private String bloodPressure; + private String oxygenSaturation; + private String lmp; + private String relationshipToTreatmentSupporter; private String contactOfTreatmentSupporter; private String drigAllergies; @@ -82,7 +88,7 @@ public class PatientSummary { public PatientSummary() { } - public PatientSummary(Set names, String upn, String birthDate, Integer age, String maritalStatus, String hivConfrimedDate, String firstCd4, String firstCd4Date, String dateEnrolledIntoCare, String whoStagingAtEnrollment, String patientEntryPoint, String dateEntryPoint, String transferInStatus, String transferInDate, String nameOfTreatmentSupporter, String relationshipToTreatmentSupporter, String contactOfTreatmentSupporter, String drigAllergies, String previousArt, String dateStartedArt, String artPurpose, String clinicalStageAtArtStart, String currentCd4, String purposeDrugs, String purposeDate, String weightAtArtStart,String bmi, String heightAtArtStart, String currentRegimen, List ois, String dateOfReport, String clinicName, String mflCode, String gender, String firstRegimen, String cd4AtArtStart, String currentArtRegimen, String currentWhoStaging, String onCtx, String dapsone, String onIpt, String clinicsEnrolled, String mostRecentCd4, String mostRecentCd4Date, String mostRecentVl, String mostRecentVlDate, String artInterruptions, String artInterruptionReason, String artInterruptionDate, String substitutionWithFirstLine, String substitutionWithFirstLineReason, String substitutionWithFirstLineDate, String switchToSecondLineRegimen, String switchToSecondLineRegimenReason, String switchToSecondLineRegimenDate, String transferOutDate, String deathDate, String nextAppointmentDate) { + public PatientSummary(Set names, String upn, String birthDate, Integer age, String maritalStatus, String hivConfrimedDate, String firstCd4, String firstCd4Date, String dateEnrolledIntoCare, String whoStagingAtEnrollment, String patientEntryPoint, String dateEntryPoint, String transferInStatus, String transferInDate,String pulseRate,String lmp, String nameOfTreatmentSupporter, String relationshipToTreatmentSupporter, String contactOfTreatmentSupporter, String drigAllergies, String previousArt, String dateStartedArt, String artPurpose, String clinicalStageAtArtStart, String currentCd4, String purposeDrugs, String purposeDate, String weightAtArtStart,String bmi, String heightAtArtStart, String currentRegimen, List ois, String dateOfReport, String clinicName, String mflCode, String gender, String firstRegimen, String cd4AtArtStart, String currentArtRegimen, String currentWhoStaging, String onCtx, String dapsone, String onIpt, String clinicsEnrolled, String mostRecentCd4, String mostRecentCd4Date, String mostRecentVl, String mostRecentVlDate, String artInterruptions, String artInterruptionReason, String artInterruptionDate, String substitutionWithFirstLine, String substitutionWithFirstLineReason, String substitutionWithFirstLineDate, String switchToSecondLineRegimen, String switchToSecondLineRegimenReason, String switchToSecondLineRegimenDate, String transferOutDate, String deathDate, String nextAppointmentDate, String bloodPressure,String respiratoryRate,String oxygenSaturation) { this.names = names; this.upn = upn; this.birthDate = birthDate; @@ -98,6 +104,11 @@ public PatientSummary(Set names, String upn, String birthDate, Integ this.transferInFacility = transferInStatus; this.transferInDate = transferInDate; this.nameOfTreatmentSupporter = nameOfTreatmentSupporter; + this.bloodPressure = bloodPressure; + this.respiratoryRate = respiratoryRate; + this.oxygenSaturation = oxygenSaturation; + this.pulseRate = pulseRate; + this.lmp = lmp; this.relationshipToTreatmentSupporter = relationshipToTreatmentSupporter; this.contactOfTreatmentSupporter = contactOfTreatmentSupporter; this.drigAllergies = drigAllergies; @@ -262,6 +273,42 @@ public String getNameOfTreatmentSupporter() { public void setNameOfTreatmentSupporter(String nameOfTreatmentSupporter) { this.nameOfTreatmentSupporter = nameOfTreatmentSupporter; } + public String getPulseRate() { + return pulseRate; + } + + public void setPulseRate(String pulseRate) { + this.pulseRate = pulseRate; + } + + public String getLmp() { + return lmp; + } + + public void setLmp(String lmp) { + this.lmp = lmp; + } + public String getBloodPressure() { + return bloodPressure; + } + + public void setBloodPressure(String bloodPressure) { + this.bloodPressure = bloodPressure; + } + public String getRespiratoryRate() { + return respiratoryRate; + } + + public void setRespiratoryRate(String respiratoryRate) { + this.respiratoryRate = respiratoryRate; + } + public String getOxygenSaturation() { + return oxygenSaturation; + } + + public void setOxygenSaturation(String oxygenSaturation) { + this.oxygenSaturation = oxygenSaturation; + } public String getRelationshipToTreatmentSupporter() { return relationshipToTreatmentSupporter; diff --git a/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java b/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java index 22bafd5a58..91891711ca 100755 --- a/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java +++ b/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/SummariesFragmentController.java @@ -14,8 +14,6 @@ import org.joda.time.DateTime; import org.joda.time.Years; import org.openmrs.Concept; -import org.openmrs.ConceptName; -import org.openmrs.DrugOrder; import org.openmrs.Obs; import org.openmrs.Patient; import org.openmrs.PatientIdentifier; @@ -30,7 +28,6 @@ import org.openmrs.calculation.result.CalculationResult; import org.openmrs.calculation.result.CalculationResultMap; import org.openmrs.calculation.result.ListResult; -import org.openmrs.module.kenyacore.CoreConstants; import org.openmrs.module.kenyacore.calculation.CalculationUtils; import org.openmrs.module.kenyacore.calculation.Calculations; import org.openmrs.module.kenyaemr.Dictionary; @@ -43,7 +40,6 @@ import org.openmrs.module.kenyaemr.calculation.library.rdqa.DateOfDeathCalculation; import org.openmrs.module.kenyaemr.calculation.library.rdqa.PatientProgramEnrollmentCalculation; import org.openmrs.module.kenyaemr.metadata.HivMetadata; -import org.openmrs.module.kenyaemr.regimen.RegimenOrder; import org.openmrs.module.metadatadeploy.MetadataUtils; import org.openmrs.ui.framework.annotation.FragmentParam; import org.openmrs.ui.framework.fragment.FragmentModel; @@ -304,15 +300,50 @@ else if(listOfAllergies.size() == 1){ patientSummary.setWeightAtArtStart(""); } - //bmi at art initiation - CalculationResult bmiResults = EmrCalculationUtils.evaluateForPatient(BMICalculation.class, null,patient); - if(bmiResults != null){ - patientSummary.setBmi(bmiResults.getValue().toString()); + //pulse rate + CalculationResult pulseRate = EmrCalculationUtils.evaluateForPatient(PulseRateCalculation.class, null,patient); + if(pulseRate != null){ + patientSummary.setPulseRate(pulseRate.getValue().toString()); } else { - patientSummary.setBmi(""); + patientSummary.setPulseRate(""); } + //Blood Pressure + CalculationResult bloodPressure = EmrCalculationUtils.evaluateForPatient(BloodPressureCalculation.class, null,patient); + if(bloodPressure != null){ + patientSummary.setBloodPressure(bloodPressure.getValue().toString()); + } + else { + patientSummary.setBloodPressure(""); + } + + //respitatory Rate/ + CalculationResult respiratoryRate = EmrCalculationUtils.evaluateForPatient(RespitatoryRateCalculation.class, null,patient); + if(respiratoryRate != null){ + patientSummary.setRespiratoryRate(respiratoryRate.getValue().toString()); + } + else { + patientSummary.setRespiratoryRate(""); + } + + //LMP + CalculationResult lmp = EmrCalculationUtils.evaluateForPatient(LMPCalculation.class, null,patient); + if(lmp != null){ + patientSummary.setLmp(lmp.getValue().toString()); + } + else { + patientSummary.setLmp(""); + } + + //Oxygen Saturation/ + CalculationResult oxygenSaturation = EmrCalculationUtils.evaluateForPatient(OxygenSaturationCalculation.class, null,patient); + if(oxygenSaturation != null){ + patientSummary.setOxygenSaturation(oxygenSaturation.getValue().toString()); + } + else { + patientSummary.setOxygenSaturation(""); + } //height at art initiation CalculationResult heightAtArtStartResults = EmrCalculationUtils.evaluateForPatient(HeightAtArtInitiationCalculation.class, null,patient); diff --git a/omod/src/main/webapp/fragments/summaries.gsp b/omod/src/main/webapp/fragments/summaries.gsp index 86beb22cd8..d3441a6f4a 100755 --- a/omod/src/main/webapp/fragments/summaries.gsp +++ b/omod/src/main/webapp/fragments/summaries.gsp @@ -1,7 +1,7 @@ -
-
Patient Summary
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + table.moh257 { + border-collapse: collapse; + background-color: #D9F4D3; + width: 75%; + } + table.moh257 > tbody > tr > td, table.moh257 > tbody > tr > th { + border: 1px solid black; + vertical-align: baseline; + padding: 2px; + text-align: left; + background-color: #D9F4D3; + } + + + +
+
Patient Summary
+
+
Date of report: ${patient.dateOfReport}Clinic name: ${patient.clinicName}MFL code: ${patient.mflCode}
UPN: ${ patient.upn }Name: ${names}
DOB: ${ patient.birthDate } - Age: ${ patient.age } -       Gender: ${ patient.gender} -       Marital status: ${ patient.maritalStatus } -
  
Date Confirmed HIV Positive: ${ patient.hivConfrimedDate }First CD4: ${ patient.firstCd4 }Date first CD4: ${ patient.firstCd4Date }
Date enrolled into care: ${ patient.dateEnrolledIntoCare}WHO stage at enrollment: ${patient.whoStagingAtEnrollment}Transfer in date: ${tiDate}
Entry point: ${patient.patientEntryPoint}Date of entry point: ${patient.dateEntryPoint}Facility transferred from: ${patient.transferInFacility}
 
Treatment supporter details:
Name: ${patient.nameOfTreatmentSupporter}Relationship: ${patient.relationshipToTreatmentSupporter}Contact details: ${patient.contactOfTreatmentSupporter}
 
Drug allergies: ${allergies}
Respiratory Rate: ${patient.respiratoryRate}Blood Pressure: ${patient.bloodPressure}
Oxygen Saturation: ${patient.oxygenSaturation}Pulse Rate: ${patient.pulseRate}
 
Previous ART: ${patient.previousArt}Date started ART: ${patient.dateStartedArt}
Purpose: ${patient.artPurpose}Clinical stage at ART: ${patient.clinicalStageAtArtStart}CD4 at ART: ${patient.cd4AtArtStart}
Drugs/Regimen: ${patient.purposeDrugs}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date of report: ${patient.dateOfReport}Clinic name: ${patient.clinicName}MFL code: ${patient.mflCode}
UPN: ${ patient.upn }Name: ${names}
DOB: ${ patient.birthDate } + Age: ${ patient.age } +       Gender: ${ patient.gender} +       Marital status: ${ patient.maritalStatus } +
  
Date Confirmed HIV Positive: ${ patient.hivConfrimedDate }First CD4: ${ patient.firstCd4 }Date first CD4: ${ patient.firstCd4Date }
Date enrolled into care: ${ patient.dateEnrolledIntoCare}WHO stage at enrollment: ${patient.whoStagingAtEnrollment}Transfer in date: ${tiDate}
Entry point: ${patient.patientEntryPoint}Date of entry point: ${patient.dateEntryPoint}Facility transferred from: ${patient.transferInFacility}
 
Treatment supporter details:
Name: ${patient.nameOfTreatmentSupporter}Relationship: ${patient.relationshipToTreatmentSupporter}Contact details: ${patient.contactOfTreatmentSupporter}
 
Drug allergies: ${allergies}
 
Chronic Illness: ${chronicDisease}
Respiratory Rate: ${patient.respiratoryRate}Blood Pressure: ${patient.bloodPressure}
Oxygen Saturation: ${patient.oxygenSaturation}Pulse Rate: ${patient.pulseRate}
 
Previous ART: ${patient.previousArt}Date started ART: ${patient.dateStartedArt}
Purpose: ${patient.artPurpose}Clinical stage at ART: ${patient.clinicalStageAtArtStart}CD4 at ART: ${patient.cd4AtArtStart}
Drugs/Regimen: ${patient.purposeDrugs}
Family Protection: ${patient.familyProtection}
Weight: ${patient.weightAtArtStart}Height: ${patient.heightAtArtStart}
LMP: ${patient.lmp}
Date: ${patient.purposeDate}First regimen: ${firstRegimen}
Past or current OI: ${iosResults}
 
Current ART regimen: ${currentRegimen} - - - - - - -
ART interruptions: - - - - - - - -
Reason:
Date:
-
-
Current WHO stage: ${patient.currentWhoStaging} - - - - - -
Substitution within 1st line regimen: - - - - - - - -
Reason:
Date:
-
- -
CTX: ${onCtx} - - - - - -
Switch to 2nd line regimen: - - - - - - - -
Reason:
Date:
-
-
Dapsone: ${onDapsone}TPT: ${onIpt} 
Clinics enrolled: ${clinicValues} - Transfer out date: ${toDate}
- Transfer out facility: ${toFacility} -
- - - - - -
Most recent CD4: ${recentCd4Count}Date: ${recentCd4CountDate}
- - -
- Death date: ${deadDeath} -
- - - - - -
Most recent VL: ${recentVl} Date: ${recentVlDate}
-
- Next appointment: ${returnVisitDate} -
+ Height: ${patient.heightAtArtStart} + BMI: ${patient.bmi} + + + + kDoD Cadre: ${patient.kDoDCadre} + kDoD Unit: ${patient.kDoDUnit} + kDoD Rank: ${patient.kDoDRank} + + + + kDoD Number: ${patient.kDoDNumber} + + + + + LMP: ${patient.lmp} + + + + + TPT Start Date: ${patient.dateEnrolledInTb} + TPT Completion Date: ${patient.dateCompletedInTb} + + + + TB Screening: ${patient.tbScreeningOutcome} + + + STI Screening: ${patient.stiScreeningOutcome} + + + CACX Screening: ${patient.caxcScreeningOutcome} + + + + + Date: ${patient.purposeDate} + First regimen: ${firstRegimen} + + + Past or current OI: ${iosResults} + + +   + + + Current ART regimen: ${currentRegimen} + + + + + + + +
ART interruptions: + + + + + + + +
Reason:
Date:
+
+ + + + Current WHO stage: ${patient.currentWhoStaging} + + + + + + +
Substitution within 1st line regimen: + + + + + + + +
Reason:
Date:
+
+ + + + + CTX: ${onCtx} + + + + + + +
Switch to 2nd line regimen: + + + + + + + +
Reason:
Date:
+
+ + + + Dapsone: ${onDapsone} + TPT: ${onIpt} +   + + + + Clinics enrolled: ${clinicValues} + + Transfer out date: ${toDate}
+ Transfer out facility: ${toFacility} + + + + + + + + + +
Most recent CD4: ${recentCd4Count}Date: ${recentCd4CountDate}
+ + + + + Death date: ${deadDeath} + + + + + + + + + + + + + +
Most recent VL: ${recentVl} Date: ${recentVlDate}
+ + + Next appointment: ${returnVisitDate} + + + + +
+ +
+
+
+ +