<?xml version="1.0" encoding="UTF-8"?>

<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="-s-persist-login"/>
  <text>
    <status value="extensions"/><div xmlns="http://www.w3.org/1999/xhtml"><h2>persist-login</h2><p>OPERATION: persist-login</p><p>The official URL for this operation definition is: </p><pre>https://organization.devtest.systematic-ehealth.com/fhir/OperationDefinition/-s-persist-login</pre><div><p>This operation persists login information into CareTeams and PractitionerRoles
The following elements of each careteam are mandatory:</p>
<ul>
<li>id: Reference based on the careteam from the saml security token</li>
<li>status: any</li>
<li>name: any</li>
<li>reasonCode: any</li>
<li>participant: 1 for each careteam-role in the saml security token
-- role: from the saml security token
-- member: reference to the practitioner
-- onBehalfOf: reference to organization (cannot be set currently because of a bug in hapi)</li>
</ul>
<p>Persist-login will find each careteam, and update it with any new participants and roles from the input bundle.
The input careteam resources are are used as a container for the participant list. The rest of the fields are not used.
The following elements of each PractitionerRole are mandatory:</p>
<ul>
<li>practitioner</li>
<li>organization</li>
<li>code: roles from the saml security token (CareteamParticipantRole valueset)</li>
</ul>
<p>Persist-login will search for practitionerRoles for each combination of (practitioner, organization) and create it if it doesn't already exists.</p>
</div><p>URL: [base]/$persist-login</p><p>Parameters</p><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>careTeam</td><td>0..*</td><td><a href="http://hl7.org/fhir/R4/careteam.html">CareTeam</a></td><td/><td/></tr><tr><td>IN</td><td>practitionerRole</td><td>0..*</td><td><a href="http://hl7.org/fhir/R4/practitionerrole.html">PractitionerRole</a></td><td/><td/></tr></table></div>
  </text>
  <url value="https://organization.devtest.systematic-ehealth.com/fhir/OperationDefinition/-s-persist-login"/>
  <version value="2021.3.0"/>
  <name value="persist-login"/>
  <title value="Persist login"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2021-11-25T09:32:14+00:00"/>
  <publisher value="Systematic | Trifork"/>
  <contact>
    <name value="Systematic | Trifork"/>
    <telecom>
      <system value="url"/>
      <value value="http://ehealth.sundhed.dk"/>
    </telecom>
  </contact>
  <description value="This operation persists login information into CareTeams and PractitionerRoles&#xA;The following elements of each careteam are mandatory:&#xA;- id: Reference based on the careteam from the saml security token&#xA;- status: any&#xA;- name: any&#xA;- reasonCode: any&#xA;- participant: 1 for each careteam-role in the saml security token&#xA;-- role: from the saml security token&#xA;-- member: reference to the practitioner&#xA;-- onBehalfOf: reference to organization (cannot be set currently because of a bug in hapi)&#xA;&#xA;Persist-login will find each careteam, and update it with any new participants and roles from the input bundle.&#xA;The input careteam resources are are used as a container for the participant list. The rest of the fields are not used.&#xA;The following elements of each PractitionerRole are mandatory:&#xA;- practitioner&#xA;- organization&#xA;- code: roles from the saml security token (CareteamParticipantRole valueset)&#xA;&#xA;Persist-login will search for practitionerRoles for each combination of (practitioner, organization) and create it if it doesn&#39;t already exists."/>
  <affectsState value="true"/>
  <code value="persist-login"/>
  <system value="true"/>
  <type value="false"/>
  <instance value="false"/>
  <parameter>
    <name value="careTeam"/>
    <use value="in"/>
    <min value="0"/>
    <max value="*"/>
    <type value="CareTeam"/>
  </parameter>
  <parameter>
    <name value="practitionerRole"/>
    <use value="in"/>
    <min value="0"/>
    <max value="*"/>
    <type value="PractitionerRole"/>
  </parameter>
</OperationDefinition>