dhti-cli 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -4
- package/dist/commands/compose.js +2 -2
- package/dist/commands/docker.d.ts +2 -0
- package/dist/commands/docker.js +34 -1
- package/dist/commands/docktor.d.ts +1 -1
- package/dist/commands/docktor.js +88 -78
- package/dist/commands/synthea.d.ts +73 -0
- package/dist/commands/synthea.js +579 -0
- package/dist/resources/docker-compose-master.yml +50 -47
- package/oclif.manifest.json +183 -1
- package/package.json +3 -2
|
@@ -12,7 +12,6 @@ services:
|
|
|
12
12
|
- "80:80"
|
|
13
13
|
- "9001:80"
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
frontend:
|
|
17
16
|
image: openmrs/openmrs-reference-application-3-frontend:3.0.0-beta.17
|
|
18
17
|
# image: openmrs/openmrs-reference-application-3-frontend:${TAG:-3.0.0-beta.17} # dev3, qa, demo, 3.0.0-beta.18
|
|
@@ -59,7 +58,7 @@ services:
|
|
|
59
58
|
restart: "unless-stopped"
|
|
60
59
|
command: "mysqld --character-set-server=utf8 --collation-server=utf8_general_ci"
|
|
61
60
|
healthcheck:
|
|
62
|
-
test:
|
|
61
|
+
test: 'mysql --user=${OMRS_DB_USER:-openmrs} --password=${OMRS_DB_PASSWORD:-openmrs} --execute "SHOW DATABASES;"'
|
|
63
62
|
interval: 3s
|
|
64
63
|
timeout: 1s
|
|
65
64
|
retries: 5
|
|
@@ -78,11 +77,15 @@ services:
|
|
|
78
77
|
- "8001:8001"
|
|
79
78
|
restart: "unless-stopped"
|
|
80
79
|
environment:
|
|
81
|
-
- OLLAMA_SERVER_URL
|
|
80
|
+
- OLLAMA_SERVER_URL=http://ollama:11434
|
|
82
81
|
- OLLAMA_WEBUI=http://ollama-webui:8080
|
|
83
82
|
- LANGFUSE_HOST=http://langfuse:3000
|
|
84
|
-
- LANGFUSE_PUBLIC_KEY
|
|
85
|
-
- LANGFUSE_SECRET_KEY
|
|
83
|
+
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-pk-lf-abcd}
|
|
84
|
+
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-sk-lf-abcd}
|
|
85
|
+
- GOOGLE_API_KEY=${GOOGLE_API_KEY:-google-api-key}
|
|
86
|
+
- OPENAI_API_KEY=${OPENAI_API_KEY:-openai-api-key}
|
|
87
|
+
- OPENAI_API_BASE=${OPENAI_API_BASE:-https://openrouter.ai/api/v1}
|
|
88
|
+
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-openrouter-api-key}
|
|
86
89
|
|
|
87
90
|
ollama:
|
|
88
91
|
image: ollama/ollama:latest
|
|
@@ -105,7 +108,7 @@ services:
|
|
|
105
108
|
ports:
|
|
106
109
|
- 8080:8080
|
|
107
110
|
environment:
|
|
108
|
-
-
|
|
111
|
+
- "/ollama/api=http://ollama:11434/api"
|
|
109
112
|
extra_hosts:
|
|
110
113
|
- host.docker.internal:host-gateway
|
|
111
114
|
restart: unless-stopped
|
|
@@ -118,19 +121,19 @@ services:
|
|
|
118
121
|
depends_on:
|
|
119
122
|
- postgres-db
|
|
120
123
|
environment:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
124
|
+
- "spring.datasource.url=jdbc:postgresql://postgres-db:5432/postgres"
|
|
125
|
+
- "spring.datasource.username=postgres"
|
|
126
|
+
- "spring.datasource.password=postgres"
|
|
127
|
+
- "spring.datasource.driverClassName=org.postgresql.Driver"
|
|
128
|
+
- "spring.jpa.properties.hibernate.dialect=ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect"
|
|
129
|
+
- "hapi.fhir.fhir_version=R4"
|
|
130
|
+
- "hapi.fhir.cors.allowed-origins=*"
|
|
131
|
+
- "hapi.fhir.cors.allowCredentials=true"
|
|
132
|
+
- "hapi.fhir.bulkdata.enabled=true"
|
|
133
|
+
- "hapi.fhir.bulk_export_enabled=true"
|
|
134
|
+
- "hapi.fhir.bulk_import_enabled=true"
|
|
135
|
+
- "hapi.fhir.enforce_referential_integrity_on_write=false"
|
|
136
|
+
- "hapi.fhir.enforce_referential_integrity_on_delete=false"
|
|
134
137
|
|
|
135
138
|
mcp-fhir:
|
|
136
139
|
image: beapen/fhir-mcp-server:4.0
|
|
@@ -264,7 +267,7 @@ services:
|
|
|
264
267
|
redis:
|
|
265
268
|
condition: service_healthy
|
|
266
269
|
ports:
|
|
267
|
-
-
|
|
270
|
+
- "8103:8103"
|
|
268
271
|
volumes:
|
|
269
272
|
# Conditionally define a volume for a `medplum.config.json` if one is specified by the MEDPLUM_CONFIG_PATH env var
|
|
270
273
|
- ${MEDPLUM_CONFIG_PATH:-./medplum.config.json}:/usr/src/medplum/packages/server/medplum.config.json
|
|
@@ -280,43 +283,43 @@ services:
|
|
|
280
283
|
"
|
|
281
284
|
environment:
|
|
282
285
|
MEDPLUM_PORT: 8103
|
|
283
|
-
MEDPLUM_BASE_URL:
|
|
284
|
-
MEDPLUM_APP_BASE_URL:
|
|
285
|
-
MEDPLUM_STORAGE_BASE_URL:
|
|
286
|
+
MEDPLUM_BASE_URL: "http://localhost:8103/"
|
|
287
|
+
MEDPLUM_APP_BASE_URL: "http://localhost:3103/"
|
|
288
|
+
MEDPLUM_STORAGE_BASE_URL: "http://localhost:8103/storage/"
|
|
286
289
|
|
|
287
|
-
MEDPLUM_DATABASE_HOST:
|
|
290
|
+
MEDPLUM_DATABASE_HOST: "postgres-db"
|
|
288
291
|
MEDPLUM_DATABASE_PORT: 5432
|
|
289
|
-
MEDPLUM_DATABASE_DBNAME:
|
|
290
|
-
MEDPLUM_DATABASE_USERNAME:
|
|
291
|
-
MEDPLUM_DATABASE_PASSWORD:
|
|
292
|
+
MEDPLUM_DATABASE_DBNAME: "postgres"
|
|
293
|
+
MEDPLUM_DATABASE_USERNAME: "postgres"
|
|
294
|
+
MEDPLUM_DATABASE_PASSWORD: "postgres"
|
|
292
295
|
|
|
293
|
-
MEDPLUM_REDIS_HOST:
|
|
296
|
+
MEDPLUM_REDIS_HOST: "redis"
|
|
294
297
|
MEDPLUM_REDIS_PORT: 6379
|
|
295
298
|
# MEDPLUM_REDIS_PASSWORD: 'medplum'
|
|
296
299
|
|
|
297
|
-
MEDPLUM_BINARY_STORAGE:
|
|
300
|
+
MEDPLUM_BINARY_STORAGE: "file:./binary/"
|
|
298
301
|
MEDPLUM_SUPPORT_EMAIL: '\"Medplum\" <support@medplum.com>'
|
|
299
|
-
MEDPLUM_GOOGLE_CLIENT_ID:
|
|
300
|
-
MEDPLUM_GOOGLE_CLIENT_SECRET:
|
|
301
|
-
MEDPLUM_RECAPTCHA_SITE_KEY:
|
|
302
|
-
MEDPLUM_RECAPTCHA_SECRET_KEY:
|
|
303
|
-
MEDPLUM_MAX_JSON_SIZE:
|
|
304
|
-
MEDPLUM_MAX_BATCH_SIZE:
|
|
305
|
-
MEDPLUM_BOT_LAMBDA_ROLE_ARN:
|
|
306
|
-
MEDPLUM_BOT_LAMBDA_LAYER_NAME:
|
|
307
|
-
MEDPLUM_VM_CONTEXT_BOTS_ENABLED:
|
|
308
|
-
MEDPLUM_DEFAULT_BOT_RUNTIME_VERSION:
|
|
309
|
-
MEDPLUM_ALLOWED_ORIGINS:
|
|
310
|
-
MEDPLUM_INTROSPECTION_ENABLED:
|
|
302
|
+
MEDPLUM_GOOGLE_CLIENT_ID: "397236612778-c0b5tnjv98frbo1tfuuha5vkme3cmq4s.apps.googleusercontent.com"
|
|
303
|
+
MEDPLUM_GOOGLE_CLIENT_SECRET: ""
|
|
304
|
+
MEDPLUM_RECAPTCHA_SITE_KEY: "6LfHdsYdAAAAAC0uLnnRrDrhcXnziiUwKd8VtLNq"
|
|
305
|
+
MEDPLUM_RECAPTCHA_SECRET_KEY: "6LfHdsYdAAAAAH9dN154jbJ3zpQife3xaiTvPChL"
|
|
306
|
+
MEDPLUM_MAX_JSON_SIZE: "1mb"
|
|
307
|
+
MEDPLUM_MAX_BATCH_SIZE: "50mb"
|
|
308
|
+
MEDPLUM_BOT_LAMBDA_ROLE_ARN: ""
|
|
309
|
+
MEDPLUM_BOT_LAMBDA_LAYER_NAME: "medplum-bot-layer"
|
|
310
|
+
MEDPLUM_VM_CONTEXT_BOTS_ENABLED: "true"
|
|
311
|
+
MEDPLUM_DEFAULT_BOT_RUNTIME_VERSION: "vmcontext"
|
|
312
|
+
MEDPLUM_ALLOWED_ORIGINS: "*"
|
|
313
|
+
MEDPLUM_INTROSPECTION_ENABLED: "true"
|
|
311
314
|
MEDPLUM_SHUTDOWN_TIMEOUT_MILLISECONDS: 30000
|
|
312
315
|
|
|
313
316
|
healthcheck:
|
|
314
317
|
test:
|
|
315
318
|
# We use Node's fetch for healthcheck because this image doesn't have a curl or wget installed
|
|
316
319
|
[
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
+
"CMD",
|
|
321
|
+
"node",
|
|
322
|
+
"-e",
|
|
320
323
|
'fetch("http://localhost:8103/healthcheck").then(r => r.json()).then(console.log).catch(() => { process.exit(1); })',
|
|
321
324
|
]
|
|
322
325
|
interval: 30s
|
|
@@ -331,9 +334,9 @@ services:
|
|
|
331
334
|
# medplum-server:
|
|
332
335
|
# condition: service_healthy
|
|
333
336
|
ports:
|
|
334
|
-
-
|
|
337
|
+
- "3103:3000"
|
|
335
338
|
healthcheck:
|
|
336
|
-
test: [
|
|
339
|
+
test: ["CMD", "curl", "-f", "http://localhost:3103"]
|
|
337
340
|
interval: 10s
|
|
338
341
|
timeout: 5s
|
|
339
342
|
retries: 5
|
|
@@ -362,4 +365,4 @@ volumes:
|
|
|
362
365
|
ollama-code: ~
|
|
363
366
|
ollama-root: ~
|
|
364
367
|
ollama-webui: ~
|
|
365
|
-
mcpx-config: ~
|
|
368
|
+
mcpx-config: ~
|
package/oclif.manifest.json
CHANGED
|
@@ -203,6 +203,13 @@
|
|
|
203
203
|
"multiple": false,
|
|
204
204
|
"type": "option"
|
|
205
205
|
},
|
|
206
|
+
"gateway": {
|
|
207
|
+
"char": "g",
|
|
208
|
+
"description": "Restart the gateway container",
|
|
209
|
+
"name": "gateway",
|
|
210
|
+
"allowNo": false,
|
|
211
|
+
"type": "boolean"
|
|
212
|
+
},
|
|
206
213
|
"name": {
|
|
207
214
|
"char": "n",
|
|
208
215
|
"description": "Name of the container to build",
|
|
@@ -211,6 +218,14 @@
|
|
|
211
218
|
"multiple": false,
|
|
212
219
|
"type": "option"
|
|
213
220
|
},
|
|
221
|
+
"restart": {
|
|
222
|
+
"char": "r",
|
|
223
|
+
"description": "Restart a specific container by name",
|
|
224
|
+
"name": "restart",
|
|
225
|
+
"hasDynamicHelp": false,
|
|
226
|
+
"multiple": false,
|
|
227
|
+
"type": "option"
|
|
228
|
+
},
|
|
214
229
|
"type": {
|
|
215
230
|
"char": "t",
|
|
216
231
|
"description": "Type of the service (elixir/conch)",
|
|
@@ -482,6 +497,173 @@
|
|
|
482
497
|
"mimic.js"
|
|
483
498
|
]
|
|
484
499
|
},
|
|
500
|
+
"synthea": {
|
|
501
|
+
"aliases": [],
|
|
502
|
+
"args": {
|
|
503
|
+
"subcommand": {
|
|
504
|
+
"description": "Subcommand to execute: install, generate, upload, delete, download",
|
|
505
|
+
"name": "subcommand",
|
|
506
|
+
"options": [
|
|
507
|
+
"install",
|
|
508
|
+
"generate",
|
|
509
|
+
"upload",
|
|
510
|
+
"delete",
|
|
511
|
+
"download"
|
|
512
|
+
],
|
|
513
|
+
"required": true
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"description": "Manage Synthea synthetic FHIR data generation",
|
|
517
|
+
"examples": [
|
|
518
|
+
"<%= config.bin %> <%= command.id %> install",
|
|
519
|
+
"<%= config.bin %> <%= command.id %> generate -p 10",
|
|
520
|
+
"<%= config.bin %> <%= command.id %> upload -e http://fhir:8005/baseR4",
|
|
521
|
+
"<%= config.bin %> <%= command.id %> delete",
|
|
522
|
+
"<%= config.bin %> <%= command.id %> download --covid19"
|
|
523
|
+
],
|
|
524
|
+
"flags": {
|
|
525
|
+
"age": {
|
|
526
|
+
"char": "a",
|
|
527
|
+
"description": "Generate patients with specific age range (e.g., \"0-18\" for pediatric)",
|
|
528
|
+
"name": "age",
|
|
529
|
+
"hasDynamicHelp": false,
|
|
530
|
+
"multiple": false,
|
|
531
|
+
"type": "option"
|
|
532
|
+
},
|
|
533
|
+
"city": {
|
|
534
|
+
"char": "c",
|
|
535
|
+
"description": "City for patient generation",
|
|
536
|
+
"name": "city",
|
|
537
|
+
"hasDynamicHelp": false,
|
|
538
|
+
"multiple": false,
|
|
539
|
+
"type": "option"
|
|
540
|
+
},
|
|
541
|
+
"covid19": {
|
|
542
|
+
"description": "Download COVID-19 dataset (1k patients)",
|
|
543
|
+
"name": "covid19",
|
|
544
|
+
"allowNo": false,
|
|
545
|
+
"type": "boolean"
|
|
546
|
+
},
|
|
547
|
+
"covid19_10k": {
|
|
548
|
+
"description": "Download COVID-19 dataset (10k patients)",
|
|
549
|
+
"name": "covid19_10k",
|
|
550
|
+
"allowNo": false,
|
|
551
|
+
"type": "boolean"
|
|
552
|
+
},
|
|
553
|
+
"covid19_csv": {
|
|
554
|
+
"description": "Download COVID-19 CSV dataset (1k patients)",
|
|
555
|
+
"name": "covid19_csv",
|
|
556
|
+
"allowNo": false,
|
|
557
|
+
"type": "boolean"
|
|
558
|
+
},
|
|
559
|
+
"covid19_csv_10k": {
|
|
560
|
+
"description": "Download COVID-19 CSV dataset (10k patients)",
|
|
561
|
+
"name": "covid19_csv_10k",
|
|
562
|
+
"allowNo": false,
|
|
563
|
+
"type": "boolean"
|
|
564
|
+
},
|
|
565
|
+
"dry-run": {
|
|
566
|
+
"description": "Show what changes would be made without actually making them",
|
|
567
|
+
"name": "dry-run",
|
|
568
|
+
"allowNo": false,
|
|
569
|
+
"type": "boolean"
|
|
570
|
+
},
|
|
571
|
+
"endpoint": {
|
|
572
|
+
"char": "e",
|
|
573
|
+
"description": "FHIR server endpoint URL",
|
|
574
|
+
"name": "endpoint",
|
|
575
|
+
"default": "http://fhir:8005/baseR4",
|
|
576
|
+
"hasDynamicHelp": false,
|
|
577
|
+
"multiple": false,
|
|
578
|
+
"type": "option"
|
|
579
|
+
},
|
|
580
|
+
"gender": {
|
|
581
|
+
"char": "g",
|
|
582
|
+
"description": "Generate patients of specific gender (M or F)",
|
|
583
|
+
"name": "gender",
|
|
584
|
+
"hasDynamicHelp": false,
|
|
585
|
+
"multiple": false,
|
|
586
|
+
"options": [
|
|
587
|
+
"M",
|
|
588
|
+
"F"
|
|
589
|
+
],
|
|
590
|
+
"type": "option"
|
|
591
|
+
},
|
|
592
|
+
"population": {
|
|
593
|
+
"char": "p",
|
|
594
|
+
"description": "Number of patients to generate",
|
|
595
|
+
"name": "population",
|
|
596
|
+
"default": 1,
|
|
597
|
+
"hasDynamicHelp": false,
|
|
598
|
+
"multiple": false,
|
|
599
|
+
"type": "option"
|
|
600
|
+
},
|
|
601
|
+
"seed": {
|
|
602
|
+
"char": "s",
|
|
603
|
+
"description": "Random seed for reproducible generation",
|
|
604
|
+
"name": "seed",
|
|
605
|
+
"hasDynamicHelp": false,
|
|
606
|
+
"multiple": false,
|
|
607
|
+
"type": "option"
|
|
608
|
+
},
|
|
609
|
+
"state": {
|
|
610
|
+
"description": "State for patient generation (default: Massachusetts)",
|
|
611
|
+
"name": "state",
|
|
612
|
+
"hasDynamicHelp": false,
|
|
613
|
+
"multiple": false,
|
|
614
|
+
"type": "option"
|
|
615
|
+
},
|
|
616
|
+
"synthea_sample_data_csv_latest": {
|
|
617
|
+
"description": "Download latest CSV sample data",
|
|
618
|
+
"name": "synthea_sample_data_csv_latest",
|
|
619
|
+
"allowNo": false,
|
|
620
|
+
"type": "boolean"
|
|
621
|
+
},
|
|
622
|
+
"synthea_sample_data_fhir_latest": {
|
|
623
|
+
"description": "Download latest FHIR sample data",
|
|
624
|
+
"name": "synthea_sample_data_fhir_latest",
|
|
625
|
+
"allowNo": false,
|
|
626
|
+
"type": "boolean"
|
|
627
|
+
},
|
|
628
|
+
"synthea_sample_data_fhir_stu3_latest": {
|
|
629
|
+
"description": "Download latest FHIR STU3 sample data",
|
|
630
|
+
"name": "synthea_sample_data_fhir_stu3_latest",
|
|
631
|
+
"allowNo": false,
|
|
632
|
+
"type": "boolean"
|
|
633
|
+
},
|
|
634
|
+
"token": {
|
|
635
|
+
"char": "t",
|
|
636
|
+
"description": "Bearer token for FHIR server authentication",
|
|
637
|
+
"name": "token",
|
|
638
|
+
"hasDynamicHelp": false,
|
|
639
|
+
"multiple": false,
|
|
640
|
+
"type": "option"
|
|
641
|
+
},
|
|
642
|
+
"workdir": {
|
|
643
|
+
"char": "w",
|
|
644
|
+
"description": "Working directory for Synthea files",
|
|
645
|
+
"name": "workdir",
|
|
646
|
+
"default": "/home/runner/dhti",
|
|
647
|
+
"hasDynamicHelp": false,
|
|
648
|
+
"multiple": false,
|
|
649
|
+
"type": "option"
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
"hasDynamicHelp": false,
|
|
653
|
+
"hiddenAliases": [],
|
|
654
|
+
"id": "synthea",
|
|
655
|
+
"pluginAlias": "dhti-cli",
|
|
656
|
+
"pluginName": "dhti-cli",
|
|
657
|
+
"pluginType": "core",
|
|
658
|
+
"strict": true,
|
|
659
|
+
"enableJsonFlag": false,
|
|
660
|
+
"isESM": true,
|
|
661
|
+
"relativePath": [
|
|
662
|
+
"dist",
|
|
663
|
+
"commands",
|
|
664
|
+
"synthea.js"
|
|
665
|
+
]
|
|
666
|
+
},
|
|
485
667
|
"synthetic": {
|
|
486
668
|
"aliases": [],
|
|
487
669
|
"args": {
|
|
@@ -574,5 +756,5 @@
|
|
|
574
756
|
]
|
|
575
757
|
}
|
|
576
758
|
},
|
|
577
|
-
"version": "0.
|
|
759
|
+
"version": "0.7.1"
|
|
578
760
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dhti-cli",
|
|
3
3
|
"description": "DHTI CLI",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"author": "Bell Eapen",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dhti-cli": "bin/run.js"
|
|
@@ -83,7 +83,8 @@
|
|
|
83
83
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
84
84
|
"posttest": "echo 'npm run lint'",
|
|
85
85
|
"prepack": "npx oclif manifest && npx oclif readme --readme-path notes/README.md",
|
|
86
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
86
|
+
"test": "mocha --forbid-only \"test/**/*.test.ts\" --exclude \"test/e2e/**/*.test.ts\"",
|
|
87
|
+
"test-e2e": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
87
88
|
"readme": "npx oclif readme --readme-path notes/README.md && git add notes/README.md",
|
|
88
89
|
"docs": "typedoc --exclude src/tool.ts --html docs src"
|
|
89
90
|
},
|