Skip to content

Automatic sending

Documents can be automatically sended by Lifen at 7pm. To do this, you can follow the classic flow referred in Send a Medical Document. In order to specify to our connectors that the sending need to be sent automatically, you need to add the following extensions on your CommunicationRequest resource :

 {
    "url": "http://lifen.fr/fhir/StructureDefinition/LifenExtensionCommunicationRequestSendingStatus",
    "valueCode": "READY_TO_SEND"
  },
  {
    "url": "http://lifen.fr/fhir/StructureDefinition/CommunicationRequest/Extension/AutomaticSending",
    "valueCode": "true"
  }

Example :

{
  "resourceType": "CommunicationRequest",
  "tag": [
      {
        "system": "http://lifen.fr/fhir/tag/processing/mode",
        "code": "IMMEDIATE_MODE",
        "display": "request should be treated in immediate mode"
      },
      {
        "system": "http://lifen.fr/fhir/tag/processing/ia",
        "code": "NEW_PROCESSING_REQUIRED"
      }
  ],
  "status": "draft",
  "priority": "routine",
    "extension": [
            {
            "url": "http://lifen.fr/fhir/StructureDefinition/LifenExtensionCommunicationRequestSendingStatus",
            "valueCode": "READY_TO_SEND"
          },
          {
            "url": "http://lifen.fr/fhir/StructureDefinition/CommunicationRequest/Extension/AutomaticSending",
            "valueCode": "true"
          }
      ],
  "category": [
    {
      "coding": [
        {
          "system": "http://lifen.fr/fhir/ValueSet/communication-category",
          "code": "MEDICAL_REPORT"
        }
      ]
    }
  ],
  "payload": [
    {
      "contentReference": {
        "reference": "DocumentReference/XXXXXX"
      }
    }
  ],
  "authoredOn": "2020-09-02T14:54:09+00:00",
  "sender": {
    "reference": "Practitioner/XXXXXX"
  },
  "requester": {
    "agent": {
      "reference": "Organization/XXXXXX"
    }

}