generated from intersystems-community/iris-fhir-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
iris.script
executable file
·35 lines (28 loc) · 1.28 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
34
35
zn "%SYS"
Do ##class(Security.Users).UnExpireUserPasswords("*")
set props("AutheEnabled") = 64
set props("NameSpace") = "FHIRSERVER"
set props("IsNameSpaceDefault") = 0
set props("DispatchClass") = "User.Dispatch"
set props("MatchRoles")=":%All"
zw ##class(Security.Applications).Create("/fhir/api" , .props)
zn "HSLIB"
set namespace="FHIRSERVER"
Set appKey = "/fhir/r4"
Set strategyClass = "HS.FHIRServer.Storage.Json.InteractionsStrategy"
Set metadataConfigKey = "HL7v40"
set importdir="/opt/irisapp/src"
//Install a Foundation namespace and change to it
Do ##class(HS.HC.Util.Installer).InstallFoundation(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
Do ##class(HS.FHIRServer.Installer).InstallInstance(appKey, strategyClass, metadataConfigKey,"",0)
set strategy = ##class(HS.FHIRServer.API.InteractionsStrategy).GetStrategyForEndpoint(appKey)
set config = strategy.GetServiceConfigData()
set config.DebugMode = 4
do strategy.SaveServiceConfigData(config)
zw ##class(HS.FHIRServer.Tools.DataLoader).SubmitResourceFiles("/opt/irisapp/fhirdata/", namespace, appKey)
do $System.OBJ.LoadDir("/opt/irisapp/src","ck",,1)
halt