Skip to content

Commit

Permalink
Merge pull request #723 from samply/release-v0.17.5
Browse files Browse the repository at this point in the history
Release v0.17.5
  • Loading branch information
alexanderkiel committed May 24, 2022
2 parents 02919a7 + 32d00d9 commit bda9a59
Show file tree
Hide file tree
Showing 44 changed files with 4,608 additions and 1,878 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,6 @@ jobs:
- name: Evaluate CQL Query 14 - Subject List
run: .github/scripts/evaluate-measure-subject-list.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q14-query.cql 96

- name: Evaluate CQL Query 15
run: .github/scripts/evaluate-measure.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q15-query.cql 31

- name: Evaluate CQL Query 15 - Subject List
run: .github/scripts/evaluate-measure-subject-list.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q15-query.cql 31

- name: Evaluate CQL Query 17
run: .github/scripts/evaluate-measure.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q17-query.cql 120

Expand Down Expand Up @@ -823,12 +817,6 @@ jobs:
- name: Evaluate CQL Query 14 - Subject List
run: .github/scripts/evaluate-measure-subject-list.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q14-query.cql 96

- name: Evaluate CQL Query 15
run: .github/scripts/evaluate-measure.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q15-query.cql 31

- name: Evaluate CQL Query 15 - Subject List
run: .github/scripts/evaluate-measure-subject-list.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q15-query.cql 31

- name: Evaluate CQL Query 17
run: .github/scripts/evaluate-measure.sh modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q17-query.cql 120

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.17.5

### Bugfixes

* Allow Extensions on Date Data Type ([#371](https://github.com/samply/blaze/issues/371))

The full changelog can be found [here](https://github.com/samply/blaze/milestone/43?closed=1).

## v0.17.4

### Bugfixes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The goal of this project is to provide a FHIR® Store with an internal CQL Evalu

Blaze passes all [Touchstone FHIR 4.0.1 Basic Tests][12] and almost all [CQL Tests][3]. Please refer to the [Conformance](docs/conformance.md) section and report any issues you encounter during evaluation.

Latest release: [v0.17.4][5]
Latest release: [v0.17.5][5]

## Quick Start

Expand Down Expand Up @@ -72,7 +72,7 @@ Unless required by applicable law or agreed to in writing, software distributed

[3]: <https://cql.hl7.org/tests.html>
[4]: <https://alexanderkiel.gitbook.io/blaze/deployment>
[5]: <https://github.com/samply/blaze/releases/tag/v0.17.4>
[5]: <https://github.com/samply/blaze/releases/tag/v0.17.5>
[6]: <https://www.yourkit.com/java/profiler/>
[7]: <https://www.yourkit.com/.net/profiler/>
[8]: <https://www.yourkit.com/youmonitor/>
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
:outdated
{:replace-deps
{com.github.liquidz/antq
{:mvn/version "1.6.2"}
{:mvn/version "1.6.774"}

org.slf4j/slf4j-nop
{:mvn/version "1.7.36"}}
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/docker-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Blaze should log something like this:
2021-06-27T11:02:37.834Z ee086ef908c1 main INFO [blaze.core:64] - JVM version: 16.0.2
2021-06-27T11:02:37.834Z ee086ef908c1 main INFO [blaze.core:65] - Maximum available memory: 1738 MiB
2021-06-27T11:02:37.835Z ee086ef908c1 main INFO [blaze.core:66] - Number of available processors: 8
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.17.4 in 8.2 seconds
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.17.5 in 8.2 seconds
```

In order to test connectivity, query the health endpoint:
Expand All @@ -47,7 +47,7 @@ that should return:
```json
{
"name": "Blaze",
"version": "0.17.4"
"version": "0.17.5"
}
```

Expand Down
12 changes: 6 additions & 6 deletions docs/deployment/manual-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

The installation works under Windows, Linux and macOS. The only dependency is an installed OpenJDK 11. Blaze is tested with [AdoptOpenJDK][1].

Blaze runs on the JVM and comes as single JAR file. Download the most recent version [here](https://github.com/samply/blaze/releases/tag/v0.17.4). Look for `blaze-0.17.4-standalone.jar`.
Blaze runs on the JVM and comes as single JAR file. Download the most recent version [here](https://github.com/samply/blaze/releases/tag/v0.17.5). Look for `blaze-0.17.5-standalone.jar`.

After the download, you can start blaze with the following command (Linux, macOS):

```sh
java -jar blaze-0.17.4-standalone.jar -m blaze.core
java -jar blaze-0.17.5-standalone.jar -m blaze.core
```

Blaze will run with an in-memory, volatile database for testing and demo purposes.
Expand All @@ -17,14 +17,14 @@ Blaze can be run with durable storage by setting the environment variables `STOR
Under Linux/macOS:

```sh
STORAGE=standalone java -jar blaze-0.17.4-standalone.jar -m blaze.core
STORAGE=standalone java -jar blaze-0.17.5-standalone.jar -m blaze.core
```

Under Windows, you need to set the Environment variables in the PowerShell before starting Blaze:

```powershell
$Env:STORAGE="standalone"
java -jar blaze-0.17.4-standalone.jar -m blaze.core
java -jar blaze-0.17.5-standalone.jar -m blaze.core
```

This will create three directories called `index`, `transaction` and `resource` inside the current working directory, one for each database part used.
Expand All @@ -42,7 +42,7 @@ The output should look like this:
2021-06-27T11:02:37.834Z ee086ef908c1 main INFO [blaze.core:64] - JVM version: 16.0.2
2021-06-27T11:02:37.834Z ee086ef908c1 main INFO [blaze.core:65] - Maximum available memory: 1738 MiB
2021-06-27T11:02:37.835Z ee086ef908c1 main INFO [blaze.core:66] - Number of available processors: 8
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.17.4 in 8.2 seconds
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.17.5 in 8.2 seconds
```

In order to test connectivity, query the health endpoint:
Expand All @@ -62,7 +62,7 @@ that should return:
```json
{
"name": "Blaze",
"version": "0.17.4"
"version": "0.17.5"
}
```

Expand Down
2 changes: 1 addition & 1 deletion modules/db-stub/src/blaze/db/api_stub.clj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:resource-handle-cache (ig/ref :blaze.db/resource-handle-cache)
:tx-cache (ig/ref :blaze.db/tx-cache)
:indexer-executor (ig/ref :blaze.db.node/indexer-executor)
:resource-store (ig/ref :blaze.db/resource-store)
:resource-store (ig/ref ::rs/kv)
:kv-store (ig/ref :blaze.db/index-kv-store)
:resource-indexer (ig/ref :blaze.db.node/resource-indexer)
:search-param-registry (ig/ref :blaze.db/search-param-registry)}
Expand Down
1 change: 1 addition & 0 deletions modules/db/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
blaze/spec
{:local/root "../spec"}

;; Warning: version 0.4.1 is from 2017 but has no dependencies
clj-fuzzy/clj-fuzzy
{:mvn/version "0.4.1"}}

Expand Down
2 changes: 1 addition & 1 deletion modules/db/test-perf/blaze/db/api_test_perf.clj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
:resource-handle-cache (ig/ref :blaze.db/resource-handle-cache)
:tx-cache (ig/ref :blaze.db/tx-cache)
:indexer-executor (ig/ref :blaze.db.node/indexer-executor)
:resource-store (ig/ref :blaze.db/resource-store)
:resource-store (ig/ref ::rs/kv)
:kv-store (ig/ref :blaze.db/index-kv-store)
:resource-indexer (ig/ref :blaze.db.node/resource-indexer)
:search-param-registry (ig/ref :blaze.db/search-param-registry)
Expand Down
20 changes: 19 additions & 1 deletion modules/db/test/blaze/db/api_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

(def slow-resource-store-system
(-> (assoc-in system [:blaze.db/node :resource-store] (ig/ref ::slow-resource-store))
(assoc ::slow-resource-store {:resource-store (ig/ref :blaze.db/resource-store)})))
(assoc ::slow-resource-store {:resource-store (ig/ref ::rs/kv)})))


(defmethod ig/init-key ::resource-store-failing-on-put [_ _]
Expand Down Expand Up @@ -245,6 +245,24 @@
[:meta :versionId] := #fhir/id"1"
[meta :blaze.db/op] := :put))))

(testing "one Patient with an Extension on birthDate"
(with-system-data [{:blaze.db/keys [node]} system]
[[[:put {:fhir/type :fhir/Patient :id "0"
:birthDate
#fhir/date
{:extension [#fhir/Extension{:url "foo" :value #fhir/code"bar"}]
:value "2022"}}]]]

(testing "the Patient was created"
(given @(d/pull node (d/resource-handle (d/db node) "Patient" "0"))
:fhir/type := :fhir/Patient
:id := "0"
[:meta :versionId] := #fhir/id"1"
[meta :blaze.db/op] := :put
[:birthDate :extension 0 :url] := "foo"
[:birthDate :extension 0 :value] := #fhir/code"bar"
[:birthDate :value] := #fhir/date"2022"))))

(testing "one Patient with one Observation"
(with-system-data [{:blaze.db/keys [node]} system]
;; the create ops are purposely disordered in order to test the
Expand Down
2 changes: 1 addition & 1 deletion modules/db/test/blaze/db/node_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
(-> (assoc-in system [:blaze.db/node :resource-store]
(ig/ref ::resource-store-slow-on-put))
(assoc ::resource-store-slow-on-put
{:resource-store (ig/ref :blaze.db/resource-store)})))
{:resource-store (ig/ref ::rs/kv)})))


(deftest init-test
Expand Down
6 changes: 5 additions & 1 deletion modules/db/test/blaze/db/test_util.clj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:resource-handle-cache (ig/ref :blaze.db/resource-handle-cache)
:tx-cache (ig/ref :blaze.db/tx-cache)
:indexer-executor (ig/ref :blaze.db.node/indexer-executor)
:resource-store (ig/ref :blaze.db/resource-store)
:resource-store (ig/ref ::rs/kv)
:kv-store (ig/ref :blaze.db/index-kv-store)
:resource-indexer (ig/ref :blaze.db.node/resource-indexer)
:search-param-registry (ig/ref :blaze.db/search-param-registry)
Expand All @@ -31,8 +31,10 @@
::tx-log/local
{:kv-store (ig/ref :blaze.db/transaction-kv-store)
:clock (ig/ref :blaze.test/clock)}

[::kv/mem :blaze.db/transaction-kv-store]
{:column-families {}}

:blaze.test/clock {}

:blaze.db/resource-handle-cache {}
Expand Down Expand Up @@ -61,8 +63,10 @@
::rs/kv
{:kv-store (ig/ref :blaze.db/resource-kv-store)
:executor (ig/ref ::rs-kv/executor)}

[::kv/mem :blaze.db/resource-kv-store]
{:column-families {}}

::rs-kv/executor {}

:blaze.db.node/resource-indexer
Expand Down
4 changes: 2 additions & 2 deletions modules/fhir-path/src/blaze/fhir_path.clj
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,13 @@
fhirpathParser$DateLiteralContext
(-compile [ctx]
(let [text (subs (.getText (.getSymbol (.DATE ctx))) 1)]
[(type/->Date text)]))
[(type/date text)]))

fhirpathParser$DateTimeLiteralContext
(-compile [ctx]
(let [text (subs (.getText (.getSymbol (.DATETIME ctx))) 1)
text (if (str/ends-with? text "T") (subs text 0 (dec (count text))) text)]
[(type/->DateTime text)]))
[(type/dateTime text)]))

fhirpathParser$MemberInvocationContext
(-compile [ctx]
Expand Down
5 changes: 3 additions & 2 deletions modules/fhir-structure/.clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{:lint-as
{blaze.fhir.spec.type.macros/defprimitivetype clojure.core/deftype
{blaze.fhir.spec.type.macros/def-primitive-type clojure.core/deftype
blaze.fhir.spec.type.macros/defextended clojure.core/defrecord
blaze.test-util/with-system clojure.core/with-open}

:hooks
{:macroexpand
{blaze.fhir.spec.type.macros/defcomplextype macros/defcomplextype}}
{blaze.fhir.spec.type.macros/def-complex-type macros/def-complex-type}}

:linters
{:unsorted-required-namespaces
Expand Down
2 changes: 1 addition & 1 deletion modules/fhir-structure/.clj-kondo/macros.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns macros)


(defmacro defcomplextype
(defmacro def-complex-type
[name [& fields] & {:keys [fhir-type hash-num interned references field-serializers]
:or {interned false}}]
`(defrecord ~name [~@fields]
Expand Down
11 changes: 3 additions & 8 deletions modules/fhir-structure/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@

:extra-deps
{blaze/test-util
{:local/root "../test-util"}

criterium/criterium
{:mvn/version "0.4.6"}

org.openjdk.jol/jol-core
{:mvn/version "0.16"}}}
{:local/root "../test-util"}}}

:kaocha
{:extra-deps
Expand All @@ -77,4 +71,5 @@
{cloverage/cloverage
{:mvn/version "1.2.3"}}

:main-opts ["-m" "cloverage.coverage" "--codecov" "-p" "src" "-s" "test"]}}}
:main-opts ["-m" "cloverage.coverage" "--codecov" "-p" "src" "-s" "test"
"-e" ".*spec$"]}}}
31 changes: 17 additions & 14 deletions modules/fhir-structure/resources/data_readers.clj
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
{blaze/hash blaze.fhir.hash/from-hex
blaze/hash-prefix blaze.fhir.hash/prefix-from-hex
fhir/integer clojure.core/int
fhir/long clojure.core/long
fhir/boolean blaze.fhir.spec.type/boolean
fhir/integer blaze.fhir.spec.type/integer
fhir/long blaze.fhir.spec.type/long
fhir/string blaze.fhir.spec.type/string
fhir/decimal blaze.fhir.spec.type/decimal
fhir/uri blaze.fhir.spec.type/uri
fhir/url blaze.fhir.spec.type/->Url
fhir/url blaze.fhir.spec.type/url
fhir/canonical blaze.fhir.spec.type/canonical
fhir/base64Binary blaze.fhir.spec.type/->Base64Binary
fhir/instant blaze.fhir.spec.type/->Instant
fhir/date blaze.fhir.spec.type/->Date
fhir/dateTime blaze.fhir.spec.type/->DateTime
fhir/time blaze.fhir.spec.type/->Time
fhir/base64Binary blaze.fhir.spec.type/base64Binary
fhir/instant blaze.fhir.spec.type/instant
fhir/date blaze.fhir.spec.type/date
fhir/dateTime blaze.fhir.spec.type/dateTime
fhir/time blaze.fhir.spec.type/time
fhir/code blaze.fhir.spec.type/code
fhir/oid blaze.fhir.spec.type/->Oid
fhir/id blaze.fhir.spec.type/->Id
fhir/markdown blaze.fhir.spec.type/->Markdown
fhir/unsignedInt blaze.fhir.spec.type/->UnsignedInt
fhir/positiveInt blaze.fhir.spec.type/->PositiveInt
fhir/uuid blaze.fhir.spec.type/->Uuid
fhir/oid blaze.fhir.spec.type/oid
fhir/id blaze.fhir.spec.type/id
fhir/markdown blaze.fhir.spec.type/markdown
fhir/unsignedInt blaze.fhir.spec.type/unsignedInt
fhir/positiveInt blaze.fhir.spec.type/positiveInt
fhir/uuid blaze.fhir.spec.type/uuid
fhir/xhtml blaze.fhir.spec.type/->Xhtml
fhir/Attachment blaze.fhir.spec.type/map->Attachment
fhir/Extension blaze.fhir.spec.type/extension
Expand Down
21 changes: 9 additions & 12 deletions modules/fhir-structure/src/blaze/fhir/spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[cognitect.anomalies :as anom]
[jsonista.core :as j])
(:import
[com.fasterxml.jackson.databind DeserializationFeature]
[com.fasterxml.jackson.databind DeserializationFeature ObjectMapper]
[com.fasterxml.jackson.dataformat.cbor CBORFactory]
[java.util.regex Pattern]))

Expand All @@ -22,11 +22,10 @@


(def ^:private json-object-mapper
(-> (j/object-mapper
{:decode-key-fn true
:bigdecimals true
:modules [type/fhir-module]})
(.enable DeserializationFeature/FAIL_ON_TRAILING_TOKENS)))
(doto (ObjectMapper.)
(.registerModule type/fhir-module)
(.enable DeserializationFeature/USE_BIG_DECIMAL_FOR_FLOATS)
(.enable DeserializationFeature/FAIL_ON_TRAILING_TOKENS)))


(defn parse-json
Expand All @@ -44,10 +43,8 @@


(def ^:private cbor-object-mapper
(j/object-mapper
{:factory (CBORFactory.)
:decode-key-fn true
:modules [type/fhir-module]}))
(doto (ObjectMapper. (CBORFactory.))
(.registerModule type/fhir-module)))


(defn parse-cbor
Expand Down Expand Up @@ -290,7 +287,7 @@
(when-not (s2/invalid? resource)
resource))))
(ba/incorrect
"Invalid intermediate representation of a resource."
"Invalid JSON representation of a resource."
:x x
:fhir/issues (:fhir/issues (explain-data-json x)))))

Expand All @@ -309,6 +306,6 @@
(when-not (s2/invalid? resource)
resource))))
(ba/incorrect
"Invalid intermediate representation of a resource."
"Invalid XML representation of a resource."
:x x
:fhir/issues (:fhir/issues (explain-data-xml x)))))
Loading

0 comments on commit bda9a59

Please sign in to comment.