{
  "resourceType": "OperationDefinition",
  "id": "clear-context",
  "url": "http://fhir.infoway-inforoute.ca/io/HALO/OperationDefinition/clear-context",
  "text": {
    "status": "additional",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>The $clear-context operation allows launching applications, such as Point of Care (PoC) systems, to remove clinical contexts previously established during a SMART on FHIR Accelerator (SoFA) launch. This operation ensures data hygiene and supports compliance with jurisdictional data retention policies by deleting context-related data that is no longer needed.</p><p>The operation requires the launchID generated by a prior $set-context invocation to identify and remove associated FHIR resources stored in the SoFA for the specified session. These resources may include those created by the launching application through the $set-context operation or by the SMART application after the launch.</p><p>The outcome of the operation is returned in an OperationOutcome resource, which provides details on the success or failure of the context-clearing process.</p></div>"
  },
  "parameter": [
    {
      "name": "launchID",
      "use": "in",
      "min": 1,
      "max": "1",
      "type": "string",
      "documentation": "The launchID is a required parameter. It is returned by the $set-context operation when the context was first established."
    },
    {
      "name": "outcome",
      "use": "out",
      "min": 1,
      "max": "*",
      "type": "OperationOutcome",
      "documentation": "An OperationOutcome resource detailing the outcome (e.g., success, failure) of the operation."
    }
  ],
  "version": "1.0.0",
  "name": "ClearContext",
  "title": "Clear Context",
  "status": "active",
  "kind": "operation",
  "experimental": false,
  "description": "Clears the context, specified by the provided launchID, along with any resources that have been created for the current session within the SoFA.",
  "code": "clear-context",
  "system": true,
  "type": false,
  "instance": false
}