From a16dbce7aa7558a52e1bd5c835d32bd14408a127 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Thu, 7 Dec 2023 19:12:37 -0500 Subject: [PATCH 1/8] add curl and health check --- Dockerfile | 8 ++++++++ Dockerfile.dev | 7 +++++++ Dockerfile.keycloak | 9 +++++++++ 3 files changed, 24 insertions(+) diff --git a/Dockerfile b/Dockerfile index c5fa147..1989c56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,5 +7,13 @@ COPY --chown=gradle:gradle . . RUN gradle build # Expose port to access the app EXPOSE 8080 + +#HealthCheck +RUN apk update +RUN apk upgrade +RUN apk search curl +RUN apk add curl +HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 + # Command to run our app CMD ./dockerRunnerProd.sh \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 383f535..99b823f 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -8,5 +8,12 @@ RUN gradle build # Expose port to access the app EXPOSE 8080 EXPOSE 8081 + +RUN apk update +RUN apk upgrade +RUN apk search curl +RUN apk add curl +HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 + # Command to run our app CMD ./dockerRunnerDev.sh \ No newline at end of file diff --git a/Dockerfile.keycloak b/Dockerfile.keycloak index ff3b832..67642ff 100644 --- a/Dockerfile.keycloak +++ b/Dockerfile.keycloak @@ -1,2 +1,11 @@ +FROM registry.access.redhat.com/ubi9 AS ubi-micro-build +RUN mkdir -p /mnt/rootfs +RUN dnf install --installroot /mnt/rootfs curl --releasever 9 --setopt install_weak_deps=false --nodocs -y && \ + dnf --installroot /mnt/rootfs clean all && \ + rpm --root /mnt/rootfs -e --nodeps setup + + FROM keycloak/keycloak:22.0.1 +COPY --from=ubi-micro-build /mnt/rootfs / +HEALTHCHECK --interval=60s --timeout=10m --retries=10 CMD curl --fail http://localhost:8080 || exit 1 COPY ./src/main/resources/ClientFhirServerRealm.json /opt/keycloak/data/import/ClientFhirServerRealm.json \ No newline at end of file From 7d38360a70ca9774b09c60a73b51e23c742a9069 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Thu, 7 Dec 2023 21:06:50 -0500 Subject: [PATCH 2/8] updates package installer --- Dockerfile | 8 ++++---- Dockerfile.dev | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1989c56..c9d190b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,10 @@ RUN gradle build EXPOSE 8080 #HealthCheck -RUN apk update -RUN apk upgrade -RUN apk search curl -RUN apk add curl +RUN apt update +RUN apt upgrade +RUN apt search curl +RUN apt add curl HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 # Command to run our app diff --git a/Dockerfile.dev b/Dockerfile.dev index 99b823f..b6124a6 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -9,10 +9,10 @@ RUN gradle build EXPOSE 8080 EXPOSE 8081 -RUN apk update -RUN apk upgrade -RUN apk search curl -RUN apk add curl +RUN apt update +RUN apt upgrade +RUN apt search curl +RUN apt add curl HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 # Command to run our app From 7289f6dcb93eca4dc57e1f155df5b05db083597b Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Thu, 7 Dec 2023 21:11:56 -0500 Subject: [PATCH 3/8] uninstall curl --- Dockerfile | 4 ---- Dockerfile.dev | 4 ---- 2 files changed, 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9d190b..6656d82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,6 @@ RUN gradle build EXPOSE 8080 #HealthCheck -RUN apt update -RUN apt upgrade -RUN apt search curl -RUN apt add curl HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 # Command to run our app diff --git a/Dockerfile.dev b/Dockerfile.dev index b6124a6..4a416bf 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -9,10 +9,6 @@ RUN gradle build EXPOSE 8080 EXPOSE 8081 -RUN apt update -RUN apt upgrade -RUN apt search curl -RUN apt add curl HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 # Command to run our app From 6c2aea3a250c0c26ca7bfa50711b95435894d74f Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Mon, 26 Aug 2024 14:41:47 -0400 Subject: [PATCH 4/8] health check updates --- Dockerfile | 2 +- Dockerfile.dev | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6656d82..7542908 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN gradle build EXPOSE 8080 #HealthCheck -HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 +HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080/test-ehr/r4/metadata || exit 1 # Command to run our app CMD ./dockerRunnerProd.sh \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 4a416bf..ec3a439 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -9,7 +9,7 @@ RUN gradle build EXPOSE 8080 EXPOSE 8081 -HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080 || exit 1 +HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080/test-ehr/r4/metadata || exit 1 # Command to run our app CMD ./dockerRunnerDev.sh \ No newline at end of file From a9e0433856dda86ae99a4309f829700d93acbee9 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra Date: Tue, 27 Aug 2024 12:16:12 -0400 Subject: [PATCH 5/8] health check updates --- Dockerfile | 3 ++- Dockerfile.dev | 3 ++- Dockerfile.keycloak | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7542908..0ea2066 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # Base image FROM gradle:6.9.0-jdk11 + # Set working directory so that all subsequent command runs in this folder WORKDIR /test-ehr # Copy app files to container @@ -9,7 +10,7 @@ RUN gradle build EXPOSE 8080 #HealthCheck -HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080/test-ehr/r4/metadata || exit 1 +HEALTHCHECK --interval=45s --start-period=60s --timeout=10m --retries=10 CMD curl --fail http://localhost:8080/test-ehr/r4/metadata || exit 1 # Command to run our app CMD ./dockerRunnerProd.sh \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index ec3a439..46c3ad1 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,5 +1,6 @@ # Base image FROM gradle:6.9.0-jdk11 + # Set working directory so that all subsequent command runs in this folder WORKDIR /test-ehr # Copy app files to container @@ -9,7 +10,7 @@ RUN gradle build EXPOSE 8080 EXPOSE 8081 -HEALTHCHECK --interval=60s --timeout=10m --retries=5 CMD curl --fail http://localhost:8080/test-ehr/r4/metadata || exit 1 +HEALTHCHECK --interval=45s --start-period=60s --timeout=10m --retries=10 CMD curl --fail http://localhost:8080/test-ehr/r4/metadata || exit 1 # Command to run our app CMD ./dockerRunnerDev.sh \ No newline at end of file diff --git a/Dockerfile.keycloak b/Dockerfile.keycloak index 67642ff..d790ba8 100644 --- a/Dockerfile.keycloak +++ b/Dockerfile.keycloak @@ -7,5 +7,5 @@ RUN dnf install --installroot /mnt/rootfs curl --releasever 9 --setopt install_w FROM keycloak/keycloak:22.0.1 COPY --from=ubi-micro-build /mnt/rootfs / -HEALTHCHECK --interval=60s --timeout=10m --retries=10 CMD curl --fail http://localhost:8080 || exit 1 +HEALTHCHECK --interval=30s --start-period=15s --timeout=10m --retries=10 CMD curl --fail http://localhost:8080 || exit 1 COPY ./src/main/resources/ClientFhirServerRealm.json /opt/keycloak/data/import/ClientFhirServerRealm.json \ No newline at end of file From cd123a4b95d268b4cafdbc1b56471406f5d6aca6 Mon Sep 17 00:00:00 2001 From: Patrick LaRocque Date: Wed, 18 Sep 2024 09:54:41 -0400 Subject: [PATCH 6/8] Update NCPDP SCRIPT support to be a single end point --- .../{RxFillStatusBody.java => Body.java} | 17 +++++- .../org/hl7/codex/rems/script/Message.java | 21 ++++++- .../rems/script/NcpdpScriptController.java | 56 ++++++++++++++++--- .../org/hl7/codex/rems/script/RxFillBody.java | 15 ----- .../hl7/codex/rems/script/RxFillMessage.java | 26 --------- .../rems/script/RxFillStatusMessage.java | 36 ------------ 6 files changed, 82 insertions(+), 89 deletions(-) rename src/main/java/org/hl7/codex/rems/script/{RxFillStatusBody.java => Body.java} (50%) delete mode 100644 src/main/java/org/hl7/codex/rems/script/RxFillBody.java delete mode 100644 src/main/java/org/hl7/codex/rems/script/RxFillMessage.java delete mode 100644 src/main/java/org/hl7/codex/rems/script/RxFillStatusMessage.java diff --git a/src/main/java/org/hl7/codex/rems/script/RxFillStatusBody.java b/src/main/java/org/hl7/codex/rems/script/Body.java similarity index 50% rename from src/main/java/org/hl7/codex/rems/script/RxFillStatusBody.java rename to src/main/java/org/hl7/codex/rems/script/Body.java index 51d946b..67921b8 100644 --- a/src/main/java/org/hl7/codex/rems/script/RxFillStatusBody.java +++ b/src/main/java/org/hl7/codex/rems/script/Body.java @@ -1,10 +1,21 @@ package org.hl7.codex.rems.script; +import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlElement; -public class RxFillStatusBody { +@XmlRootElement(name="Body") +public class Body { + private RxFill rxFill; private Status status; + @XmlElement(name="RxFill") + public RxFill getRxFill() { + return rxFill; + } + public void setRxFill(RxFill rxFill) { + this.rxFill = rxFill; + } + @XmlElement(name="Status") public Status getStatus() { return status; @@ -13,11 +24,11 @@ public void setStatus(Status status) { this.status = status; } - public RxFillStatusBody() { + public Body() { this.status = null; } - public RxFillStatusBody(Status status) { + public Body(Status status) { this.status = status; } } diff --git a/src/main/java/org/hl7/codex/rems/script/Message.java b/src/main/java/org/hl7/codex/rems/script/Message.java index 56c9ce3..9842cdb 100644 --- a/src/main/java/org/hl7/codex/rems/script/Message.java +++ b/src/main/java/org/hl7/codex/rems/script/Message.java @@ -5,7 +5,18 @@ @XmlRootElement(name="Message") public class Message { - protected Header header; + private Header header; + private Body body; + + public Message() { + this.header = null; + this.body = null; + } + + public Message(Header header, Body body) { + this.header = header; + this.body = body; + } @XmlElement(name="Header") public Header getHeader() { @@ -14,4 +25,12 @@ public Header getHeader() { public void setHeader(Header header) { this.header = header; } + + @XmlElement(name="Body") + public Body getBody() { + return body; + } + public void setBody(Body body) { + this.body = body; + } } diff --git a/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java b/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java index b91bc3c..6191285 100644 --- a/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java +++ b/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java @@ -34,14 +34,35 @@ public class NcpdpScriptController { * @param payload - the object used to serialize the XML in the request body. * @return - an object containing the NCPDP Script Status to return. */ - @PostMapping(value = "/script/rxfill", produces = {APPLICATION_XML}, consumes = {APPLICATION_XML}) + @PostMapping(value = "/ncpdp/script", produces = {APPLICATION_XML}, consumes = {APPLICATION_XML}) @ResponseBody - public RxFillStatusMessage getScriptResponse(@RequestBody RxFillMessage payload) { - logger.info("NcpdpScriptController::getScriptResponse /script/rxfill"); + public Message handleScriptMessage(@RequestBody Message payload) { + logger.info("NcpdpScriptController::handleScriptMessage /ncpdp/script"); Header header = payload.getHeader(); - RxFillBody body = payload.getBody(); - FillStatus.DispensedStatusEnum dispensedStatus = body.getRxFill().getFillStatus().getStatus(); + Body body = payload.getBody(); + + if (body.getRxFill() != null) { + logger.info("NcpdpScriptController::handleScriptMessage RxFill Message"); + handleRxFillMessage(body.getRxFill(), header); + } else if (body.getStatus() != null) { + logger.info("NcpdpScriptController::handleScriptMessage Status Message"); + } else { + logger.info("NcpdpScriptController::handleScriptMessage Unsupported NCPDP SCRIPT Message"); + } + + // build the status to return + Header statusHeader = new Header(header.getFrom().value, header.getTo().value, + header.getMessageId(), header.getPrescriberOrderNumber()); + Status status = new Status("000", null, null, null); + Body statusBody = new Body(); + statusBody.setStatus(status); + Message statusMessage = new Message(statusHeader, statusBody); + return statusMessage; + } + + private void handleRxFillMessage(RxFill rxFill, Header header) { + FillStatus.DispensedStatusEnum dispensedStatus = rxFill.getFillStatus().getStatus(); logger.info(" PrescriberOrderNumber: " + header.getPrescriberOrderNumber()); logger.info(" Dispensed Status: " + dispensedStatus); @@ -86,16 +107,35 @@ public RxFillStatusMessage getScriptResponse(@RequestBody RxFillMessage payload) dispenseDetails.setRequestId(dispenseId); medicationDispenseDao.update(medicationDispense, dispenseDetails); logger.info(" Created new MedicationDispense: " + dispenseId); - } + } + } + + + /** + * A custom endpoint that handles NCPDP Script messages. + * @param payload - the object used to serialize the XML in the request body. + * @return - an object containing the NCPDP Script Status to return. + */ +/* + @PostMapping(value = "/script/rxfill", produces = {APPLICATION_XML}, consumes = {APPLICATION_XML}) + @ResponseBody + public StatusMessage getScriptResponse(@RequestBody RxFillMessage payload) { + logger.info("NcpdpScriptController::getScriptResponse /script/rxfill"); + + Header header = payload.getHeader(); + RxFillBody body = payload.getBody(); + + handleRxFillMessage(body.getRxFill(), header); // build the status to return Header statusHeader = new Header(header.getFrom().value, header.getTo().value, header.getMessageId(), header.getPrescriberOrderNumber()); Status status = new Status("000", null, null, null); - RxFillStatusBody statusBody = new RxFillStatusBody(status); - RxFillStatusMessage statusMessage = new RxFillStatusMessage(statusHeader, statusBody); + StatusBody statusBody = new StatusBody(status); + StatusMessage statusMessage = new StatusMessage(statusHeader, statusBody); return statusMessage; } +*/ private MedicationDispense.MedicationDispenseStatus convertRxFillDispensedStatusToMedicationDispenseStatus(FillStatus.DispensedStatusEnum dispensedStatus) { switch(dispensedStatus) { diff --git a/src/main/java/org/hl7/codex/rems/script/RxFillBody.java b/src/main/java/org/hl7/codex/rems/script/RxFillBody.java deleted file mode 100644 index 09d9414..0000000 --- a/src/main/java/org/hl7/codex/rems/script/RxFillBody.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.hl7.codex.rems.script; - -import javax.xml.bind.annotation.XmlElement; - -public class RxFillBody { - private RxFill rxFill; - - @XmlElement(name="RxFill") - public RxFill getRxFill() { - return rxFill; - } - public void setRxFill(RxFill rxFill) { - this.rxFill = rxFill; - } -} diff --git a/src/main/java/org/hl7/codex/rems/script/RxFillMessage.java b/src/main/java/org/hl7/codex/rems/script/RxFillMessage.java deleted file mode 100644 index f8e8219..0000000 --- a/src/main/java/org/hl7/codex/rems/script/RxFillMessage.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.codex.rems.script; - -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlElement; - -@XmlRootElement(name="Message") -public class RxFillMessage { - protected Header header; - private RxFillBody body; - - @XmlElement(name="Header") - public Header getHeader() { - return header; - } - public void setHeader(Header header) { - this.header = header; - } - - @XmlElement(name="Body") - public RxFillBody getBody() { - return body; - } - public void setBody(RxFillBody body) { - this.body = body; - } -} diff --git a/src/main/java/org/hl7/codex/rems/script/RxFillStatusMessage.java b/src/main/java/org/hl7/codex/rems/script/RxFillStatusMessage.java deleted file mode 100644 index 2158897..0000000 --- a/src/main/java/org/hl7/codex/rems/script/RxFillStatusMessage.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.hl7.codex.rems.script; - -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlElement; - -@XmlRootElement(name="Message") -public class RxFillStatusMessage { - protected Header header; - private RxFillStatusBody body; - - public RxFillStatusMessage() { - this.header = null; - this.body = null; - } - - public RxFillStatusMessage(Header header, RxFillStatusBody body) { - this.header = header; - this.body = body; - } - - @XmlElement(name="Header") - public Header getHeader() { - return header; - } - public void setHeader(Header header) { - this.header = header; - } - - @XmlElement(name="Body") - public RxFillStatusBody getBody() { - return body; - } - public void setBody(RxFillStatusBody body) { - this.body = body; - } -} From b099b9d4d7e535fc4f1dc461fe72c3e8e4a807ec Mon Sep 17 00:00:00 2001 From: Patrick LaRocque Date: Wed, 18 Sep 2024 23:07:47 -0400 Subject: [PATCH 7/8] Add error return when unsupported message is received. --- .../java/org/hl7/codex/rems/script/Body.java | 19 ++++++ .../java/org/hl7/codex/rems/script/Error.java | 19 ++++++ .../rems/script/NcpdpScriptController.java | 58 +++++++------------ 3 files changed, 60 insertions(+), 36 deletions(-) create mode 100644 src/main/java/org/hl7/codex/rems/script/Error.java diff --git a/src/main/java/org/hl7/codex/rems/script/Body.java b/src/main/java/org/hl7/codex/rems/script/Body.java index 67921b8..5f5fa51 100644 --- a/src/main/java/org/hl7/codex/rems/script/Body.java +++ b/src/main/java/org/hl7/codex/rems/script/Body.java @@ -7,6 +7,7 @@ public class Body { private RxFill rxFill; private Status status; + private Error error; @XmlElement(name="RxFill") public RxFill getRxFill() { @@ -24,11 +25,29 @@ public void setStatus(Status status) { this.status = status; } + @XmlElement(name="Error") + public Error getError() { + return error; + } + public void setError(Error error) { + this.error = error; + } + public Body() { + this.rxFill = null; this.status = null; + this.error = null; + } + + public Body(RxFill rxFill) { + this.rxFill = rxFill; } public Body(Status status) { this.status = status; } + + public Body(Error error) { + this.error = error; + } } diff --git a/src/main/java/org/hl7/codex/rems/script/Error.java b/src/main/java/org/hl7/codex/rems/script/Error.java new file mode 100644 index 0000000..6651d73 --- /dev/null +++ b/src/main/java/org/hl7/codex/rems/script/Error.java @@ -0,0 +1,19 @@ +package org.hl7.codex.rems.script; + +public class Error { + public String Code; + public String DescriptionCode; + public String Description; + + public Error() { + this.Code = null; + this.DescriptionCode = null; + this.Description = null; + } + + public Error(String code, String descriptionCode, String description) { + this.Code = code; + this.DescriptionCode = descriptionCode; + this.Description = description; + } +} diff --git a/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java b/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java index 6191285..c58b3b1 100644 --- a/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java +++ b/src/main/java/org/hl7/codex/rems/script/NcpdpScriptController.java @@ -42,23 +42,36 @@ public Message handleScriptMessage(@RequestBody Message payload) { Header header = payload.getHeader(); Body body = payload.getBody(); + Boolean returnSuccess = false; + String errorMessage = ""; + if (body.getRxFill() != null) { logger.info("NcpdpScriptController::handleScriptMessage RxFill Message"); handleRxFillMessage(body.getRxFill(), header); + returnSuccess = true; } else if (body.getStatus() != null) { - logger.info("NcpdpScriptController::handleScriptMessage Status Message"); + errorMessage = "Status Message NOT supported"; + logger.info("NcpdpScriptController::handleScriptMessage " + errorMessage); } else { - logger.info("NcpdpScriptController::handleScriptMessage Unsupported NCPDP SCRIPT Message"); + errorMessage = "Unsupported NCPDP SCRIPT Message"; + logger.info("NcpdpScriptController::handleScriptMessage " + errorMessage); } - // build the status to return - Header statusHeader = new Header(header.getFrom().value, header.getTo().value, + Body returnBody; + if (returnSuccess) { + // build the status to return + Status status = new Status("000", null, null, null); + returnBody = new Body(status); + } else { + // build the error to return + Error error = new Error("900", "1000", errorMessage); + returnBody = new Body(error); + } + + Header returnHeader = new Header(header.getFrom().value, header.getTo().value, header.getMessageId(), header.getPrescriberOrderNumber()); - Status status = new Status("000", null, null, null); - Body statusBody = new Body(); - statusBody.setStatus(status); - Message statusMessage = new Message(statusHeader, statusBody); - return statusMessage; + Message returnMessage = new Message(returnHeader, returnBody); + return returnMessage; } private void handleRxFillMessage(RxFill rxFill, Header header) { @@ -110,33 +123,6 @@ private void handleRxFillMessage(RxFill rxFill, Header header) { } } - - /** - * A custom endpoint that handles NCPDP Script messages. - * @param payload - the object used to serialize the XML in the request body. - * @return - an object containing the NCPDP Script Status to return. - */ -/* - @PostMapping(value = "/script/rxfill", produces = {APPLICATION_XML}, consumes = {APPLICATION_XML}) - @ResponseBody - public StatusMessage getScriptResponse(@RequestBody RxFillMessage payload) { - logger.info("NcpdpScriptController::getScriptResponse /script/rxfill"); - - Header header = payload.getHeader(); - RxFillBody body = payload.getBody(); - - handleRxFillMessage(body.getRxFill(), header); - - // build the status to return - Header statusHeader = new Header(header.getFrom().value, header.getTo().value, - header.getMessageId(), header.getPrescriberOrderNumber()); - Status status = new Status("000", null, null, null); - StatusBody statusBody = new StatusBody(status); - StatusMessage statusMessage = new StatusMessage(statusHeader, statusBody); - return statusMessage; - } -*/ - private MedicationDispense.MedicationDispenseStatus convertRxFillDispensedStatusToMedicationDispenseStatus(FillStatus.DispensedStatusEnum dispensedStatus) { switch(dispensedStatus) { case DISPENSED: From 17deb571a49e1d3039b8511f4be0d4016b49ef71 Mon Sep 17 00:00:00 2001 From: Patrick LaRocque Date: Wed, 25 Sep 2024 14:51:04 -0400 Subject: [PATCH 8/8] reduce search cache timeout to 100ms from 60s --- src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9496a29..c9050b4 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -106,7 +106,7 @@ hapi: # max_binary_size: 104857600 # max_page_size: 200 # retain_cached_searches_mins: 60 - # reuse_cached_search_results_millis: 60000 + reuse_cached_search_results_millis: 100 tester: home: name: Local Tester