Skip to content

Commit c520731

Browse files
authored
Merge pull request #336 from PatrickWaweru/modifyVlFormJustificationCodes
KHP3-5636 - Modified the justification codes displayed on the manifest order form
2 parents 84d84ef + 3025feb commit c520731

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

api/src/main/java/org/openmrs/module/kenyaemrorderentry/api/itext/ViralLoadLabManifestReport.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ private void addManifestRow(LabManifestOrder sample, Table table) {
260260
table.addCell(new Paragraph(uniqueNumber)).setFontSize(10);
261261
}
262262

263-
//Add Recency and Justification
263+
// Add Recency
264264
String recencyIdentifier = "";
265265
PatientIdentifier recencyPatientIdentifier = null;
266266
PatientIdentifierType recencyIdentifierType = Utils.getRecencyIdentifierType();
@@ -271,6 +271,7 @@ private void addManifestRow(LabManifestOrder sample, Table table) {
271271
}
272272
}
273273
table.addCell(new Paragraph(recencyIdentifier)).setFontSize(10);
274+
// Add Justification
274275
table.addCell(new Paragraph(sample.getOrder().getOrderReason() != null ? LabOrderDataExchange.getOrderReasonCode(sample.getOrder().getOrderReason().getUuid()) : "")).setFontSize(10);
275276

276277
table.addCell(new Paragraph(Utils.getSimpleDateFormat("dd/MM/yyyy").format(sample.getOrder().getPatient().getBirthdate()))).setFontSize(10);

api/src/main/java/org/openmrs/module/kenyaemrorderentry/labDataExchange/LabOrderDataExchange.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static String getSampleTypeCode(String type) {
164164
}
165165

166166
/**
167-
* Converter for concept to lab system code
167+
* Converter for concept to lab system code (justification)
168168
* 1= Routine VL
169169
* 2=confirmation of
170170
* treatment failure (repeat VL)
@@ -190,16 +190,27 @@ public static String getOrderReasonCode(String conceptUuid) {
190190
} else if (conceptUuid.equals("162080AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // baseline VL
191191
code = 5;
192192
} else if (conceptUuid.equals("1259AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // single drug substitution
193-
code = 4;
193+
code = 3;
194194
} else if (conceptUuid.equals("159882AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // breastfeeding
195195
code = 1;
196-
} else if (conceptUuid.equals("163523AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // clinical failure
197-
code = 3;
196+
} else if (conceptUuid.equals("163718AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // PMTCT NP
197+
code = 8;
198198
} else if (conceptUuid.equals("161236AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // routine
199199
code = 1;
200200
} else if (conceptUuid.equals("160032AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // confirmation of persistent low viremia
201201
code = 6;
202+
} else if (conceptUuid.equals("163523AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // Recency
203+
code = 7;
204+
} else if (conceptUuid.equals("f87f344a-62de-45ac-9cc0-b5bed81c289e")) { // PMTCT KP
205+
code = 9;
206+
} else if (conceptUuid.equals("bb9780b3-4f44-42fd-9e94-3958d36d106f")) { // 1ST VL
207+
code = 10;
208+
} else if (conceptUuid.equals("167391AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { // Follow up
209+
code = 11;
210+
} else if (conceptUuid.equals("e299c5c6-5dc7-4977-9b9a-516252d4d582")) { // Repeat VL after 3rd EAC
211+
code = 12;
202212
}
213+
203214
return code != null ? code.toString() : "";
204215
}
205216

0 commit comments

Comments
 (0)