Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ server-repl:
source ./.env && clj -M:server:server-test:nrepl

up:
docker compose --profile local up
docker compose --profile local up -d
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ To run the client, you'll need to have Clojure, Node.js and npm installed on you

1. Install the dependencies: `npm install`
2. Install postcss globally - `npm install -g postcss postcss-cli`
3. Start the development server: `make client-rep`
3. Start the development server: `make client-repl`

The client should now be running at `http://localhost:8280`.

## Server

To run server, you need to have Clojure and Docker installed on your machine. Once you have it, follow these steps:

1. Source `.env` dev environment variables.
2. Start local DB `docker compose --profile local up`
3. Start the server: `make server-repl`
1. Start local DB `make up`
1. Start the server: `make server-repl`
Comment thread
spicyfalafel marked this conversation as resolved.

The server should now be running at `http://localhost:8080`.

Expand Down
3 changes: 1 addition & 2 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ services:
- dev

volumes:
vdd-data:
external: true
vdd-data: {}

networks:
vd-network: {}
13 changes: 6 additions & 7 deletions src/clj/vd_designer/aidbox.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@
(defn eval-view-definition
[{:keys [box-url request fhir-server-headers]}]
(let [{:keys [vd]} (:body-params request)]
@(martian/response-for
(aidbox-client/aidbox-client box-url)
:rpc
(merge {:method 'sof/eval-view
:params {:limit 100
:view vd}}
fhir-server-headers))))
@(martian/response-for (aidbox-client/aidbox-client box-url)
:view-definition-run
(merge {:body {:resourceType "Parameters"
:parameter [{:name "_format" :valueCode "json"}
{:name "viewResource" :resource vd}]}}
fhir-server-headers))))

(defn save-view-definition
[{:keys [box-url request fhir-server-headers]}]
Expand Down
9 changes: 9 additions & 0 deletions src/clj/vd_designer/clients/aidbox.clj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@
:consumes ["application/json"]
:method :delete}

{:route-name :view-definition-run
:path-parts ["/fhir/ViewDefinition/$run"]
:headers-schema {(s/optional-key :Cookie) s/Str
(s/optional-key :Authorization) s/Str}
:produces ["application/json"]
:consumes ["application/json"]
:method :post
:body-schema {:body s/Any}}

{:route-name :rpc
:path-parts ["/rpc"]
:method :post
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/vd_designer/pages/form/controller.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@
::on-eval-view-definition-success
(fn [db [_ result]]
(assoc db
::m/resource-data (:result result)
::m/resource-data {:data result}
::m/eval-loading false)))

(reg-event-fx
Expand Down
Loading