-
Notifications
You must be signed in to change notification settings - Fork 5
/
iris.script
executable file
·39 lines (30 loc) · 1.5 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
36
37
38
39
zn "%SYS"
Do ##class(Security.Users).UnExpireUserPasswords("*")
set props("AutheEnabled") = 64
set props("NameSpace") = "FHIRSERVER"
set props("IsNameSpaceDefault") = 0
set props("DispatchClass") = "diashenrique.fhir.portal.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)
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
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)
do $System.OBJ.LoadDir("/opt/irisapp/src","ck",,1)
zw ##class(HS.FHIRServer.Tools.DataLoader).SubmitResourceFiles("/opt/irisapp/fhirdata/", namespace, appKey)
zpm "load /opt/irisapp/"
halt