generated from intersystems-community/iris-fhir-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
iris.script
executable file
·55 lines (39 loc) · 1.91 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
zn "%SYS"
Do ##class(Security.Users).UnExpireUserPasswords("*")
// For front end api disable license
// HS.HC.FHIRSQL.REST.FrontEndAPI.Map
set db="/usr/irissys/mgr/irislib"
set tDB = ##class(SYS.Database).%OpenId(db)
set tDB.ReadOnly = 0
zw tDB.%Save()
set db="/usr/irissys/mgr/hslib"
set tDB = ##class(SYS.Database).%OpenId(db)
set tDB.ReadOnly = 0
zw tDB.%Save()
zn "HSLIB"
// Enable FHIR SQL Builder
Do ##class(HS.HC.FHIRSQL.Utils.Setup).CreateWebApps("HSSYS",1)
Do ##class(HS.HC.FHIRSQL.Utils.Setup).DefineDocDBs("HSSYS")
set namespace="FHIRSERVER"
Set appKey = "/fhir/r4"
Set strategyClass = "HS.FHIRServer.Storage.Json.InteractionsStrategy"
Set metadataConfigKey = "HL7v40"
set importdir="/irisdev/app/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
Do $classMethod("HS.HC.FHIRSQL.Server.FHIRRepository","SetupInteractions")
// 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("/irisdev/app/fhirdata/", namespace, appKey)
do $System.OBJ.LoadDir("/irisdev/app/src","ck",,1)
do $SYSTEM.SQL.Execute("LOAD DATA FROM FILE '/irisdev/app/misc/Location.csv' INTO Demo_External.Location")
zw ##class(Demo.AtScale.DateFact).Populate()
halt