Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAH-3156 | Introducing a parallel API for fetching Lab results #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,166 @@ public String getPreferredPanelName() {
public void setPreferredPanelName(String preferredPanelName) {
this.preferredPanelName = preferredPanelName;
}

public static class Builder {

private String orderUuid;
private String action;
private String accessionUuid;
private String testName;
private String testUnitOfMeasurement;
private Double minNormal;
private Double maxNormal;
private Date accessionDateTime;
private List<AccessionNote> accessionNotes;
private String uploadedFileName;
private Boolean referredOut;
private Boolean abnormal;
private String result;
private String preferredTestName;
private String notes;
private Date resultDateTime;
private String testUuid;
private String providerName;
private Date vsiitStartTime;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vsiit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a typo (visit)?

private String panelName;
private String panelUuid;
private String preferredPanelName;

public Builder order(String orderUuid) {
this.orderUuid = orderUuid;
return this;
}

public Builder action(String action) {
this.action = action;
return this;
}
public Builder accession(String accessionUuid) {
this.accessionUuid = accessionUuid;
return this;
}

public Builder testName(String testName) {
this.testName = testName;
return this;
}

public Builder uom(String uom) {
this.testUnitOfMeasurement = uom;
return this;
}

public Builder minNormal(Double minNormal) {
this.minNormal = minNormal;
return this;
}

public Builder maxNormal(Double maxNormal) {
this.maxNormal = maxNormal;
return this;
}

public Builder accessionDateTime(Date accessionDateTime) {
this.accessionDateTime = accessionDateTime;
return this;
}

public Builder result(String result) {
this.result = result;
return this;
}

public Builder abnormal(Boolean abnormal) {
this.abnormal = abnormal;
return this;
}

public Builder referredOut(Boolean referredOut) {
this.referredOut = referredOut;
return this;
}

public Builder uploadedFileName(String uploadedFileName) {
this.uploadedFileName = uploadedFileName;
return this;
}

public Builder accessionNotes(List<AccessionNote> accessionNotes) {
this.accessionNotes = accessionNotes;
return this;
}

public LabOrderResult build() {
LabOrderResult labOrderResult = new LabOrderResult();
labOrderResult.setOrderUuid(orderUuid);
labOrderResult.setAction(action);
labOrderResult.setTestName(testName);
labOrderResult.setTestUuid(testUuid);
labOrderResult.setResult(result);
labOrderResult.setTestUnitOfMeasurement(testUnitOfMeasurement);
labOrderResult.setAccessionUuid(accessionUuid);
labOrderResult.setAccessionDateTime(accessionDateTime);
labOrderResult.setAccessionNotes(accessionNotes);
labOrderResult.setMinNormal(minNormal);
labOrderResult.setMaxNormal(maxNormal);
labOrderResult.setAbnormal(abnormal);
labOrderResult.setReferredOut(referredOut);
labOrderResult.setUploadedFileName(uploadedFileName);
labOrderResult.setPreferredTestName(preferredTestName);
labOrderResult.setNotes(notes);
labOrderResult.setResultDateTime(resultDateTime);
labOrderResult.setProvider(providerName);
labOrderResult.setVisitStartTime(vsiitStartTime);
labOrderResult.setPanelName(panelName);
labOrderResult.setPreferredPanelName(preferredPanelName);
labOrderResult.setPanelUuid(panelUuid);
return labOrderResult;
}

public Builder preferredTestName(String preferredTestName) {
this.preferredTestName = preferredTestName;
return this;
}

public Builder notes(String notes) {
this.notes = notes;
return this;
}

public Builder resultDateTime(Date resultDateTime) {
this.resultDateTime = resultDateTime;
return this;
}

public Builder testUuid(String testUuid) {
this.testUuid = testUuid;
return this;
}

public Builder provider(String providerName) {
this.providerName = providerName;
return this;
}

public Builder visitStartTime(Date vsiitStartTime) {
this.vsiitStartTime = vsiitStartTime;
return this;
}

public Builder panelName(String panelName) {
this.panelName = panelName;
return this;
}

public Builder panelUuid(String panelUuid) {
this.panelUuid = panelUuid;
return this;
}

public Builder preferredPanelName(String preferredPanelName) {
this.preferredPanelName = preferredPanelName;
return this;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.openmrs.module.bahmniemrapi.laborder.service;

import org.openmrs.Obs;
import org.openmrs.Order;
import org.openmrs.Patient;
import org.openmrs.Visit;
import org.openmrs.module.bahmniemrapi.laborder.contract.LabOrderResult;
Expand All @@ -13,4 +15,6 @@ public interface LabOrderResultsService {
LabOrderResults getAll(Patient patient, List<Visit> visits, int numberOfAccessions);

List<LabOrderResult> getAllForConcepts(Patient patient, Collection<String> concepts, List<Visit> visits, Date startDate, Date endDate);

List<LabOrderResult> resultsForOrders(List<Order> orders, List<Obs> obsList, Integer numberOfAccessions);
}
Loading
Loading