Skip to content

Commit

Permalink
Merge pull request #41 from Bahmni/visit-details
Browse files Browse the repository at this point in the history
Adds visitDetails to AdmittedPatientResponse
  • Loading branch information
umair-fayaz authored Mar 12, 2024
2 parents d29bbc9 + 83d3e08 commit 1b53908
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ public class AdmittedPatientResponse {

private Object patientDetails;
private Object bedDetails;
private Object visitDetails;
private Long newTreatments;
private Object careTeam;
public static AdmittedPatientResponse createFrom(AdmittedPatient admittedPatient) {
AdmittedPatientResponse admittedPatientResponse = AdmittedPatientResponse.builder().
patientDetails(ConversionUtil.convertToRepresentation(admittedPatient.getBedPatientAssignment().getPatient(), Representation.DEFAULT)).
bedDetails(ConversionUtil.convertToRepresentation(admittedPatient.getBedPatientAssignment().getBed(),Representation.REF)).
visitDetails(ConversionUtil.convertToRepresentation(admittedPatient.getBedPatientAssignment().getEncounter().getVisit(), Representation.REF)).
newTreatments(admittedPatient.getNewTreatments()).build();

if ( admittedPatient.getCareTeam() != null ) {
Expand Down

0 comments on commit 1b53908

Please sign in to comment.