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

A1208102423475700 | Enable Add to Drug Chart if order is dispensed #76

Merged
merged 2 commits into from
Aug 29, 2024
Merged
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
@@ -1,9 +1,12 @@
package org.openmrs.module.ipd.contract;

import lombok.*;
import org.openmrs.module.bahmniemrapi.drugorder.contract.BahmniOrderAttribute;
import org.openmrs.module.emrapi.encounter.domain.EncounterTransaction;
import org.openmrs.module.ipd.model.IPDDrugOrder;

import java.util.List;

@Getter
@Setter
@Builder
Expand All @@ -14,11 +17,14 @@ public class IPDDrugOrderResponse {
private EncounterTransaction.DrugOrder drugOrder;
private EncounterTransaction.Provider provider;
private DrugOrderScheduleResponse drugOrderSchedule;
private List<BahmniOrderAttribute> drugOrderAttributes;


public static IPDDrugOrderResponse createFrom(IPDDrugOrder ipdDrugOrder) {
IPDDrugOrderResponse ipdDrugOrderResponse= IPDDrugOrderResponse.builder().
drugOrder(ipdDrugOrder.getBahmniDrugOrder().getDrugOrder())
.provider(ipdDrugOrder.getBahmniDrugOrder().getProvider())
.drugOrderAttributes(ipdDrugOrder.getBahmniDrugOrder().getOrderAttributes())
.build();
if (ipdDrugOrder.getDrugOrderSchedule() != null){
ipdDrugOrderResponse.setDrugOrderSchedule(DrugOrderScheduleResponse.createFrom(ipdDrugOrder.getDrugOrderSchedule()));
Expand Down
Loading