From 5cc8a3efd5e191e28a8bf5f9813ce8ed3e70768e Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Fri, 13 Dec 2024 16:55:37 +0100 Subject: [PATCH 1/3] Add Missing FHIR Type Tags --- .../admin-api/test/blaze/admin_api_test.clj | 4 ++-- .../blaze/elm/compiler/reusing_logic_test.clj | 22 +++++++++---------- modules/db/test/blaze/db/api_test.clj | 16 +++++++------- .../test-perf/blaze/fhir/hash_test_perf.clj | 4 ++-- .../test-perf/blaze/fhir/spec_test_perf.clj | 8 +++---- .../test/blaze/fhir/spec/type_test.clj | 4 ++-- .../test/blaze/fhir/spec_test.clj | 6 ++--- .../src/blaze/job/async_interaction.clj | 2 +- .../test/blaze/job/async_interaction_test.clj | 2 +- modules/job-compact/src/blaze/job/compact.clj | 2 +- .../test/blaze/job/compact_test.clj | 2 +- .../test/blaze/job/re_index_test.clj | 2 +- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/modules/admin-api/test/blaze/admin_api_test.clj b/modules/admin-api/test/blaze/admin_api_test.clj index 2bb03f43a..dd5f27c49 100644 --- a/modules/admin-api/test/blaze/admin_api_test.clj +++ b/modules/admin-api/test/blaze/admin_api_test.clj @@ -675,7 +675,7 @@ [#fhir/Coding {:system #fhir/uri"https://samply.github.io/blaze/fhir/CodeSystem/JobType" :code #fhir/code"re-index" - :display "(Re)Index a Search Parameter"}]} + :display #fhir/string"(Re)Index a Search Parameter"}]} :authoredOn #fhir/dateTime"2024-04-13T10:05:20.927Z" :input [{:fhir/type :fhir.Task/input @@ -696,7 +696,7 @@ [#fhir/Coding {:system #fhir/uri"https://samply.github.io/blaze/fhir/CodeSystem/JobType" :code #fhir/code"compact" - :display "Compact a Database Column Family"}]} + :display #fhir/string"Compact a Database Column Family"}]} :authoredOn #fhir/dateTime"2024-04-13T10:05:20.927Z" :input [{:fhir/type :fhir.Task/input diff --git a/modules/cql/test/blaze/elm/compiler/reusing_logic_test.clj b/modules/cql/test/blaze/elm/compiler/reusing_logic_test.clj index 13ae16e0d..e5c64f357 100644 --- a/modules/cql/test/blaze/elm/compiler/reusing_logic_test.clj +++ b/modules/cql/test/blaze/elm/compiler/reusing_logic_test.clj @@ -386,9 +386,9 @@ (are [x res] (= res (core/-eval expr {:parameters {"x" x}} nil nil)) nil nil - #fhir/Coding{:system "system-140820" - :version "version-140924" - :code "code-140828"} + #fhir/Coding{:system #fhir/uri"system-140820" + :version #fhir/string"version-140924" + :code #fhir/code"code-140828"} (code/code "system-140820" "version-140924" "code-140828"))) (testing "expression is dynamic" @@ -471,9 +471,9 @@ nil #fhir/CodeableConcept {:coding - [#fhir/Coding{:system "system-172740" - :version "version-172819" - :code "code-172745"}]} + [#fhir/Coding{:system #fhir/uri"system-172740" + :version #fhir/string"version-172819" + :code #fhir/code"code-172745"}]} (concept [(code/code "system-172740" "version-172819" "code-172745")]))) @@ -487,14 +487,14 @@ (testing "resolve parameters" (has-form (core/-resolve-params expr {"x" #fhir/CodeableConcept {:coding - [#fhir/Coding{:system "system-172740" - :version "version-172819" - :code "code-172745"}]}}) + [#fhir/Coding{:system #fhir/uri"system-172740" + :version #fhir/string"version-172819" + :code #fhir/code"code-172745"}]}}) '(call "ToConcept" #fhir/CodeableConcept {:coding - [#fhir/Coding{:system "system-172740" + [#fhir/Coding{:system #fhir/uri"system-172740" :version "version-172819" - :code "code-172745"}]})) + :code #fhir/code"code-172745"}]})) (testing-function-ref-optimize "ToConcept") diff --git a/modules/db/test/blaze/db/api_test.clj b/modules/db/test/blaze/db/api_test.clj index a2d2e21a3..848a3b4ed 100644 --- a/modules/db/test/blaze/db/api_test.clj +++ b/modules/db/test/blaze/db/api_test.clj @@ -4387,14 +4387,14 @@ [#fhir/Coding {:system #fhir/uri"http://loinc.org" :code #fhir/code"94564-2" - :display "SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} + :display #fhir/string"SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} :value #fhir/CodeableConcept {:coding [#fhir/Coding {:system #fhir/uri"http://snomed.info/sct" :code #fhir/code"260373001" - :display "Detected (qualifier value)"}]}}] + :display #fhir/string"Detected (qualifier value)"}]}}] [:put {:fhir/type :fhir/Observation :id "id-1" :status #fhir/code"final" :code @@ -4403,14 +4403,14 @@ [#fhir/Coding {:system #fhir/uri"http://loinc.org" :code #fhir/code"94564-2" - :display "SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} + :display #fhir/string"SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} :value #fhir/CodeableConcept {:coding [#fhir/Coding {:system #fhir/uri"http://snomed.info/sct" :code #fhir/code"260415000" - :display "Not detected (qualifier value)"}]}}] + :display #fhir/string"Not detected (qualifier value)"}]}}] [:put {:fhir/type :fhir/Observation :id "id-2" :status #fhir/code"final" :code @@ -4419,14 +4419,14 @@ [#fhir/Coding {:system #fhir/uri"http://loinc.org" :code #fhir/code"94564-2" - :display "SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} + :display #fhir/string"SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} :value #fhir/CodeableConcept {:coding [#fhir/Coding {:system #fhir/uri"http://snomed.info/sct" :code #fhir/code"260373001" - :display "Detected (qualifier value)"}]}}]]] + :display #fhir/string"Detected (qualifier value)"}]}}]]] (testing "missing second value part" (given (d/type-query (d/db node) "Observation" [["code-value-concept" "http://loinc.org|94564-2"]]) @@ -4540,7 +4540,7 @@ [#fhir/Coding {:system #fhir/uri"http://loinc.org" :code #fhir/code"94564-2" - :display "SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} + :display #fhir/string"SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} :subject #fhir/Reference{:reference "Patient/0"}}] [:put {:fhir/type :fhir/Observation :id "1" :code @@ -4549,7 +4549,7 @@ [#fhir/Coding {:system #fhir/uri"http://loinc.org" :code #fhir/code"94564-2" - :display "SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} + :display #fhir/string"SARS-CoV-2 (COVID-19) IgM Ab [Presence]"}]} :subject #fhir/Reference{:reference "Patient/1"}}]]] (doseq [code ["http://loinc.org|94564-2" "94564-2"]] diff --git a/modules/fhir-structure/test-perf/blaze/fhir/hash_test_perf.clj b/modules/fhir-structure/test-perf/blaze/fhir/hash_test_perf.clj index 954852c6e..de72cb5a7 100644 --- a/modules/fhir-structure/test-perf/blaze/fhir/hash_test_perf.clj +++ b/modules/fhir-structure/test-perf/blaze/fhir/hash_test_perf.clj @@ -18,11 +18,11 @@ [#fhir/Coding {:system #fhir/uri"http://terminology.hl7.org/CodeSystem/observation-category" :code #fhir/code"vital-signs" - :display "vital-signs"}]}] + :display #fhir/string"vital-signs"}]}] :code #fhir/CodeableConcept {:coding [#fhir/Coding{:system #fhir/uri"http://loinc.org" :code #fhir/code"39156-5" - :display "Body Mass Index"}] + :display #fhir/string"Body Mass Index"}] :text "Body Mass Index"} :subject #fhir/Reference{:reference "Patient/DACG22233TWT7CKL"} :effective #fhir/dateTime"2013-01-04T23:45:50Z" diff --git a/modules/fhir-structure/test-perf/blaze/fhir/spec_test_perf.clj b/modules/fhir-structure/test-perf/blaze/fhir/spec_test_perf.clj index dbd4c2382..15459092d 100644 --- a/modules/fhir-structure/test-perf/blaze/fhir/spec_test_perf.clj +++ b/modules/fhir-structure/test-perf/blaze/fhir/spec_test_perf.clj @@ -35,11 +35,11 @@ [#fhir/Coding {:system #fhir/uri"http://terminology.hl7.org/CodeSystem/observation-category" :code #fhir/code"vital-signs" - :display "vital-signs"}]}] + :display #fhir/string"vital-signs"}]}] :code #fhir/CodeableConcept {:coding [#fhir/Coding{:system #fhir/uri"http://loinc.org" :code #fhir/code"39156-5" - :display "Body Mass Index"}] + :display #fhir/string"Body Mass Index"}] :text "Body Mass Index"} :subject #fhir/Reference{:reference "Patient/DACG22233TWT7CKL"} :effective #fhir/dateTime"2013-01-04T23:45:50Z" @@ -68,11 +68,11 @@ [#fhir/Coding {:system #fhir/uri"http://terminology.hl7.org/CodeSystem/observation-category" :code #fhir/code"vital-signs" - :display "vital-signs"}]}] + :display #fhir/string"vital-signs"}]}] :code #fhir/CodeableConcept {:coding [#fhir/Coding{:system #fhir/uri"http://loinc.org" :code #fhir/code"39156-5" - :display "Body Mass Index"}] + :display #fhir/string"Body Mass Index"}] :text "Body Mass Index"} :subject #fhir/Reference{:reference "Patient/DACG22233TWT7CKL"} :effective #fhir/dateTime"2013-01-04T23:45:50Z" diff --git a/modules/fhir-structure/test/blaze/fhir/spec/type_test.clj b/modules/fhir-structure/test/blaze/fhir/spec/type_test.clj index 1f4b82680..779a0c023 100644 --- a/modules/fhir-structure/test/blaze/fhir/spec/type_test.clj +++ b/modules/fhir-structure/test/blaze/fhir/spec/type_test.clj @@ -1508,7 +1508,7 @@ #fhir/Coding {:system #fhir/uri"http://fhir.de/CodeSystem/gender-amtlich-de" :code #fhir/code"D" - :display "divers"}}) + :display #fhir/string"divers"}}) (def extended-gender-code (type/code {:extension [gender-extension] :value "other"})) @@ -2205,7 +2205,7 @@ #fhir/Coding{:code #fhir/code"code-202828"} "74e3328d" - #fhir/Coding{:display "display-154256"} + #fhir/Coding{:display #fhir/string"display-154256"} "baac923d")) (testing "references" diff --git a/modules/fhir-structure/test/blaze/fhir/spec_test.clj b/modules/fhir-structure/test/blaze/fhir/spec_test.clj index 3e73d10e6..b24647191 100644 --- a/modules/fhir-structure/test/blaze/fhir/spec_test.clj +++ b/modules/fhir-structure/test/blaze/fhir/spec_test.clj @@ -561,7 +561,7 @@ #fhir/Coding {:system #fhir/uri"http://fhir.de/CodeSystem/gender-amtlich-de" :code #fhir/code"D" - :display "divers"}}] + :display #fhir/string"divers"}}] :value "other"}})))) (testing "Patient with Narrative" @@ -3370,13 +3370,13 @@ #fhir/Coding{:system #fhir/uri"system-185812"} {:system "system-185812"} - #fhir/Coding{:version "version-185951"} + #fhir/Coding{:version #fhir/string"version-185951"} {:version "version-185951"} #fhir/Coding{:code #fhir/code"code-190226"} {:code "code-190226"} - #fhir/Coding{:display "display-190327"} + #fhir/Coding{:display #fhir/string"display-190327"} {:display "display-190327"})) (testing "XML" diff --git a/modules/job-async-interaction/src/blaze/job/async_interaction.clj b/modules/job-async-interaction/src/blaze/job/async_interaction.clj index d2e5bb141..bc1c4d382 100644 --- a/modules/job-async-interaction/src/blaze/job/async_interaction.clj +++ b/modules/job-async-interaction/src/blaze/job/async_interaction.clj @@ -34,7 +34,7 @@ [#fhir/Coding {:system #fhir/uri"https://samply.github.io/blaze/fhir/CodeSystem/JobType" :code #fhir/code"async-interaction" - :display "Asynchronous Interaction Request"}]} + :display #fhir/string"Asynchronous Interaction Request"}]} :authoredOn authored-on :input [(u/request-bundle-input (str "Bundle/" bundle-id)) diff --git a/modules/job-async-interaction/test/blaze/job/async_interaction_test.clj b/modules/job-async-interaction/test/blaze/job/async_interaction_test.clj index f1b8d81e6..cbfc1bb8e 100644 --- a/modules/job-async-interaction/test/blaze/job/async_interaction_test.clj +++ b/modules/job-async-interaction/test/blaze/job/async_interaction_test.clj @@ -311,7 +311,7 @@ [#fhir/Coding {:system #fhir/uri"https://samply.github.io/blaze/fhir/CodeSystem/JobType" :code #fhir/code"async-interaction" - :display "Asynchronous Interaction Request"}]}}) + :display #fhir/string"Asynchronous Interaction Request"}]}}) (testing "the job is failed" (given @(jtu/pull-job system :failed) diff --git a/modules/job-compact/src/blaze/job/compact.clj b/modules/job-compact/src/blaze/job/compact.clj index 3bd30431d..a399f06bb 100644 --- a/modules/job-compact/src/blaze/job/compact.clj +++ b/modules/job-compact/src/blaze/job/compact.clj @@ -44,7 +44,7 @@ [#fhir/Coding {:system #fhir/uri"https://samply.github.io/blaze/fhir/CodeSystem/JobType" :code #fhir/code"compact" - :display "Compact a Database Column Family"}]} + :display #fhir/string"Compact a Database Column Family"}]} :authoredOn authored-on :input [{:fhir/type :fhir.Task/input diff --git a/modules/job-compact/test/blaze/job/compact_test.clj b/modules/job-compact/test/blaze/job/compact_test.clj index 68e1a2704..749e931d8 100644 --- a/modules/job-compact/test/blaze/job/compact_test.clj +++ b/modules/job-compact/test/blaze/job/compact_test.clj @@ -166,7 +166,7 @@ [#fhir/Coding {:system #fhir/uri"https://samply.github.io/blaze/fhir/CodeSystem/JobType" :code #fhir/code"compact" - :display "Compact a Database Column Family"}]}}) + :display #fhir/string"Compact a Database Column Family"}]}}) (def job-missing-column-family (assoc diff --git a/modules/job-re-index/test/blaze/job/re_index_test.clj b/modules/job-re-index/test/blaze/job/re_index_test.clj index 44f291090..75b17725d 100644 --- a/modules/job-re-index/test/blaze/job/re_index_test.clj +++ b/modules/job-re-index/test/blaze/job/re_index_test.clj @@ -215,7 +215,7 @@ [#fhir/Coding {:system #fhir/uri"https://samply.github.io/blaze/fhir/CodeSystem/JobType" :code #fhir/code"re-index" - :display "(Re)Index a Search Parameter"}]}}) + :display #fhir/string"(Re)Index a Search Parameter"}]}}) (def job-clinical-code (assoc From 71bd1883a547f76c9d066f020de0f8dd4cc56081 Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Sat, 14 Dec 2024 10:35:33 +0100 Subject: [PATCH 2/3] Ensure Uniform Jackson Dependencies --- modules/openid-auth/deps.edn | 10 +++++++++- modules/rest-util/deps.edn | 7 ++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/openid-auth/deps.edn b/modules/openid-auth/deps.edn index fd4c376b8..913c17c79 100644 --- a/modules/openid-auth/deps.edn +++ b/modules/openid-auth/deps.edn @@ -17,7 +17,15 @@ ;; newer version for buddy-core dependency cheshire/cheshire - {:mvn/version "5.13.0"}} + {:mvn/version "5.13.0"} + + ;; newer version for cheshire dependency + com.fasterxml.jackson.dataformat/jackson-dataformat-cbor + {:mvn/version "2.18.2"} + + ;; newer version for cheshire dependency + com.fasterxml.jackson.dataformat/jackson-dataformat-smile + {:mvn/version "2.18.2"}} :aliases {:test diff --git a/modules/rest-util/deps.edn b/modules/rest-util/deps.edn index 75ebc46e6..2d43219e5 100644 --- a/modules/rest-util/deps.edn +++ b/modules/rest-util/deps.edn @@ -8,15 +8,16 @@ blaze/fhir-structure {:local/root "../fhir-structure"} - blaze/job-scheduler - {:local/root "../job-scheduler"} - blaze/page-id-cipher {:local/root "../page-id-cipher"} buddy/buddy-core {:mvn/version "1.12.0-430"} + ;; newer version for cheshire dependency + com.fasterxml.jackson.dataformat/jackson-dataformat-smile + {:mvn/version "2.18.2"} + org.apache.httpcomponents.core5/httpcore5 {:mvn/version "5.3.1"} From 1a2eeca484fae88b79019bf069e116cb5b9b7ea2 Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Sat, 14 Dec 2024 11:43:52 +0100 Subject: [PATCH 3/3] Ensure Stream is Closed --- modules/admin-api/src/blaze/admin_api.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/admin-api/src/blaze/admin_api.clj b/modules/admin-api/src/blaze/admin_api.clj index 50d7cae82..94efc7acb 100644 --- a/modules/admin-api/src/blaze/admin_api.clj +++ b/modules/admin-api/src/blaze/admin_api.clj @@ -454,9 +454,9 @@ (defn- load-profile [context name] (log/debug "Load profile" name) (let [parser (.newJsonParser ^FhirContext context) - classloader (.getContextClassLoader (Thread/currentThread)) - source (.getResourceAsStream classloader name)] - (.parseResource parser source))) + classloader (.getContextClassLoader (Thread/currentThread))] + (with-open [source (.getResourceAsStream classloader name)] + (.parseResource parser source)))) (defn- profile-validation-support [context] (let [s (PrePopulatedValidationSupport. context)]