-
Notifications
You must be signed in to change notification settings - Fork 1
/
notes
61 lines (47 loc) · 2.12 KB
/
notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
JS setup:
* sudo apt install npm
* npm install mariadb
* on Windows, download and install node.js
Testing:
The "make check" target will load the test data in a local instance.
Running:
node adfice-webserver-runner.js
will start an instance running on 8080.
Accepted arguments are:
[2] port
[3] ETL library
[4] ETL options.json
for example:
node adfice-webserver-runner.js 8081 ./real-etl ./real-etl-options.json
Assuming the test patients are in the system, first go to the "load"
page, as if sent there by the EHR.
The "load" page expects 3 parameters,
* mrn
* user
* participant
The test data (see: sql/insertSynthetic_patient.sql) is all of the form
that the "mrn", and the adfice patient id all are roughly matched.
The mrn values for the test users are of the form: DummyMRN-000000xxx
where the "xxx" is a number greater than zero.
The patient_id is of the test patients are of the form:
00000000-0000-4000-8000-100000000xxx
where the "xxx" of the patient_id matches the "xxx" of the mrn.
Note that an "all zeros" Version 4 (random) UUID would look like:
00000000-0000-4000-8000-000000000000
The test data puts a "1" in value in the 21st position, and then
fills the last three positions. If we create fake-random UUIDs for
something other than a patient, we can put a different value than
"1" in the 21st position.
The participant number is typically NULL, or 10xxx where "xxx" matches
the "xxx" of the mrn and patient_id.
The test data "users" of the system are "dr_alice" and "dr_bob".
To look at test patient 167, the URL would look like this:
http://localhost:8080/load?mrn=DummyMRN-000000167&user=dr_bob&participant=10167
or, with all parameters:
http://localhost:8080/load?mrn=DummyMRN-000000167&fhir=DummyFHIR-000000167&user=dr_bob&study=studynr&participant=10167&iss=http%3A%2F%2Fexample.org%2Fapi%2FFHIR%2FSTU3&launch=boguslaunch
For testing purposes, a shorter session timeout can be set:
http://localhost:8080/load?mrn=DummyMRN-000000167&user=dr_bob&participant=10167&tsec=125
Connect to container:
docker exec -it adfice_13306_mariadb bash
mariadb --user=adfice --password
<enter password from local adfice_mariadb_user_password file>