From 1f5397e8c581b3b16e5f87ae7cfc767c239bb84e Mon Sep 17 00:00:00 2001 From: Kaplan <43095@icfrk9y3jjmwk.attlocal.net> Date: Wed, 30 Aug 2023 12:41:02 -0700 Subject: [PATCH] bump up java models --- pom.xml | 2 +- .../madie/measure/utils/QiCoreJsonUtil.java | 4 +-- ...TestCaseJsonPatientUuidChangeUnitTest.java | 30 ++++++++++--------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index 799a33ccf..8c1872b22 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ gov.cms.madie madie-java-models - 0.6.3-SNAPSHOT + 0.6.6-SNAPSHOT ca.uhn.hapi.fhir diff --git a/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java b/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java index 54e420a84..7a4921acc 100644 --- a/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java +++ b/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java @@ -10,9 +10,7 @@ import java.util.regex.Pattern; public final class QiCoreJsonUtil { - private QiCoreJsonUtil() { - - } + private QiCoreJsonUtil() {} public static boolean isValidJson(String json) { ObjectMapper mapper = new ObjectMapper(); diff --git a/src/test/java/cms/gov/madie/measure/config/UpdateTestCaseJsonPatientUuidChangeUnitTest.java b/src/test/java/cms/gov/madie/measure/config/UpdateTestCaseJsonPatientUuidChangeUnitTest.java index b50b45556..da93a9aa8 100644 --- a/src/test/java/cms/gov/madie/measure/config/UpdateTestCaseJsonPatientUuidChangeUnitTest.java +++ b/src/test/java/cms/gov/madie/measure/config/UpdateTestCaseJsonPatientUuidChangeUnitTest.java @@ -43,7 +43,8 @@ class UpdateTestCaseJsonPatientUuidChangeUnitTest { final String malformedJson = "{ \"resourceType\": \"Bundle\", \"type\": \"collection\", \"entry\": [{ \"fullUrl\": \"633c9d020968f8012250fc60 }]}"; // intentional - missing quotes around fullUrl ID - final String untouchedJson = "{\"resourceType\":\"Bundle\",\"id\":\"2106\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2022-09-06T20:47:21.183+00:00\"},\"type\":\"collection\",\"entry\":[{\"fullUrl\":\"http://local/Encounter/2\",\"resource\":{\"id\":\"2\",\"resourceType\":\"Encounter\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-10-13T03:34:10.160+00:00\",\"source\":\"#nEcAkGd8PRwPP5fA\"},\"text\":{\"status\":\"generated\",\"div\":\"
Sep 9th 2021 for Asthma
\"},\"class\":{\"system\":\"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\"code\":\"IMP\",\"display\":\"inpatient encounter\"},\"status\":\"planned\",\"type\":[{\"text\":\"OutPatient\"}],\"subject\":{\"reference\": \"Patient/12e89a1c-39c8-4fe1-bcbb-b19cc05eaf5e\"},\"participant\":[{\"individual\":{\"reference\":\"Practitioner/30164\",\"display\":\"Dr John Doe\"}}],\"period\":{\"start\":\"2023-08-10T03:34:10.054Z\",\"end\":\"2023-08-15T03:34:10.054Z\"}}},{\"fullUrl\":\"http://local/Encounter/3\",\"resource\":{\"id\":\"3\",\"resourceType\":\"Encounter\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-10-13T03:34:10.160+00:00\",\"source\":\"#nEcAkGd8PRwPP5fA\"},\"text\":{\"status\":\"generated\",\"div\":\"
Sep 9th 2021 for Asthma
\"},\"class\":{\"system\":\"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\"code\":\"IMP\",\"display\":\"inpatient encounter\"},\"status\":\"finished\",\"type\":[{\"text\":\"OutPatient\"}],\"subject\":{\"reference\": \"Patient/12e89a1c-39c8-4fe1-bcbb-b19cc05eaf5e\"},\"participant\":[{\"individual\":{\"reference\":\"Practitioner/30164\",\"display\":\"Dr John Doe\"}}],\"period\":{\"start\":\"2023-09-12T03:34:10.054Z\",\"end\":\"2023-09-13T09:34:10.054Z\"}}},{\"fullUrl\":\"http://local/Patient/1\",\"resource\":{\"id\":\"1\",\"resourceType\":\"Patient\",\"text\":{\"status\":\"generated\",\"div\":\"
Lizzy Health
\"},\"meta\":{\"profile\":\"http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient\"},\"identifier\":[{\"system\":\"http://clinfhir.com/fhir/NamingSystem/identifier\",\"value\":\"20181011LizzyHealth\"}],\"name\":[{\"use\":\"official\",\"text\":\"Lizzy Health\",\"family\":\"Health\",\"given\":[\"Lizzy\"]}],\"gender\":\"female\",\"birthDate\":\"2000-10-11\"}}]}"; + final String untouchedJson = + "{\"resourceType\":\"Bundle\",\"id\":\"2106\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2022-09-06T20:47:21.183+00:00\"},\"type\":\"collection\",\"entry\":[{\"fullUrl\":\"http://local/Encounter/2\",\"resource\":{\"id\":\"2\",\"resourceType\":\"Encounter\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-10-13T03:34:10.160+00:00\",\"source\":\"#nEcAkGd8PRwPP5fA\"},\"text\":{\"status\":\"generated\",\"div\":\"
Sep 9th 2021 for Asthma
\"},\"class\":{\"system\":\"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\"code\":\"IMP\",\"display\":\"inpatient encounter\"},\"status\":\"planned\",\"type\":[{\"text\":\"OutPatient\"}],\"subject\":{\"reference\": \"Patient/12e89a1c-39c8-4fe1-bcbb-b19cc05eaf5e\"},\"participant\":[{\"individual\":{\"reference\":\"Practitioner/30164\",\"display\":\"Dr John Doe\"}}],\"period\":{\"start\":\"2023-08-10T03:34:10.054Z\",\"end\":\"2023-08-15T03:34:10.054Z\"}}},{\"fullUrl\":\"http://local/Encounter/3\",\"resource\":{\"id\":\"3\",\"resourceType\":\"Encounter\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-10-13T03:34:10.160+00:00\",\"source\":\"#nEcAkGd8PRwPP5fA\"},\"text\":{\"status\":\"generated\",\"div\":\"
Sep 9th 2021 for Asthma
\"},\"class\":{\"system\":\"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\"code\":\"IMP\",\"display\":\"inpatient encounter\"},\"status\":\"finished\",\"type\":[{\"text\":\"OutPatient\"}],\"subject\":{\"reference\": \"Patient/12e89a1c-39c8-4fe1-bcbb-b19cc05eaf5e\"},\"participant\":[{\"individual\":{\"reference\":\"Practitioner/30164\",\"display\":\"Dr John Doe\"}}],\"period\":{\"start\":\"2023-09-12T03:34:10.054Z\",\"end\":\"2023-09-13T09:34:10.054Z\"}}},{\"fullUrl\":\"http://local/Patient/1\",\"resource\":{\"id\":\"1\",\"resourceType\":\"Patient\",\"text\":{\"status\":\"generated\",\"div\":\"
Lizzy Health
\"},\"meta\":{\"profile\":\"http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient\"},\"identifier\":[{\"system\":\"http://clinfhir.com/fhir/NamingSystem/identifier\",\"value\":\"20181011LizzyHealth\"}],\"name\":[{\"use\":\"official\",\"text\":\"Lizzy Health\",\"family\":\"Health\",\"given\":[\"Lizzy\"]}],\"gender\":\"female\",\"birthDate\":\"2000-10-11\"}}]}"; @Mock MeasureRepository measureRepository; @@ -85,7 +86,8 @@ public void setup() { .json(null) .build(); tc5 = TestCase.builder().id("NoUuidTC").name("No UUID TC").json(json2).build(); - tc6 = TestCase.builder() + tc6 = + TestCase.builder() .id("UntouchedTC") .name("UntouchedTC") .json(untouchedJson) @@ -124,12 +126,12 @@ public void setup() { .build(); measure5 = - Measure.builder() - .id("UntouchedMeasure") - .measureName("UntouchedMeasure") - .model(ModelType.QI_CORE.getValue()) - .testCases(List.of(tc6)) - .build(); + Measure.builder() + .id("UntouchedMeasure") + .measureName("UntouchedMeasure") + .model(ModelType.QI_CORE.getValue()) + .testCases(List.of(tc6)) + .build(); } @Test @@ -271,12 +273,12 @@ public void testChangeUnitExecutionNoUuidTestCase() { public void testChangeUnitExecutionNoUuidTestCaseUnchanged() { when(measureRepository.findAll()).thenReturn(List.of(measure5)); when(testCaseService.enforcePatientId(any(TestCase.class))) - .thenAnswer( - invocationOnMock -> { - Object argument = invocationOnMock.getArgument(0); - TestCase tc = (TestCase) argument; - return tc.getJson(); - }); + .thenAnswer( + invocationOnMock -> { + Object argument = invocationOnMock.getArgument(0); + TestCase tc = (TestCase) argument; + return tc.getJson(); + }); // when changeUnit.updatedTestCaseJsonWithPatientUuid(measureRepository, testCaseService);