diff --git a/.vscode/settings.json b/.vscode/settings.json
index afd4af5..4a4dbb2 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -6,7 +6,7 @@
},
"objectscript.conn" :{
"ns": "FHIRSERVER",
- "active": true,
+ "active": false,
"username": "_SYSTEM",
"password": "SYS",
"docker-compose": {
diff --git a/iris.script b/iris.script
index b44dea6..7da4ebc 100755
--- a/iris.script
+++ b/iris.script
@@ -1,37 +1,10 @@
- zn "USER"
- zpm "load /home/irisowner/irisdev/ -v":1:1
- zpm "install fhir-portal"
- halt
- /// the below is not important anymore.
-
- zn "HSLIB"
- set namespace="FHIRSERVER"
-
- Set appKey = "/fhir/r4"
- Set strategyClass = "HS.FHIRServer.Storage.Json.InteractionsStrategy"
- set metadataPackages = $lb("hl7.fhir.r4.core@4.0.1")
- 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, metadataPackages)
-
- // Configure FHIR Service instance to accept unauthenticated requests
- 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/", "FHIRServer", appKey)
-
- do $System.OBJ.LoadDir("/opt/irisapp/src","ck",,1)
- //zpm "install fhir-portal"
- halt
+ zn "USER"
+ zpm "load /home/irisowner/irisdev/ -v"
+ // After FHIRSERVER creation
+ // need to add User.SQLvar.cls in FHIRSERVER
+ // in order to be able to run SQL queries
+ // with JSON functions
+ zn "FHIRSERVER"
+ do $System.OBJ.LoadDir("/home/irisowner/irisdev/src/User","ck",,1)
+ #; zpm "install fhir-portal"
+ halt
\ No newline at end of file
diff --git a/misc/sql/example.sql b/misc/sql/example.sql
index 8fc033c..2710862 100644
--- a/misc/sql/example.sql
+++ b/misc/sql/example.sql
@@ -1,39 +1,45 @@
-/* Select all Observation of Patient/1 */
+/* Select all Patients */
+SELECT
+*
+FROM HSFHIR_X0001_S.Patient;
+/* Select all Observation of Patient/4 */
+SELECT
+* FROM HSFHIR_X0001_S.Observation
+where patient = 'Patient/4';
+/* Select all Observation of Patient/4 with lonic code 718-7 (Hemoglobin [Mass/volume] in Blood)*/
SELECT
*
-FROM HSFHIR_I0001_S.Observation
-where patient = 'Patient/1' ;
+FROM HSFHIR_X0001_S.Observation
+where patient = 'Patient/4' and code [ '718-7';
-/* Select all Observation of Patient/1 with lonic code 718-7 (Hemoglobin [Mass/volume] in Blood)*/
+/* Get detail of the Observation/81 */
SELECT
*
-FROM HSFHIR_I0001_S.Observation
-where patient = 'Patient/1' and code [ '718-7';
+FROM HSFHIR_X0001_R.Rsrc where Key = 'Observation/81';
-/* Get detail of the observation/16 */
+/* Get valueQuantity of the Observation/81 */
SELECT
-*
-FROM HSFHIR_I0001_R.Rsrc where Key = 'Observation/16';
-
-/* Get valueQuantity of the observation/16 */
-SELECT
-ID, Key, ResourceString,
-GetJSON(ResourceString,'valueQuantity') as valueQuantity
-FROM HSFHIR_I0001_R.Rsrc where Key = 'Observation/16';
+ID
+, Key
+, ResourceString
+, GetJSON(ResourceString,'valueQuantity') as valueQuantity
+FROM HSFHIR_X0001_R.Rsrc where Key = 'Observation/81';
-/* Get value of valueQuantity of the observation/16 */
+/* Get value of valueQuantity of the Observation/81 */
SELECT
-ID, Key, ResourceString,
-GetJSON(ResourceString,'valueQuantity') as valueQuantity,
-GetProp(GetJSON(ResourceString,'valueQuantity'),'value') as value
-FROM HSFHIR_I0001_R.Rsrc where Key = 'Observation/16';
+ID
+, Key
+, ResourceString
+, GetJSON(ResourceString,'valueQuantity') as valueQuantity
+, GetProp(GetJSON(ResourceString,'valueQuantity'),'value') as value
+FROM HSFHIR_X0001_R.Rsrc where Key = 'Observation/81';
/* An complexe example */
SELECT
-ID, Key, ResourceString,
-GetJSON(ResourceString,'code') as code,
-GetJSON(GetJSON(ResourceString,'code'),'coding') as coding,
-GetAtJSON(GetJSON(GetJSON(ResourceString,'code'),'coding'),0) as coding1,
-GetJSON(GetAtJSON(GetJSON(GetJSON(ResourceString,'code'),'coding'),0),'display') as display,
-GetProp(GetJSON(GetAtJSON(GetJSON(GetJSON(ResourceString,'code'),'coding'),0),'display'),'display') as value
-FROM HSFHIR_I0001_R.Rsrc where Key = 'Observation/16';
+ID, Key, ResourceString
+, GetJSON(ResourceString,'code') as code
+, GetJSON(GetJSON(ResourceString,'code'),'coding') as coding
+, GetAtJSON(GetJSON(GetJSON(ResourceString,'code'),'coding'),0) as coding1
+, GetJSON(GetAtJSON(GetJSON(GetJSON(ResourceString,'code'),'coding'),0),'display') as display
+, GetProp(GetJSON(GetAtJSON(GetJSON(GetJSON(ResourceString,'code'),'coding'),0),'display'),'display') as value
+FROM HSFHIR_X0001_R.Rsrc where Key = 'Observation/81';
\ No newline at end of file
diff --git a/module.xml b/module.xml
index 3f57b01..41c765f 100755
--- a/module.xml
+++ b/module.xml
@@ -12,6 +12,7 @@
+