Generate invitation tokens

https://www.hl7.org/fhir/STU3/operations.html

https://www.hl7.org/fhir/STU3/operationdefinition.html

Overview

This operation allows:
  • a System user to generate invitation tokens for 1 or many patients identified by national identifier.

Endpoints

InteractionHTTPURLSupported ParametersPermitted User TypesDescription
operationPOST/Organization/$generate-invitation-tokens

mandatory:

  • patientIdentifier

Reference 'in' mappings below.
  • System User

Generates invitation tokens for the patient identified by patientIdentifier (e.g. NHS).


Multiple patient identifiers can be supplied as the input to the operation.  This allows the calling system to work in batches.


The OAuth 2.0 system user access token will be provided along with a header parameter in the request that specifies the organisation that wants to generate tokens. The parameter will be the UUID of the PKB organisation.




Mappings

FHIRPKBNotes
OperationDefinition.url"http://fhir.patientsknowbest.com/operation/generate-invitation-tokens" 
OperationDefinition.name"generate-invitation-tokens" 
OperationDefinition.status"active" 
OperationDefinition.kind"operation" 
OperationDefinition.code"generate-invitation-tokens" 
OperationDefinition.resource
  • "Organization"
 
OperationDefinition.systemfalse 
OperationDefinition.typefalse 
OperationDefinition.instancetrue 
OperationDefinition.parameter

  • parameter[x]: BackboneElement
    • name = "patientIdentifier"
    • use = "in"
    • min = "1"
    • max = "<to be determined>"
    • type = "token"
  • parameter[x]: BackboneElement
    • name = "patientTokens"
    • use = "out"
    • min = "1"
    • max = "<to be determined>"
    • type = "multi part parameter"

  • parameter[x]: BackboneElement
    • name = "patientIndentifier"
    • use = "out"
    • min = 1
    • max = "1"
    • type = "token"
    • part = patientTokens

  • parameter[x]: BackboneElement
    • name = "token"
    • use = "out"
    • min = "1"
    • max = "1"
    • type = "string"
    • part = patientTokens

  • parameter[x]: BackboneElement
    • name = "code"
    • use = "out"
    • min = "1"
    • max = "1"
    • type = "string"
    • part = patientTokens

  • parameter[x]: BackboneElement
    • name = "expiry"
    • use = "out"
    • min = "1"
    • max = "1"
    • type = "DateTime"
    • part = patientTokens

Currently only 'NHS Number' is supported. Reference: http://dev.patientsknowbest.com/home/fhir-api/identifier-systems. If an unsupported system identifier is supplied on the request then the whole request will be rejected and an error returned.


patientTokens will not be returned where patient is deceased, not found, already registered or has no date of birth. status-query should be used prior to this operation to confirm the patient is applicable for invitation.


Examples


Request


  { "resourceType": "Parameters", "parameter": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "4546511590" } }, { "name": "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "4523836485" } }, { "name": "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "6723232798" } } ] }


Response



  { "resourceType": "Parameters", "parameter": [ { "name": "patientTokens", "part": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "4546511590" } }, { "name": "code", "valueString": "jhkhkj" }, { "name": "token", "valueString": "797dsd" }, { "name": "expiry", "valueDatetime": "2021-01-01T09:29:23.356+00:00" } ] }, { "name": "patientTokens", "part": [ { "name": "patientIdentifier", "valueIdentifier": { "system": "https://fhir.nhs.uk/Id/nhs-number", "value": "6723232798" } }, { "name": "code", "valueString": "sdsds" }, { "name": "token", "valueString": "89sds22" }, { "name": "expiry", "valueDateTime": "2021-01-01T09:29:23.356+00:00" } ] } ] }


Comments