This wiki has undergone a migration to Confluence found Here

201709 Consumer Centered Data Exchange Implementation Notes for test.fhir.org

From HL7Wiki
Revision as of 09:19, 2 August 2017 by GrahameGrieve (talk | contribs)
Jump to navigation Jump to search

JWT Cert

You can get the JWT cert from [[1]] which directs you to here: [[2]]

The JWT is:

(todo - will change certs soon)

Consent

Use this consent resource as the base for authorization (post it to the server):

<Consent xmlns="http://hl7.org/fhir"> 
 <status value="active"/>
 <patient>
   <reference value="Patient/example"/>
 </patient>
 <policyRule value="http://hl7.org/fhir/ConsentDefinition/simple-oauth"/>  
 <except>  
   <type value="permit"/>
   <action>
     <coding>
       <system value="http://hl7.org/fhir/consentaction"/>
       
     </coding>
   </action>
   <class>
     <system value="http://smarthealthit.org/fhir/scopes"/>
      
   </class>
 </except>
</Consent>

Authorization

This is what you post to the server as a body to the $authorize routine (this time in json):

{
  "resourceType" : "Parameters",
  "parameters" : [{
     "name" : "duration",
     "valueDuration" : {
       "value" : "3",
       "system" : "http://unitsofmeasure.org",
       "code" : "mo"
     }
   }, {
     "name" : "token",
     "valueString" : "{you JWT here}"
   }  
  ]
}