Hi Guillaume,

I've got the HEALTHTOOLKIT production running Guillaume - and its working great (thanks)
Could you please give me some advice on how to get the production to transform SDA to DSTU2?

I found this code:

/// FHIRMetadataSets returns a list where each display row is a FHIR metadata set Key,
/// plus " / ", plus FHIR metadata set Description.
ClassMethod FHIRMetadataSets(Output pCaption As %String, Output pTopResults, Output pResults, ByRef pParms As %String, pSearchKey As %String = "") As %Status
{
    Set tSC = $$$OK
    
    // This method returns the core FHIR package for each version that can be transformed to/from SDA.
    Set pResults(1) = "HL7v40 / FHIR R4 Core Specification"
    Set pResults(2) = "HL7v30 / FHIR STU3 Core Specification"
    
    Quit tSC
}

But, I have no idea what the FHIR package is for DSTU2 - and whether or not this is the class that needs changing?

Many Thanks,
-- Paul.

Hi Guillaume,

I'm really interested in getting this working
I managed to install your production inside docker

However, I'm getting this error:

{
  "errors": [
    {
      "code": 5002,
      "domain": "%ObjectErrors",
      "error": "ERROR #5002: ObjectScript error: <PROPERTY DOES NOT EXIST>zhl7+10^HealthToolKit.REST.HL7.1 *QuickStreamId,Ens.StreamContainer",
      "id": "ObjectScriptError",
      "params": [
        "<PROPERTY DOES NOT EXIST>zhl7+10^HealthToolKit.REST.HL7.1 *QuickStreamId,Ens.StreamContainer"
      ]
    }
  ],
  "summary": "ERROR #5002: ObjectScript error: <PROPERTY DOES NOT EXIST>zhl7+10^HealthToolKit.REST.HL7.1 *QuickStreamId,Ens.StreamContainer"
}

I'm posting your swagger example into your IRIS production (REST interface):

http://192.168.2.11:32783/api/hl7/fhir

MSH|^~&||HEALTHSHARE|INTERSYSTEMS||201003090900||ADT^A01||P|2.5.1|
EVN|A01|201003090900|
PID|1||200000001^^^HEALTHSHARE^MR||CARTER^JANE||19381001|F||W|1 Memorial Drive^^CAMBRIDGE^MA^02142||617-225-3133|||M||||
PV1|1|O|||||PALR^FARRELL^SAM^^^^MD^^HEALTHSHARE|||HEALTHSHARE|||||||PALR^FARRELL^SAM^^^^MD^^HEALTHSHARE||HEALTHSHARE00003_201003091236|||||||||||||||||||||||||201003090900|201003090900
AL1|1||PENICILLIN^PENICILLIN|MODERATE|RASH|20030212
DG1|1|9|401.1^Hypertension^I9||20100309|F||||||||28||FARRELL^FARRELL^SAM^^^^MD^^HEALTHSHARE|||
DG1|2|9|250.4^Type 2 Diabetes Mellitus with renal comp^I9||20100309|F||||||||28||FARRELL^FARRELL^SAM^^^^MD^^HEALTHSHARE|||
IN1|1|PHP||ACME HEALTH PLAN|PO Box 22222^^Boston^MA^102142||(617)641-3500|||||||||CARTER^JANE|S|||||||||||||||||||XXXX00211|

Also, noticed these errors during installation:

Loading file /opt/irisapp/src/HealthToolKit/HS/FHIR/DTL/SDA3/vR4/LabOrder/DiagnosticReport.cls as udl
ERROR #16008: Unable to load text for 'HS.FHIR.DTL.SDA3.vR4.LabOrder.DiagnosticReport.cls'
  > ERROR #16000: Line:0 Offset:0 Error 'ERROR #5883: Item 'HS.FHIR.DTL.SDA3.vR4.LabOrder.DiagnosticReport' is mapped from a database that you do not have write permission on.'
Loading file /opt/irisapp/src/HealthToolKit/HS/FHIR/DTL/SDA3/vR4/OtherOrder/DiagnosticReport.cls as udl
ERROR #16008: Unable to load text for 'HS.FHIR.DTL.SDA3.vR4.OtherOrder.DiagnosticReport.cls'
  > ERROR #16000: Line:0 Offset:0 Error 'ERROR #5883: Item 'HS.FHIR.DTL.SDA3.vR4.OtherOrder.DiagnosticReport' is mapped from a database that you do not have write permission on.'
Loading file /opt/irisapp/src/HealthToolKit/HS/FHIR/DTL/SDA3/vR4/RadOrder/DiagnosticReport.cls as udl
ERROR #16008: Unable to load text for 'HS.FHIR.DTL.SDA3.vR4.RadOrder.DiagnosticReport.cls'
  > ERROR #16000: Line:0 Offset:0 Error 'ERROR #5883: Item 'HS.FHIR.DTL.SDA3.vR4.RadOrder.DiagnosticReport' is mapped from a database that you do not have write permission on.'
Loading file /opt/irisapp/src/HealthToolKit/HS/FHIR/DTL/Util/HC/SDA3/HC/FHIR/SDA3/Process.cls as udl
ERROR #16008: Unable to load text for 'HS.FHIR.DTL.Util.HC.FHIR.SDA3.Process.cls'
  > ERROR #16000: Line:0 Offset:0 Error 'ERROR #5883: Item 'HS.FHIR.DTL.Util.HC.FHIR.SDA3.Process' is mapped from a database that you do not have write permission on.'
Loading file /opt/irisapp/src/HealthToolKit/HS/FHIR/DTL/SDA3/vR4/Vaccination/Immunization.cls as udl
ERROR #16008: Unable to load text for 'HS.FHIR.DTL.SDA3.vR4.Vaccination.Immunization.cls'
  > ERROR #16000: Line:0 Offset:0 Error 'ERROR #5883: Item 'HS.FHIR.DTL.SDA3.vR4.Vaccination.Immunization' is mapped from a database that you do not have write permission on.'
Loading file /opt/irisapp/src/HealthToolKit/HS/FHIR/DTL/Util/HC/SDA3/HC/SDA3/FHIR/Process.cls as udl
ERROR #16008: Unable to load text for 'HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process.cls'
  > ERROR #16000: Line:0 Offset:0 Error 'ERROR #5883: Item 'HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process' is mapped from a database that you do not have write permission on.'

I've also attached the entire output that's generated suring the install

How do I access the management portal (what port is it listening on?)
If I wanted to take a look at the code in Studio - what's the _system password?
What version of IRIS do I need to get this running locally on my laptop?

All really good stuff!

Many Thanks,
-- Paul.

Its crashing in both these version.  Many Thanks.  Paul.

Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.1 (Build 801U) Wed Dec 6 2017 09:23:15 EST [HealthShare Modules:Core:16.0.7253 + Linkage Engine:16.0.7253 + Patient Index:16.0.7253 + Provider Directory:15.0.7253 + Clinical Viewer:16.0.7253 + Active Analytics:16.0.7253]

Cache for Windows (x86-64) 2017.2.1 (Build 801U) Wed Dec 6 2017 09:07:51 EST [HealthShare Modules:Core:16.0.7241 + Linkage Engine:16.0.7241 + Patient Index:16.0.7241 + Provider Directory:15.0.7241 + Clinical Viewer:16.0.7241 + Active Analytics:16.0.7241]

Thanks very much Robert - that's got me much further!

Script-1 (JWTToObject) creates an object from a valid JWT.
Script-2 (ObjectToJWT) contains Robert's fixes to localpub and localpriv.

Script-1:
ERROR #8897: No public key found for alg: RS256 (kid:)

Script-2:
ERROR #8896: No private key found for alg: RS256

So it seems to me as though its the node code that produces the private and public portions of the RSA key that's used in the localpub and localprov variables that's at fault?

Script-1.

s localpriv="{""keys"":[{""kty"":""RSA"",""use"":""sig"",""n"":""ALaMFdNTmzUu1wnMGNmsIkBMJUS4EdMAe2HXpQ-k4aDk94znJuCi9OJnJQU4lm4nqgEWdzMVVQMlqZ3ihlXx5vpFzmb4m4EkAcmK0ULVCLL9QRqvuwbOjeXW8pJlcH-EAQKnkMzF6GbtmmDubK46bx2GaQh8rLYAfLvoIwXfyrXIday2VdRNz_3yGzLoxr5QxcFml46479mY3xXwmTSMvVNHEN4F1xPnsLQoNPH3guA104dm8S-f2z_vczHBdSrgiJibesdOP3ugYlxJvDDT3WSf3WW7cjAn8M3vZmCNTPWe6JEewsc6cDBiFWn9UUomulFUV_uucTsV_NXMd8nQ_Hs"",""e"":""AQAB"",""d"":""WSQxKEAkg6T651LeM7VmCGXmsRb9xT7wAUhv1yLZ91q4M_tQtdN9p-1cW59VfjcqQlu5G53oJKBIosvSc7er5j0eXJQ8Q6TUppl-NJeZJuaa2zBDMUC-dCUx0SFt_Sb141j2Ubi3E0Ql5f2n3rC0QAO52KYhJMM6Jfxm1eCBuaB0STT9LE-APh0K_wDuyEOFJD52pVOKuUy_v_vDaK4ssfcz-Yq_V1R9H1reu2bHdgMKEYZhkM4d4faVa52pQJvu0M-sm892RYNh34szLLDaKHPmgZgTdtuppZmo0QYuUeFS2fy461GGfQh92dSIgl7H8Gyz6RC07PPwUTaIphLgcQ"",""p"":""APX_qgTRt5bzWb_Xch0hyMgHbMqjfKfavX6AbUv1-Yabn9_Q9XyFx3h7ymDAI2ilTmwjKpdi80izifuKFPV0z6EnLIbebdVGb3MeYBBRmBlx3pfSnx7RI9OAscRm_2xV0j21pP5mknj86VR4MHwmF4BeU-6U-TopwGYldnvyNuVD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6JEewsc6cDBiFWn9UUomulFUV_uucTsV_NXMd8nQ_Hs"",""e"":""AQAB""}]}"
 
S JWT="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlptTHktQndhUmFjVlBkdDF5Q0syWno1dWVpayJ9.eyJzdWIiOiJKV1RDbGllbnRDcmVkZW50aWFscyIsImp0aSI6IjNhNDk3YTk2LWNhNDgtNDVkNy1iMzRhLTMxZjVmOTNjODNmMyIsImlzcyI6IkpXVENsaWVudENyZWRlbnRpYWxzIiwiYXVkIjoiaHR0cHM6Ly9maGlyLmNhcmVldm9sdXRpb24uY29tL01hc3Rlci5BZGFwdGVyMS5XZWJDbGllbnQvaWRlbnRpdHlzZXJ2ZXIvY29ubmVjdC90b2tlbiIsImV4cCI6MTUxNjIyODcyMywibmJmIjoxNTE2MjIzMzIzfQ.hHnIXYvYdZ2p-WLuFQfeIQ9xfQqcdqzUh1_JT7s6T6yIpEE3JyBeBDKtLFKulFOoGU9cPiCrYGz0iwkmR2b3I_Q9KRSs1JvPjsZCeWQ9ocpKxK0WECqw4sYuvVVFxjer39BRp0YQLLcYgwST86KW_pPeV_ssLGX9G4iJNdy5JFsFO4w19HH_1MM8Aa_FUyimtawuMky9mfwtAzJ4GiP14FsfrafeRIAJsw693z_l9KhCNC-v8vJ_b4_iDREa3c6dCz5GEtANiv9phfzPUL2x7CHMHu-lENBvVNDtl0-Gt0HCD6RFf7NJeH7oYeKR2NpcCT93gCQhX32EMLr5eFJeBw"
 
K JOSE SET ST=##class(%OAuth2.JWT).JWTToObject(JWT,localpriv,localpub,.JOSE,.Body)
 
d $system.OBJ.DisplayError(ST)
 
ERROR #8897: No public key found for alg: RS256 (kid:).

Script-2.

KILL JOSE
S JOSE("sigalg")="RS256"

S A=+$H-47117 // (47117 = 01/01/1970)
// (60*60)*24 (total number of secs in a day)
S B=A*86400
S C=$P($HOROLOG,",",2)
S EPOCH=B+C
// add 4 minutes
S D=60*4
S EPOCH=EPOCH+D

set body=##class(%DynamicObject).%New()
do body.%Set("sub","JWTClientCredentials","string")
do body.%Set("jti","3a497a96-ca48-45d7-b34a-31f5f93c83f3","string")
do body.%Set("iss","JWTClientCredentials","string")
do body.%Set("aud","https://fhir.careevolution.com/Master.Adapter1.WebClient/identityserver/...","string")
do body.%Set("exp",EPOCH,"string")
do body.%Set("nbf",EPOCH,"string")

s localpriv="{""keys"":[{""kty"":""RSA"",""use"":""sig"",""n"":""ALaMFdNTmzUu1wnMGNmsIkBMJUS4EdMAe2HXpQ-k4aDk94znJuCi9OJnJQU4lm4nqgEWdzMVVQMlqZ3ihlXx5vpFzmb4m4EkAcmK0ULVCLL9QRqvuwbOjeXW8pJlcH-EAQKnkMzF6GbtmmDubK46bx2GaQh8rLYAfLvoIwXfyrXIday2VdRNz_3yGzLoxr5QxcFml46479mY3xXwmTSMvVNHEN4F1xPnsLQoNPH3guA104dm8S-f2z_vczHBdSrgiJibesdOP3ugYlxJvDDT3WSf3WW7cjAn8M3vZmCNTPWe6JEewsc6cDBiFWn9UUomulFUV_uucTsV_NXMd8nQ_Hs"",""e"":""AQAB"",""d"":""WSQxKEAkg6T651LeM7VmCGXmsRb9xT7wAUhv1yLZ91q4M_tQtdN9p-1cW59VfjcqQlu5G53oJKBIosvSc7er5j0eXJQ8Q6TUppl-NJeZJuaa2zBDMUC-dCUx0SFt_Sb141j2Ubi3E0Ql5f2n3rC0QAO52KYhJMM6Jfxm1eCBuaB0STT9LE-APh0K_wDuyEOFJD52pVOKuUy_v_vDaK4ssfcz-Yq_V1R9H1reu2bHdgMKEYZhkM4d4faVa52pQJvu0M-sm892RYNh34szLLDaKHPmgZgTdtuppZmo0QYuUeFS2fy461GGfQh92dSIgl7H8Gyz6RC07PPwUTaIphLgcQ"",""p"":""APX_qgTRt5bzWb_Xch0hyMgHbMqjfKfavX6AbUv1-Yabn9_Q9XyFx3h7ymDAI2ilTmwjKpdi80izifuKFPV0z6EnLIbebdVGb3MeYBBRmBlx3pfSnx7RI9OAscRm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giJibesdOP3ugYlxJvDDT3WSf3WW7cjAn8M3vZmCNTPWe6JEewsc6cDBiFWn9UUomulFUV_uucTsV_NXMd8nQ_Hs"",""e"":""AQAB""}]}"


SET ST=##class(%OAuth2.JWT).ObjectToJWT(.JOSE,.body,localpriv,localpub,.JWT)

d $system.OBJ.DisplayError(ST)

ERROR #8896: No private key found for alg: RS256.