Skip to content

Commit a2fce82

Browse files
committed
remove unnecessary formatting
1 parent 31ac410 commit a2fce82

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

api/src/main/java/org/openmrs/module/ugandaemrsync/tasks/SendViralLoadRequestToCentralServerTask.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void execute() {
7171
List<SyncTask> allSyncTasks = ugandaEMRSyncService.getAllSyncTask();
7272
List<SyncTask> syncTasks = allSyncTasks.stream().filter(p -> order.getAccessionNumber().equals(p.getSyncTask()) && syncTaskType.getId().equals(p.getSyncTaskType().getId())).collect(Collectors.toList());
7373

74-
if (syncTasks.size() < 1) {
74+
if (syncTasks.size()<1){
7575
Map<String, String> dataOutput = generateVLFHIROrderTestRequestBody((TestOrder) order, VL_SEND_SAMPLE_FHIR_JSON_STRING);
7676
String json = dataOutput.get("json");
7777

@@ -98,7 +98,7 @@ public void execute() {
9898
ugandaEMRSyncService.saveSyncTask(newSyncTask);
9999
}
100100
} catch (Exception e) {
101-
log.error("Failed to create sync task", e);
101+
log.error("Failed to create sync task",e);
102102
}
103103
}
104104
}
@@ -147,7 +147,7 @@ public Map<String, String> generateVLFHIRTestRequestBody(Encounter encounter, St
147147
String healthCenterCode = ugandaEMRSyncService.getHealthCenterCode();
148148
String requestType = encounter.getEncounterType().getName();
149149
String sourceSystem = "UgandaEMR";
150-
String patientARTNO = ugandaEMRSyncService.getPatientIdentifier(encounter.getPatient(), PATIENT_IDENTIFIER_TYPE);
150+
String patientARTNO = ugandaEMRSyncService.getPatientIdentifier(encounter.getPatient(),PATIENT_IDENTIFIER_TYPE);
151151
String sampleID = encounter.getEncounterId().toString();
152152
String sampleCollectionDate = encounter.getEncounterDatetime().toString();
153153
String clinicianNames = getProviderByEncounterRole(encounter, "clinician");
@@ -183,11 +183,12 @@ public Map<String, String> generateVLFHIROrderTestRequestBody(TestOrder testOrde
183183
if (testOrder != null) {
184184

185185

186+
186187
String healthCenterName = ugandaEMRSyncService.getHealthCenterName();
187188
String healthCenterCode = ugandaEMRSyncService.getHealthCenterCode();
188189
String requestType = proccessMappings(testOrder.getConcept());
189190
String sourceSystem = "UgandaEMR";
190-
String patientARTNO = ugandaEMRSyncService.getPatientIdentifier(testOrder.getPatient(), PATIENT_IDENTIFIER_TYPE);
191+
String patientARTNO = ugandaEMRSyncService.getPatientIdentifier(testOrder.getPatient(),PATIENT_IDENTIFIER_TYPE);
191192
String sampleID = testOrder.getAccessionNumber();
192193
String sampleCollectionDate = testOrder.getEncounter().getEncounterDatetime().toString();
193194
String clinicianNames = testOrder.getOrderer().getName();
@@ -199,16 +200,16 @@ public Map<String, String> generateVLFHIROrderTestRequestBody(TestOrder testOrde
199200
if (getProviderAttributeValue(Objects.requireNonNull(getProviderAppributesFromPerson(testOrder.getCreator().getPerson()))) != null) {
200201
labTechContact = getProviderAttributeValue(Objects.requireNonNull(getProviderAppributesFromPerson(testOrder.getCreator().getPerson())));
201202
}
202-
} catch (Exception e) {
203-
log.error("Could not add Lab technician telephone number", e);
203+
}catch (Exception e){
204+
log.error("Could not add Lab technician telephone number",e);
204205
}
205206

206207
String obsSampleType = testOrder.getSpecimenSource().getName().getName();
207208
if (getProviderAttributeValue(testOrder.getOrderer().getActiveAttributes()) != null) {
208209
ordererContact = getProviderAttributeValue(testOrder.getOrderer().getActiveAttributes());
209210
}
210211

211-
filledJsonFile = String.format(jsonFHIRMap, healthCenterCode, healthCenterName, requestType, sourceSystem, patientARTNO, sampleID, obsSampleType, sampleCollectionDate, labTechNames, labTechContact, sampleCollectionDate, clinicianNames, ordererContact, "CPHL");
212+
filledJsonFile = String.format(jsonFHIRMap, healthCenterCode, healthCenterName, requestType, sourceSystem, patientARTNO, sampleID, obsSampleType, sampleCollectionDate, labTechNames, labTechContact,sampleCollectionDate, clinicianNames, ordererContact, "CPHL");
212213
}
213214
jsonMap.put("json", filledJsonFile);
214215
return jsonMap;

0 commit comments

Comments
 (0)