This wiki has undergone a migration to Confluence found Here
Difference between revisions of "201709 Consumer Centered Data Exchange Implementation Notes for test.fhir.org"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
<Consent xmlns="http://hl7.org/fhir"> | <Consent xmlns="http://hl7.org/fhir"> | ||
+ | <id value="1"/> | ||
<status value="active"/> | <status value="active"/> | ||
<patient> | <patient> | ||
Line 29: | Line 30: | ||
<code value="User/*"/> | <code value="User/*"/> | ||
</class> | </class> | ||
− | </except> | + | </except> |
</Consent> | </Consent> | ||
Line 37: | Line 38: | ||
{ | { | ||
− | + | "resourceType" : "Parameters", | |
− | + | "parameter" : [{ | |
− | + | "name" : "duration", | |
− | + | "valueDuration" : { | |
− | + | "value" : "3", | |
− | + | "system" : "http://unitsofmeasure.org", | |
− | + | "code" : "mo" | |
− | + | } | |
− | + | }, { | |
− | + | "name" : "jwt", | |
− | + | "valueString" : "{your JWT}" | |
− | + | } | |
− | + | ] | |
} | } |
Revision as of 13:18, 2 August 2017
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"> <id value="1"/> <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", "parameter" : [{ "name" : "duration", "valueDuration" : { "value" : "3", "system" : "http://unitsofmeasure.org", "code" : "mo" } }, { "name" : "jwt", "valueString" : "{your JWT}" } ] }