From da36d381c8b3c2246b0402fcd181e34c934a6351 Mon Sep 17 00:00:00 2001 From: "DESKTOP-6V6BPAA\\MGIC" Date: Mon, 16 Nov 2020 20:42:27 +0100 Subject: [PATCH] updates --- .../nigeriaemr/ndrfactory/PharmacyDictionary.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/omod/src/main/java/org/openmrs/module/nigeriaemr/ndrfactory/PharmacyDictionary.java b/omod/src/main/java/org/openmrs/module/nigeriaemr/ndrfactory/PharmacyDictionary.java index 49cc8abd..d3d46b09 100644 --- a/omod/src/main/java/org/openmrs/module/nigeriaemr/ndrfactory/PharmacyDictionary.java +++ b/omod/src/main/java/org/openmrs/module/nigeriaemr/ndrfactory/PharmacyDictionary.java @@ -348,7 +348,8 @@ public RegimenType createRegimenType(Patient patient, Date visitDate, List ndrCode = getRegimenMapValue(valueCoded); codedSimpleType = new CodedSimpleType(); codedSimpleType.setCode(ndrCode); - codedSimpleType.setCodeDescTxt(valueObs.getValueCoded().getName().getName()); +// codedSimpleType.setCodeDescTxt(valueObs.getValueCoded().getName().getName()); + codedSimpleType.setCodeDescTxt(getRegimenCodeDescTextMapValue(valueCoded)); regimenType.setPrescribedRegimen(codedSimpleType); } regimenType.setPrescribedRegimenDispensedDate(utils.getXmlDate(visitDate));//PrescribedRegimenDispensedDate @@ -432,8 +433,8 @@ private RegimenType createOIType(Patient pts, Encounter enc, List OIDrugObs try { cst = new CodedSimpleType(); cst.setCode(getRegimenMapValue(obs.getValueCoded().getConceptId())); - cst.setCodeDescTxt(obs.getValueCoded().getName().getName()); - // cst.setCodeDescTxt(getRegimenCodeDescTextMapValue(obs.getValueCoded().getConceptId())); +// cst.setCodeDescTxt(obs.getValueCoded().getName().getName()); + cst.setCodeDescTxt(getRegimenCodeDescTextMapValue(obs.getValueCoded().getConceptId())); regimenType.setPrescribedRegimen(cst); } catch (Exception ex) { LoggerUtils.write(PharmacyDictionary.class.getName(), "Error on OI_Drug_Concept_Id: " + ex.getMessage(), LogFormat.FATAL, LogLevel.live); @@ -444,8 +445,8 @@ private RegimenType createOIType(Patient pts, Encounter enc, List OIDrugObs try { cst = new CodedSimpleType(); cst.setCode(getRegimenMapValue(obs.getValueCoded().getConceptId())); - cst.setCodeDescTxt(obs.getValueCoded().getName().getName()); - // cst.setCodeDescTxt(getRegimenCodeDescTextMapValue(obs.getValueCoded().getConceptId())); +// cst.setCodeDescTxt(obs.getValueCoded().getName().getName()); + cst.setCodeDescTxt(getRegimenCodeDescTextMapValue(obs.getValueCoded().getConceptId())); regimenType.setPrescribedRegimen(cst); } catch (Exception ex) { LoggerUtils.write(PharmacyDictionary.class.getName(), "Error on OI_Drug_Concept_Id: " + ex.getMessage(), LogFormat.FATAL, LogLevel.live); @@ -456,7 +457,7 @@ private RegimenType createOIType(Patient pts, Encounter enc, List OIDrugObs try { //set type code if (obs != null && obs.getObsGroup().getConcept().getConceptId() == OI_regimen_Concept_set) { - regimenType.setPrescribedRegimenTypeCode("NONART"); + regimenType.setPrescribedRegimenTypeCode("OI"); } else if (obs != null && obs.getObsGroup().getConcept().getConceptId() == TB_regimen_Concept_set) { regimenType.setPrescribedRegimenTypeCode("TB"); }