generated from intersystems-community/iris-fhir-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iris.script
executable file
·33 lines (27 loc) · 1.41 KB
/
iris.script
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
set ns="FHIRSERVER"
zn "HSLIB"
set namespace=ns
Set appKey = "/fhir/r4"
Set strategyClass = "HS.FHIRServer.Storage.Json.InteractionsStrategy"
set metadataPackages = $lb("[email protected]")
Set metadataConfigKey = "HL7v40"
//Install a Foundation namespace and change to it
// Do ##class(HS.HC.Util.Installer).InstallFoundation(namespace)
Do ##class(HS.Util.Installer.Foundation).Install(namespace)
zn namespace
// Install elements that are required for a FHIR-enabled namespace
do ##class(HS.FHIRServer.Installer).InstallNamespace()
// Install an instance of a FHIR Service into the current namespace
if '##class(HS.FHIRServer.ServiceAdmin).EndpointExists(appKey) { do ##class(HS.FHIRServer.Installer).InstallInstance(appKey, strategyClass, metadataPackages) }
set strategy = ##class(HS.FHIRServer.API.InteractionsStrategy).GetStrategyForEndpoint(appKey)
set config = strategy.GetServiceConfigData()
set config.DebugMode = 4
do strategy.SaveServiceConfigData(config)
//set dir=$System.Util.ManagerDirectory()_"test-data-fhir"
set dir="/home/irisowner/irisdev/data/fhir"
write !," ====== Load test data in "_ns_" from "_dir
set st=##class(HS.FHIRServer.Tools.DataLoader).SubmitResourceFiles(dir, "FHIRServer", appKey)
if 'st write $System.Status.GetErrorText(st)
zn "USER"
zpm "load /home/irisowner/irisdev/ -v":1:1
halt