From 61a83c286ddd3880065a33fad391deb795d722fc Mon Sep 17 00:00:00 2001 From: Clement Hennequin Date: Fri, 18 Oct 2024 14:58:20 -0400 Subject: [PATCH] prints 999 without decimal --- .../iis/kernal/logic/ExampleMessageWriterR4.java | 6 +++++- .../iis/kernal/logic/ExampleMessageWriterR5.java | 6 +++++- .../iis/kernal/logic/IncomingMessageHandlerR4.java | 6 +++++- .../iis/kernal/logic/IncomingMessageHandlerR5.java | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR4.java b/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR4.java index 0160bcb3..30c235d1 100644 --- a/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR4.java +++ b/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR4.java @@ -77,7 +77,11 @@ public String buildVxu(VaccinationReported vaccinationReported, Tenant tenant) { } } if (adminAmount > 0) { - sb.append(adminAmount); + if (adminAmount == 999.0) { + sb.append("999"); + } else { + sb.append(adminAmount); + } } // RXA-7 sb.append("|"); diff --git a/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR5.java b/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR5.java index 9b94e747..25c39325 100644 --- a/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR5.java +++ b/src/main/java/org/immregistries/iis/kernal/logic/ExampleMessageWriterR5.java @@ -77,7 +77,11 @@ public String buildVxu(VaccinationReported vaccinationReported, Tenant tenant) { } } if (adminAmount > 0) { - sb.append(adminAmount); + if (adminAmount == 999.0) { + sb.append("999"); + } else { + sb.append(adminAmount); + } } // RXA-7 sb.append("|"); diff --git a/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR4.java b/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR4.java index b20e00be..6ed180e3 100644 --- a/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR4.java +++ b/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR4.java @@ -1113,7 +1113,11 @@ public String buildRSP(HL7Reader reader, String messageRecieved, PatientMaster p } } if (adminAmount > 0) { - sb.append(adminAmount); + if (adminAmount == 999.0) { + sb.append("999"); + } else { + sb.append(adminAmount); + } } // RXA-7 sb.append("|"); diff --git a/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR5.java b/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR5.java index 727913ad..aae33c05 100644 --- a/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR5.java +++ b/src/main/java/org/immregistries/iis/kernal/logic/IncomingMessageHandlerR5.java @@ -1118,7 +1118,11 @@ public String buildRSP(HL7Reader reader, String messageRecieved, PatientMaster p } } if (adminAmount > 0) { - sb.append(adminAmount); + if (adminAmount == 999.0) { + sb.append("999"); + } else { + sb.append(adminAmount); + } } // RXA-7 sb.append("|");