-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9967b83
commit f12e410
Showing
217 changed files
with
4,678 additions
and
2,667 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
* | ||
!modules | ||
!resources | ||
!src | ||
!Dockerfile | ||
!project.clj | ||
!deps.edn | ||
!pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/target | ||
/.lein-* | ||
/.nrepl-port | ||
.nrepl-port | ||
/queries | ||
/generate-docs.sh | ||
/fill-store.sh | ||
/load-test.sh | ||
/start-db.sh | ||
/cql-test | ||
/kube* | ||
/nginx.conf | ||
.cpcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
dist: trusty | ||
language: clojure | ||
sudo: true | ||
language: java | ||
jdk: | ||
- openjdk8 | ||
lein: 2.8.1 | ||
- openjdk11 | ||
cache: | ||
directories: | ||
- $HOME/.m2 | ||
- $HOME/.cljs | ||
- $HOME/.gitlibs | ||
- .cpcache | ||
install: | ||
- curl -O https://download.clojure.org/install/linux-install-1.10.1.469.sh | ||
- chmod +x linux-install-1.10.1.469.sh | ||
- sudo ./linux-install-1.10.1.469.sh | ||
script: | ||
- ./fetch-cql-tests.sh | ||
- lein check | ||
- lein test | ||
- make check | ||
- make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
FROM clojure:lein-2.9.1 as build | ||
FROM clojure:openjdk-11-tools-deps as build | ||
|
||
COPY . /build/ | ||
|
||
WORKDIR /build | ||
RUN lein uberjar | ||
RUN clojure -A:depstar -m hf.depstar.uberjar target/blaze-standalone.jar | ||
|
||
FROM openjdk:8u222-jre | ||
FROM openjdk:11.0.4-jre | ||
|
||
COPY --from=build /build/target/blaze-0.7.0-alpha3-standalone.jar /app/ | ||
COPY --from=build /build/target/blaze-standalone.jar /app/ | ||
|
||
WORKDIR /app | ||
|
||
CMD ["/bin/bash", "-c", "java $JVM_OPTS -jar blaze-0.7.0-alpha3-standalone.jar"] | ||
CMD ["/bin/bash", "-c", "java $JVM_OPTS -jar blaze-standalone.jar -m blaze.core"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
VERSION = "0.7.0-alpha5" | ||
|
||
check: | ||
clojure -A:check | ||
|
||
modules/cql/cql-test: | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlAggregateFunctionsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlArithmeticFunctionsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlComparisonOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlConditionalOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlDateTimeOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlErrorsAndMessagingOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlIntervalOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlListOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlLogicalOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlNullologicalOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlStringOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlTypeOperatorsTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/CqlTypesTest.xml | ||
wget -P modules/cql/cql-test -q https://raw.githubusercontent.com/HL7/cql/v1.4-ballot/tests/cql/ValueLiteralsAndSelectors.xml | ||
|
||
test-cql: modules/cql/cql-test | ||
cd modules/cql; clojure -A:test --profile :ci | ||
|
||
test-datomic: | ||
cd modules/datomic; clojure -A:test --profile :ci | ||
|
||
test-interaction: | ||
cd modules/interaction; clojure -A:test --profile :ci | ||
|
||
test-openid-auth: | ||
cd modules/openid-auth; clojure -A:test --profile :ci | ||
|
||
test-operations-measure-evaluate-measure: | ||
cd modules/operations/measure-evaluate-measure; clojure -A:test --profile :ci | ||
|
||
test-rest-api: | ||
cd modules/rest-api; clojure -A:test --profile :ci | ||
|
||
test-rest-util: | ||
cd modules/rest-util; clojure -A:test --profile :ci | ||
|
||
test: test-cql test-datomic test-interaction test-openid-auth test-operations-measure-evaluate-measure test-rest-api test-rest-util | ||
clojure -A:test --profile :ci | ||
|
||
uberjar: | ||
clojure -A:depstar -m hf.depstar.uberjar target/blaze-${VERSION}-standalone.jar | ||
|
||
|
||
.PHONY: check test-cql test-datomic test-interaction test-openid-auth test-operations-measure-evaluate-measure test-rest-api test-rest-util test uberjar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
{:paths ["src" "resources"] | ||
|
||
:deps | ||
{blaze/datomic | ||
{:local/root "modules/datomic"} | ||
|
||
blaze/extern-terminology-service | ||
{:local/root "modules/extern-terminology-service"} | ||
|
||
blaze/interaction | ||
{:local/root "modules/interaction"} | ||
|
||
blaze.operation/measure-evaluate-measure | ||
{:local/root "modules/operations/measure-evaluate-measure"} | ||
|
||
blaze/openid-auth | ||
{:local/root "modules/openid-auth"} | ||
|
||
blaze/rest-api | ||
{:local/root "modules/rest-api"} | ||
|
||
blaze/structure-definition | ||
{:local/root "modules/structure-definition"} | ||
|
||
blaze/thread-pool-executor-collector | ||
{:local/root "modules/thread-pool-executor-collector"} | ||
|
||
com.cognitect/anomalies | ||
{:mvn/version "0.1.12"} | ||
|
||
com.datomic/datomic-free | ||
{:mvn/version "0.9.5697" | ||
:exclusions | ||
[io.netty/netty-all]} | ||
|
||
com.h2database/h2 | ||
{:mvn/version "1.4.199"} | ||
|
||
com.taoensso/timbre | ||
{:mvn/version "4.10.0"} | ||
|
||
integrant | ||
{:git/url "https://github.com/alexanderkiel/integrant.git" | ||
:sha "c673b85130e553feec6d4c5d2d1ec773a49c929c"} | ||
|
||
io.netty/netty-codec-http | ||
{:mvn/version "4.1.39.Final"} | ||
|
||
io.netty/netty-handler-proxy | ||
{:mvn/version "4.1.39.Final"} | ||
|
||
io.netty/netty-resolver-dns | ||
{:mvn/version "4.1.39.Final"} | ||
|
||
io.netty/netty-transport-native-epoll$linux-x86_64 | ||
{:mvn/version "4.1.39.Final"} | ||
|
||
io.prometheus/simpleclient_hotspot | ||
{:mvn/version "0.6.0"} | ||
|
||
org.clojars.akiel/datomic-spec | ||
{:mvn/version "0.5.2"} | ||
|
||
org.clojars.akiel/datomic-tools | ||
{:mvn/version "0.4"} | ||
|
||
org.clojars.akiel/spec-coerce | ||
{:mvn/version "0.4.0"} | ||
|
||
org.clojure/clojure | ||
{:mvn/version "1.10.1"} | ||
|
||
org.clojure/tools.reader | ||
{:mvn/version "1.3.2"} | ||
|
||
phrase | ||
{:mvn/version "0.3-alpha3"} | ||
|
||
prom-metrics | ||
{:mvn/version "0.5-alpha2"}} | ||
|
||
:aliases | ||
{:depstar | ||
{:extra-deps | ||
{seancorfield/depstar | ||
{:mvn/version "0.3.3"}}} | ||
|
||
:check | ||
{:extra-deps | ||
{athos/clj-check | ||
{:git/url "https://github.com/athos/clj-check.git" | ||
:sha "b48d4e7000586529f81c1e29069b503b57259514"}} | ||
:main-opts | ||
["-m" "clj-check.check"]} | ||
|
||
:test | ||
{:extra-paths ["dev" "test"] | ||
|
||
:extra-deps | ||
{criterium | ||
{:mvn/version "0.4.5"} | ||
|
||
lambdaisland/kaocha | ||
{:mvn/version "0.0-554"} | ||
|
||
org.clojars.akiel/iota | ||
{:mvn/version "0.1"} | ||
|
||
org.clojure/data.xml | ||
{:mvn/version "0.0.8"} | ||
|
||
org.clojure/test.check | ||
{:mvn/version "0.10.0"} | ||
|
||
org.clojure/tools.namespace | ||
{:mvn/version "0.3.1"}} | ||
|
||
:main-opts | ||
["-m" "kaocha.runner"]}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
(ns blaze.dev | ||
(:require | ||
[blaze.spec] | ||
[blaze.system :as system] | ||
[clojure.repl :refer [pst]] | ||
[clojure.spec.test.alpha :as st] | ||
[clojure.tools.namespace.repl :refer [refresh]] | ||
[datomic-spec.test :as dst])) | ||
|
||
|
||
;; Spec Instrumentation | ||
(st/instrument) | ||
(dst/instrument) | ||
|
||
|
||
(defonce system nil) | ||
|
||
|
||
(defn init [] | ||
(alter-var-root #'system (constantly (system/init! (System/getenv)))) | ||
nil) | ||
|
||
|
||
(defn reset [] | ||
(some-> system system/shutdown!) | ||
(refresh :after `init)) | ||
|
||
|
||
;; Init Development | ||
(comment | ||
(init) | ||
(pst) | ||
) | ||
|
||
|
||
;; Reset after making changes | ||
(comment | ||
(reset) | ||
(st/unstrument) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(ns blaze.dev.datomic | ||
(:require | ||
[blaze.datomic.util :as datomic-util] | ||
[blaze.dev :refer [system]] | ||
[datomic.api :as d])) | ||
|
||
|
||
(defn count-resources [db type] | ||
(d/q '[:find (count ?e) . :in $ ?id :where [?e ?id]] db (datomic-util/resource-id-attr type))) | ||
|
||
|
||
(comment | ||
(def conn (::conn system)) | ||
(def db (d/db conn)) | ||
(def hdb (d/history db)) | ||
|
||
(count-resources (d/db conn) "Coding") | ||
(count-resources (d/db conn) "Organization") | ||
(count-resources (d/db conn) "Patient") | ||
(count-resources (d/db conn) "Specimen") | ||
(count-resources (d/db conn) "Observation") | ||
|
||
(d/pull (d/db conn) '[*] 1262239348687945) | ||
(d/entity (d/db conn) [:Patient/id "0"]) | ||
(d/q '[:find (pull ?e [*]) :where [?e :code/id]] (d/db conn)) | ||
|
||
(d/pull (d/db conn) '[*] (d/t->tx 1197)) | ||
) | ||
|
Oops, something went wrong.