From e27f4fe183135f2ff3ed298ca66aa70d7424e337 Mon Sep 17 00:00:00 2001 From: Kaplan <43095@icfrk9y3jjmwk.attlocal.net> Date: Mon, 25 Sep 2023 11:20:25 -0700 Subject: [PATCH 1/2] add replacepatientrefs --- .../java/cms/gov/madie/measure/services/TestCaseService.java | 3 +++ src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/cms/gov/madie/measure/services/TestCaseService.java b/src/main/java/cms/gov/madie/measure/services/TestCaseService.java index 8569e5658..1d15e4752 100644 --- a/src/main/java/cms/gov/madie/measure/services/TestCaseService.java +++ b/src/main/java/cms/gov/madie/measure/services/TestCaseService.java @@ -309,6 +309,9 @@ public TestCase updateTestCase( validatedTestCase.setJson( QiCoreJsonUtil.updateResourceFullUrls(validatedTestCase, madieJsonResourcesBaseUri)); } + validatedTestCase.setJson( + QiCoreJsonUtil.replacePatientRefs( + validatedTestCase.getJson(), validatedTestCase.getPatientId().toString())); measure.getTestCases().add(validatedTestCase); measureRepository.save(measure); 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 4241c2cdc..d96c64280 100644 --- a/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java +++ b/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java @@ -304,6 +304,8 @@ public static String updateResourceFullUrls(TestCase testCase, String madieJsonR return testCase.getJson(); } + // update full urls for non-patient resources + protected static String jsonNodeToString(ObjectMapper objectMapper, JsonNode rootNode) { ByteArrayOutputStream bout = new ByteArrayOutputStream(); try { From 8cf7c385412537729d18f93497e7415fdbb36baa Mon Sep 17 00:00:00 2001 From: Kaplan <43095@icfrk9y3jjmwk.attlocal.net> Date: Tue, 26 Sep 2023 07:14:31 -0700 Subject: [PATCH 2/2] fix some oopsies --- .../cms/gov/madie/measure/services/TestCaseService.java | 6 +++--- .../java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/cms/gov/madie/measure/services/TestCaseService.java b/src/main/java/cms/gov/madie/measure/services/TestCaseService.java index 6336d58a7..d891f895f 100644 --- a/src/main/java/cms/gov/madie/measure/services/TestCaseService.java +++ b/src/main/java/cms/gov/madie/measure/services/TestCaseService.java @@ -308,10 +308,10 @@ public TestCase updateTestCase( QiCoreJsonUtil.enforcePatientId(validatedTestCase, madieJsonResourcesBaseUri)); validatedTestCase.setJson( QiCoreJsonUtil.updateResourceFullUrls(validatedTestCase, madieJsonResourcesBaseUri)); + validatedTestCase.setJson( + QiCoreJsonUtil.replacePatientRefs( + validatedTestCase.getJson(), validatedTestCase.getPatientId().toString())); } - validatedTestCase.setJson( - QiCoreJsonUtil.replacePatientRefs( - validatedTestCase.getJson(), validatedTestCase.getPatientId().toString())); measure.getTestCases().add(validatedTestCase); measureRepository.save(measure); 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 083f41f5a..d5b895c85 100644 --- a/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java +++ b/src/main/java/cms/gov/madie/measure/utils/QiCoreJsonUtil.java @@ -316,8 +316,6 @@ public static String updateResourceFullUrls(TestCase testCase, String madieJsonR return testCase.getJson(); } - // update full urls for non-patient resources - protected static String jsonNodeToString(ObjectMapper objectMapper, JsonNode rootNode) { ByteArrayOutputStream bout = new ByteArrayOutputStream(); try {