go to post Kevin Mayfield · 1 hr ago Thanks for posting this. Have amended as follows to make use of %Net.JSON.JWT Method GetJWT(KID, apiKey) As %String { #Dim sigJOSE As %DynamicObject #Dim encJOSE As %DynamicObject #Dim claims As %DynamicObject s tPrivateKey=$G(^JWT(KID,"private")) set iat = ##class(%OAuth2.Utils).TimeInSeconds($ztimestamp,0) set exp = ##class(%OAuth2.Utils).TimeInSeconds($ztimestamp,300) s uuid = ##class(%SYSTEM.Util).CreateGUID() set tClaims = { "sub": (apiKey), "iss": (apiKey), "jti": (uuid), "aud": "https://int.api.service.nhs.uk/oauth2/token", "exp": (exp) } Set JOSE = { "alg": "RS512", "kid": (KID), "typ": "JWT" } Set tX509=##class(%SYS.X509Credentials).%New() Do tX509.PrivateKeySet(tPrivateKey) Set tStatus=##class(%OAuth2.JWKS).AddX509("RS512",tX509,.tPrivate) Set arr=##class(%DynamicAbstractObject).%FromJSON(tPrivate) Set iter=arr.%GetIterator() Set newprivate={} ///Need to set KID at same index with other keys so re-creating new While iter.%GetNext(.key,.value) { Set newprivate.kty=value.keys.kty Set newprivate.n=value.keys.n Set newprivate.e=value.keys.e Set newprivate.d=value.keys.d Set newprivate.p=value.keys.p Set newprivate.q=value.keys.q Set newprivate.dp=value.keys.dp Set newprivate.dq=value.keys.dq Set newprivate.qi=value.keys.qi Set newprivate.alg=value.keys.alg Set newprivate.kid=KID } Set JWKSPrivate={"keys":[]} Do JWKSPrivate.keys.%Push(newprivate) s tSC=##class(%Net.JSON.JWT).Create(.JOSE,,tClaims,JWKSPrivate,,.JWT) if $$$ISERR(tSC) { q tSC } q JWT }
go to post Kevin Mayfield · Nov 13 I think what I need to do is write some code to import my IG, find the relevant parts and then update the FHIR Repository.
go to post Kevin Mayfield · Nov 13 It is the number of IG's I have which is the issue. Only my NW Genomic IG has Codesystems, ValueSets and for test - examples, I wish to load. I'm not interested in FHIR profiles.
go to post Kevin Mayfield · Feb 26 Have been away from healthshare for a few years, so I'll look into what you said and then probably raise a wrc.many thanks
go to post Kevin Mayfield · Feb 26 Many thanks. I think I might be able to do a work around along those lines. 1. replace the base64 entries with a placeholder and save the base64 entries as new QuickStreams. 2. do the DTL transforms3. put back the base64 entries just before I call out to the FHIR operations.
go to post Kevin Mayfield · Feb 21 Any ways around this? It will be easier for the other developers to keep a like for like payload to OML_021 and ORU_R01 (obvious answer might be use HL7 v2 instead).But I think I can answer this via attachments in via another API (POST /Binary)I'll probably still have this need for outgoing payloads to a national system but handcrafting that might work.
go to post Kevin Mayfield · Feb 20 Error ERROR <Ens>ErrBPTerminated: Terminating BP ProcessMessage # due to error: ERROR #5002: ObjectScript error: <MAXSTRING>%GetNext+12^%Iterator.Object.1> ERROR #5002: ObjectScript error: <MAXSTRING>%GetNext+12^%Iterator.Object.1 Stack ^%GetNext+12^%Iterator.Object.1^1 e^FromJSONHelper+17^HS.FHIR.DTL.Util.JSON.Adapter.1^1 e^FromJSONHelper+98^HS.FHIR.DTL.Util.JSON.Adapter.1^1 e^FromJSONHelper+80^HS.FHIR.DTL.Util.JSON.Adapter.1^1 e^FromJSON+9^HS.FHIR.DTL.Util.JSON.Adapter.1^1 e^OnRequest+5^RIE.GLH.FHIR.Process.ProcessMessage.1^1 e^MessageHeaderHandler+19^RIE.GLH.FHIR.Process.ProcessMessage.1^1 e^MessageHeaderHandler+110^Ens.Actor.1^1
go to post Kevin Mayfield · Feb 20 The sample Binary resource I'm using is 7,463 Khttps://interop-nwengland.github.io/LTW-Genomics/Binary-d6eeedd1-92d3-45...