diff --git a/resources/src/main/java/org/hl7/davinci/r4/crdhook/CrdPrefetch.java b/resources/src/main/java/org/hl7/davinci/r4/crdhook/CrdPrefetch.java index ab001b9c2..8d4e4152c 100644 --- a/resources/src/main/java/org/hl7/davinci/r4/crdhook/CrdPrefetch.java +++ b/resources/src/main/java/org/hl7/davinci/r4/crdhook/CrdPrefetch.java @@ -22,14 +22,14 @@ public class CrdPrefetch { @JsonSerialize(using = JacksonHapiSerializer.class) @JsonDeserialize(using = JacksonIBaseResourceDeserializer.class) - private IBaseResource patientBundle; + private IBaseResource patient; - public IBaseResource getPatientBundle() { - return patientBundle; + public IBaseResource getPatient() { + return patient; } - public void setPatientBundle(IBaseResource patientBundle) { - this.patientBundle = patientBundle; + public void setPatient(IBaseResource patient) { + this.patient = patient; } @JsonSerialize(using = JacksonHapiSerializer.class) diff --git a/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/AppointmentBookRequest.java b/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/AppointmentBookRequest.java index dca7192f8..6e2c239e2 100644 --- a/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/AppointmentBookRequest.java +++ b/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/AppointmentBookRequest.java @@ -22,7 +22,7 @@ public Object getDataForPrefetchToken() { contextMap.put("userId", getContext().getUserId()); contextMap.put("patientId", getContext().getPatientId()); contextMap.put("encounterId", getContext().getEncounterId()); - contextMap.put("draftOrders", Utilities.bundleAsHashmap(getContext().getDraftOrders())); + // contextMap.put("draftOrders", Utilities.bundleAsHashmap(getContext().getDraftOrders())); mapForPrefetchTemplates.put("context", contextMap); return mapForPrefetchTemplates; diff --git a/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/CrdPrefetchTemplateElements.java b/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/CrdPrefetchTemplateElements.java index 98d78f65b..6b4309e24 100644 --- a/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/CrdPrefetchTemplateElements.java +++ b/resources/src/main/java/org/hl7/davinci/r4/crdhook/appointmentbook/CrdPrefetchTemplateElements.java @@ -2,6 +2,7 @@ import org.hl7.davinci.PrefetchTemplateElement; import org.hl7.fhir.r4.model.Bundle; +import org.hl7.fhir.r4.model.Patient; /** * Class that contains the different prefetch template elements used in crd requests. @@ -9,9 +10,9 @@ */ public class CrdPrefetchTemplateElements { - public static final PrefetchTemplateElement PATIENT_BUNDLE = new PrefetchTemplateElement( - "patientBundle", - Bundle.class, + public static final PrefetchTemplateElement PATIENT = new PrefetchTemplateElement( + "patient", + Patient.class, "Patient/{{context.patientId}}"); public static final PrefetchTemplateElement COVERAGE_REQUEST_BUNDLE = new PrefetchTemplateElement( diff --git a/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/r4/AppointmentBookService.java b/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/r4/AppointmentBookService.java index 26c36116a..21bdd5470 100644 --- a/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/r4/AppointmentBookService.java +++ b/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/r4/AppointmentBookService.java @@ -31,7 +31,7 @@ public class AppointmentBookService extends CdsService{ "Get information regarding the coverage requirements for appointments"; public static final List PREFETCH_ELEMENTS = Arrays.asList( CrdPrefetchTemplateElements.COVERAGE_REQUEST_BUNDLE, - CrdPrefetchTemplateElements.PATIENT_BUNDLE, + CrdPrefetchTemplateElements.PATIENT, CrdPrefetchTemplateElements.ENCOUNTER_BUNDLE); public static final FhirComponents FHIRCOMPONENTS = new FhirComponents(); public static final List CONFIGURATION_OPTIONS = Arrays.asList(