Skip to content

Commit 7b61950

Browse files
committed
Merge branch 'release/0.7.0'
# Conflicts: # Dockerfile # README.md # docker-compose.yml # docs/index.adoc # project.clj
2 parents db1e013 + f6f946f commit 7b61950

File tree

244 files changed

+11604
-5054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+11604
-5054
lines changed

.clj-kondo/config.edn

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{:lint-as
2+
{blaze.elm.compiler/defunop clojure.core/defn
3+
blaze.elm.compiler/defbinop clojure.core/defn
4+
blaze.elm.compiler/defternop clojure.core/defn
5+
blaze.elm.compiler/defnaryop clojure.core/defn
6+
blaze.elm.compiler/defaggop clojure.core/defn
7+
blaze.elm.compiler/defbinopp clojure.core/defn
8+
blaze.elm.compiler/defunopp clojure.core/defn
9+
clojure.test.check.properties/for-all clojure.core/let
10+
datomic-tools.schema/defunc clojure.core/defn
11+
manifold.deferred/loop clojure.core/loop
12+
manifold.deferred/let-flow clojure.core/let
13+
manifold.deferred/let-flow' clojure.core/let
14+
prometheus.alpha/defcounter clojure.core/def
15+
prometheus.alpha/defhistogram clojure.core/def}
16+
17+
:linters
18+
{:unused-private-var
19+
{:exclude
20+
[blaze.datomic.value/string-short-len-code
21+
blaze.datomic.value/string-int-len-code
22+
blaze.datomic.value/boolean-code]}
23+
24+
;; because of macros in modules/cql/src/blaze/elm/compiler.clj
25+
:redefined-var
26+
{:level :off}}}

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*
2+
!modules
23
!resources
34
!src
45
!Dockerfile
5-
!project.clj
6+
!deps.edn
7+
!pom.xml

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/target
22
/.lein-*
3-
/.nrepl-port
3+
.nrepl-port
44
/queries
55
/generate-docs.sh
66
/fill-store.sh
77
/load-test.sh
88
/start-db.sh
9-
/cql-test
109
/kube*
1110
/nginx.conf
11+
.cpcache
12+
.cache

.travis.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
dist: trusty
2-
language: clojure
1+
sudo: true
2+
language: java
33
jdk:
44
- openjdk8
5-
lein: 2.8.1
5+
- openjdk11
6+
cache:
7+
directories:
8+
- $HOME/.m2
9+
- $HOME/.cljs
10+
- $HOME/.gitlibs
11+
- .cpcache
12+
install:
13+
- curl -O https://download.clojure.org/install/linux-install-1.10.1.469.sh
14+
- chmod +x linux-install-1.10.1.469.sh
15+
- sudo ./linux-install-1.10.1.469.sh
616
script:
7-
- ./fetch-cql-tests.sh
8-
- lein check
9-
- lein test
17+
- make check
18+
- make lint
19+
- make test

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
FROM clojure:lein-2.9.1 as build
1+
FROM clojure:openjdk-11-tools-deps as build
22

33
COPY . /build/
44

55
WORKDIR /build
6-
RUN lein uberjar
6+
RUN clojure -A:depstar -m hf.depstar.uberjar target/blaze-standalone.jar
77

8-
FROM openjdk:8u222-jre
8+
FROM openjdk:11.0.4-jre
99

10-
COPY --from=build /build/target/blaze-0.6.4-standalone.jar /app/
10+
COPY --from=build /build/target/blaze-standalone.jar /app/
1111

1212
WORKDIR /app
1313

14-
CMD ["/bin/bash", "-c", "java $JVM_OPTS -jar blaze-0.6.4-standalone.jar"]
14+
CMD ["/bin/bash", "-c", "java $JVM_OPTS -jar blaze-standalone.jar -m blaze.core"]

LICENSE

Lines changed: 201 additions & 213 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
VERSION = "0.7.0"
2+
3+
check:
4+
clojure -A:check
5+
6+
lint:
7+
clojure -A:clj-kondo --lint modules
8+
clojure -A:clj-kondo --lint src
9+
10+
modules/cql/cql-test:
11+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlAggregateFunctionsTest.xml
12+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlArithmeticFunctionsTest.xml
13+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlComparisonOperatorsTest.xml
14+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlConditionalOperatorsTest.xml
15+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlDateTimeOperatorsTest.xml
16+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlErrorsAndMessagingOperatorsTest.xml
17+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlIntervalOperatorsTest.xml
18+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlListOperatorsTest.xml
19+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlLogicalOperatorsTest.xml
20+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlNullologicalOperatorsTest.xml
21+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlStringOperatorsTest.xml
22+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlTypeOperatorsTest.xml
23+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlTypesTest.xml
24+
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/ValueLiteralsAndSelectors.xml
25+
26+
test-cql: modules/cql/cql-test
27+
cd modules/cql; clojure -A:test --profile :ci
28+
29+
test-datomic:
30+
cd modules/datomic; clojure -A:test --profile :ci
31+
32+
test-interaction:
33+
cd modules/interaction; clojure -A:test --profile :ci
34+
35+
test-openid-auth:
36+
cd modules/openid-auth; clojure -A:test --profile :ci
37+
38+
test-operations-measure-evaluate-measure:
39+
cd modules/operations/measure-evaluate-measure; clojure -A:test --profile :ci
40+
41+
test-rest-api:
42+
cd modules/rest-api; clojure -A:test --profile :ci
43+
44+
test-rest-util:
45+
cd modules/rest-util; clojure -A:test --profile :ci
46+
47+
test: test-cql test-datomic test-interaction test-openid-auth test-operations-measure-evaluate-measure test-rest-api test-rest-util
48+
clojure -A:test --profile :ci
49+
50+
uberjar:
51+
clojure -A:depstar -m hf.depstar.uberjar target/blaze-${VERSION}-standalone.jar
52+
53+
54+
.PHONY: check test-cql test-datomic test-interaction test-openid-auth test-operations-measure-evaluate-measure test-rest-api test-rest-util test uberjar

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The goal of this project is to provide a FHIR® Store with an internal CQL Evalu
1414

1515
The project is currently under active development. Essentially all official [CQL Tests][3] pass. Please report any issues you encounter during evaluation.
1616

17-
Latest release: [v0.6.4][5]
17+
Latest release: [v0.7.0][5]
1818

1919
## Quick Start
2020

@@ -23,14 +23,14 @@ In order to run Blaze with an in-memory, volatile database, just execute the fol
2323
### Docker
2424

2525
```bash
26-
docker run -p 8080:8080 liferesearch/blaze:0.6.4
26+
docker run -p 8080:8080 liferesearch/blaze:0.7.0
2727
```
2828

2929
### Java
3030

3131
```bash
32-
wget https://github.com/life-research/blaze/releases/download/v0.6.4/blaze-0.6.4-standalone.jar
33-
java -jar blaze-0.6.4-standalone.jar
32+
wget https://github.com/samply/blaze/releases/download/v0.7.0/blaze-0.7.0-standalone.jar
33+
java -jar blaze-0.7.0-standalone.jar
3434
```
3535

3636
Logging output should appear which prints the most important settings and system parameters like Java version and available memory.
@@ -47,13 +47,16 @@ In-deep deployment options of Blaze are described in the [Deployment Section][4]
4747

4848
## License
4949

50-
Copyright © 2019 LIFE Research Center (Alexander Kiel)
50+
Copyright 2019 The Samply Development Community
5151

52-
Distributed under the Eclipse Public License either version 1.0 or (at
53-
your option) any later version.
52+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
53+
54+
http://www.apache.org/licenses/LICENSE-2.0
55+
56+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5457

5558
[1]: <https://github.com/life-research/life-fhir-gen>
5659
[2]: <http://cql-runner.dataphoria.org/>
5760
[3]: <https://cql.hl7.org/tests.html>
5861
[4]: <https://alexanderkiel.gitbook.io/blaze/deployment>
59-
[5]: <https://github.com/life-research/blaze/releases/tag/v0.6.4>
62+
[5]: <https://github.com/samply/blaze/releases/tag/v0.7.0>

deps.edn

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{:paths ["src" "resources"]
2+
3+
:deps
4+
{blaze/datomic
5+
{:local/root "modules/datomic"}
6+
7+
blaze/extern-terminology-service
8+
{:local/root "modules/extern-terminology-service"}
9+
10+
blaze/interaction
11+
{:local/root "modules/interaction"}
12+
13+
blaze.operation/measure-evaluate-measure
14+
{:local/root "modules/operations/measure-evaluate-measure"}
15+
16+
blaze/openid-auth
17+
{:local/root "modules/openid-auth"}
18+
19+
blaze/rest-api
20+
{:local/root "modules/rest-api"}
21+
22+
blaze/structure-definition
23+
{:local/root "modules/structure-definition"}
24+
25+
blaze/thread-pool-executor-collector
26+
{:local/root "modules/thread-pool-executor-collector"}
27+
28+
com.cognitect/anomalies
29+
{:mvn/version "0.1.12"}
30+
31+
com.datomic/datomic-free
32+
{:mvn/version "0.9.5697"
33+
:exclusions
34+
[io.netty/netty-all]}
35+
36+
com.h2database/h2
37+
{:mvn/version "1.4.199"}
38+
39+
com.taoensso/timbre
40+
{:mvn/version "4.10.0"}
41+
42+
integrant
43+
{:git/url "https://github.com/alexanderkiel/integrant.git"
44+
:sha "c673b85130e553feec6d4c5d2d1ec773a49c929c"}
45+
46+
io.netty/netty-codec-http
47+
{:mvn/version "4.1.39.Final"}
48+
49+
io.netty/netty-handler-proxy
50+
{:mvn/version "4.1.39.Final"}
51+
52+
io.netty/netty-resolver-dns
53+
{:mvn/version "4.1.39.Final"}
54+
55+
io.netty/netty-transport-native-epoll$linux-x86_64
56+
{:mvn/version "4.1.39.Final"}
57+
58+
io.prometheus/simpleclient_hotspot
59+
{:mvn/version "0.6.0"}
60+
61+
org.clojars.akiel/datomic-spec
62+
{:mvn/version "0.5.2"}
63+
64+
org.clojars.akiel/datomic-tools
65+
{:mvn/version "0.4"}
66+
67+
org.clojars.akiel/spec-coerce
68+
{:mvn/version "0.4.0"}
69+
70+
org.clojure/clojure
71+
{:mvn/version "1.10.1"}
72+
73+
org.clojure/tools.reader
74+
{:mvn/version "1.3.2"}
75+
76+
prom-metrics
77+
{:mvn/version "0.5-alpha2"}}
78+
79+
:aliases
80+
{:depstar
81+
{:extra-deps
82+
{seancorfield/depstar
83+
{:mvn/version "0.3.3"}}}
84+
85+
:check
86+
{:extra-deps
87+
{athos/clj-check
88+
{:git/url "https://github.com/athos/clj-check.git"
89+
:sha "b48d4e7000586529f81c1e29069b503b57259514"}}
90+
:main-opts
91+
["-m" "clj-check.check"]}
92+
93+
:test
94+
{:extra-paths ["dev" "test"]
95+
96+
:extra-deps
97+
{criterium
98+
{:mvn/version "0.4.5"}
99+
100+
lambdaisland/kaocha
101+
{:mvn/version "0.0-554"}
102+
103+
org.clojars.akiel/iota
104+
{:mvn/version "0.1"}
105+
106+
org.clojure/data.xml
107+
{:mvn/version "0.0.8"}
108+
109+
org.clojure/test.check
110+
{:mvn/version "0.10.0"}
111+
112+
org.clojure/tools.namespace
113+
{:mvn/version "0.3.1"}}
114+
115+
:main-opts
116+
["-m" "kaocha.runner"]}
117+
118+
:clj-kondo
119+
{:extra-deps
120+
{clj-kondo
121+
{:mvn/version "2019.11.03"}}
122+
123+
:main-opts ["-m" "clj-kondo.main"]}}}

dev/blaze/dev.clj

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
(ns blaze.dev
2+
(:require
3+
[blaze.spec]
4+
[blaze.system :as system]
5+
[clojure.repl :refer [pst]]
6+
[clojure.spec.test.alpha :as st]
7+
[clojure.tools.namespace.repl :refer [refresh]]
8+
[datomic-spec.test :as dst]))
9+
10+
11+
;; Spec Instrumentation
12+
(st/instrument)
13+
(dst/instrument)
14+
15+
16+
(defonce system nil)
17+
18+
19+
(defn init []
20+
(alter-var-root #'system (constantly (system/init! (System/getenv))))
21+
nil)
22+
23+
24+
(defn reset []
25+
(some-> system system/shutdown!)
26+
(refresh :after `init))
27+
28+
29+
;; Init Development
30+
(comment
31+
(init)
32+
(pst)
33+
)
34+
35+
36+
;; Reset after making changes
37+
(comment
38+
(reset)
39+
(st/unstrument)
40+
)

dev/blaze/dev/datomic.clj

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
(ns blaze.dev.datomic
2+
(:require
3+
[blaze.datomic.util :as datomic-util]
4+
[blaze.dev :refer [system]]
5+
[datomic.api :as d]))
6+
7+
8+
(defn count-resources [db type]
9+
(d/q '[:find (count ?e) . :in $ ?id :where [?e ?id]] db (datomic-util/resource-id-attr type)))
10+
11+
12+
(comment
13+
(def conn (::conn system))
14+
(def db (d/db conn))
15+
(def hdb (d/history db))
16+
17+
(count-resources (d/db conn) "Coding")
18+
(count-resources (d/db conn) "Organization")
19+
(count-resources (d/db conn) "Patient")
20+
(count-resources (d/db conn) "Specimen")
21+
(count-resources (d/db conn) "Observation")
22+
23+
(d/pull (d/db conn) '[*] 1262239348687945)
24+
(d/entity (d/db conn) [:Patient/id "0"])
25+
(d/q '[:find (pull ?e [*]) :where [?e :code/id]] (d/db conn))
26+
27+
(d/pull (d/db conn) '[*] (d/t->tx 1197))
28+
)
29+

0 commit comments

Comments
 (0)