Skip to content

Commit

Permalink
KHP3-6241 on DMI surveillance: Reduce Polio flagging sensitivity by a…
Browse files Browse the repository at this point in the history
…dding onset status as sudden requirement
  • Loading branch information
patryllus committed Jul 27, 2024
1 parent 50375d8 commit a60c5cf
Showing 1 changed file with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public class EligibleForIDSRFlagsCalculation extends AbstractPatientCalculation
String SCREENING_QUESTION_EXAMINATION = "162737AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
//Polio
String LIMBS_WEAKNESS = "157498AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
String ONSET_QUESTION = "d7a3441d-6aeb-49be-b7d6-b2a3bb39e78d";
String SUDDEN_ONSET = "162707AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";

/**
* Evaluates the calculation
Expand All @@ -108,6 +110,7 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj
Double tempValue = 0.0;
Double duration = 0.0;
Date dateCreated = null;
String onsetStatus = null;
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
String todayDate = dateFormat.format(currentDate);
Patient patient = patientService.getPatient(ptId);
Expand Down Expand Up @@ -379,12 +382,15 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj
}
//9.Poliomyelitis
if (triageEncounterHasWeakLimbs) {
if (patient.getAge() < 15) {
if (patient.getAge() < 15) {
for (Obs obs : lastTriageEncounter.getObs()) {
dateCreated = obs.getDateCreated();
if (dateCreated != null) {
if (obs.getConcept().getUuid().equals(ONSET_QUESTION)) {
onsetStatus = obs.getValueCoded().getUuid();
}
if (dateCreated != null && onsetStatus != null) {
String createdDate = dateFormat.format(dateCreated);
if (createdDate.equals(todayDate)) {
if (createdDate.equals(todayDate) && onsetStatus.equals(SUDDEN_ONSET)) {
eligible = true;
idsrMessage.add(poliomyelitis);
break;
Expand Down Expand Up @@ -549,9 +555,12 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj
if (patient.getAge() < 15) {
for (Obs obs : lastHivFollowUpEncounter.getObs()) {
dateCreated = obs.getDateCreated();
if (dateCreated != null) {
if (obs.getConcept().getUuid().equals(ONSET_QUESTION)) {
onsetStatus = obs.getValueCoded().getUuid();
}
if (dateCreated != null && onsetStatus != null) {
String createdDate = dateFormat.format(dateCreated);
if (createdDate.equals(todayDate)) {
if (createdDate.equals(todayDate) && onsetStatus.equals(SUDDEN_ONSET)) {
eligible = true;
idsrMessage.add(poliomyelitis);
break;
Expand Down Expand Up @@ -716,9 +725,12 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj
if (patient.getAge() < 15) {
for (Obs obs : lastClinicalEncounter.getObs()) {
dateCreated = obs.getDateCreated();
if (dateCreated != null) {
if (obs.getConcept().getUuid().equals(ONSET_QUESTION)) {
onsetStatus = obs.getValueCoded().getUuid();
}
if (dateCreated != null && onsetStatus != null) {
String createdDate = dateFormat.format(dateCreated);
if (createdDate.equals(todayDate)) {
if (createdDate.equals(todayDate) && onsetStatus.equals(SUDDEN_ONSET)) {
eligible = true;
idsrMessage.add(poliomyelitis);
break;
Expand Down

0 comments on commit a60c5cf

Please sign in to comment.