-
-
Save refset/c8116f0862abaa94db7752af540549d5 to your computer and use it in GitHub Desktop.
xt-map-id-test.clj
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
;; https://clojurians.slack.com/archives/CG3AM2F7V/p1653948044448019 | |
(with-open [n (xt/start-node {})] | |
(xt/submit-tx n [[::xt/put {:cohesic/type :measurement, | |
:measurement/measurement-id "left-ventricle.end-diastolic-volume", | |
:measurement/diagnostic-report-id | |
"15718872-f75a-4a3e-911b-570b84ad97ed", | |
:measurement/value [1.0 2.0 3.0], | |
:xt/id | |
{:measurement-id "left-ventricle.end-diastolic-volume", | |
:diagnostic-report-version-id "53cfbb74-beea-4630-b729-c0172591ee99"}}]]) | |
(xt/sync n) | |
(xt/entity (xt/db n) {:measurement-id "left-ventricle.end-diastolic-volume", | |
:diagnostic-report-version-id "53cfbb74-beea-4630-b729-c0172591ee99"}) | |
(xt/q (xt/db n) '{:find [e] :where [[e :xt/id {:measurement-id "left-ventricle.end-diastolic-volume", | |
:diagnostic-report-version-id "53cfbb74-beea-4630-b729-c0172591ee99"}]]})) | |
;=> #{[{:diagnostic-report-version-id "53cfbb74-beea-4630-b729-c0172591ee99", :measurement-id "left-ventricle.end-diastolic-volume"}]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment