Referral request

API change history

Referral requests for a patient

Create referral request

Create a new referral request

Try it

Request URL

Request headers

(optional)
string
Media type of the body sent to the API.
string
Subscription key which provides access to this API. Found in your Profile.
string
OAuth 2.0 access token obtained from OAuth2 Authorization. Supported grant types: Authorization code, Client credentials.

Request body

Remiss

{
  "id": "string",
  "text": {
    "id": "string",
    "status": "generated"
  },
  "resourceType": "ReferralRequest",
  "identifier": [
    {
      "id": "string",
      "system": "string",
      "value": "string"
    }
  ],
  "subject": {
    "id": "string",
    "reference": "string",
    "identifier": {
      "id": "string",
      "system": "string",
      "value": "string"
    },
    "display": "string"
  },
  "context": {
    "id": "string",
    "reference": "string",
    "identifier": {
      "id": "string",
      "system": "string",
      "value": "string"
    },
    "display": "string"
  },
  "authoredOn": "string",
  "requester": {
    "id": "string",
    "agent": {
      "id": "string",
      "reference": "string",
      "identifier": {
        "id": "string",
        "system": "string",
        "value": "string"
      },
      "display": "string"
    },
    "onBehalfOf": {
      "id": "string",
      "reference": "string",
      "identifier": {
        "id": "string",
        "system": "string",
        "value": "string"
      },
      "display": "string"
    }
  },
  "recipient": [
    {
      "id": "string",
      "reference": "string",
      "identifier": {
        "id": "string",
        "system": "string",
        "value": "string"
      },
      "display": "string"
    }
  ],
  "description": "string",
  "note": [
    {
      "id": "string",
      "text": "string"
    }
  ]
}
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.",
      "properties": {
        "resourceType": {
          "description": "This is a ReferralRequest resource",
          "type": "string",
          "enum": [
            "ReferralRequest"
          ]
        },
        "identifier": {
          "description": "Business identifier that uniquely identifies the referral/care transfer request instance.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "description": "Base definition for all elements in a resource.",
                    "properties": {
                      "id": {
                        "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              {
                "description": "A technical identifier - identifies some entity uniquely and unambiguously.",
                "properties": {
                  "system": {
                    "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
                    "type": "string"
                  },
                  "value": {
                    "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
                    "type": "string"
                  }
                }
              }
            ]
          }
        },
        "subject": {
          "allOf": [
            {
              "allOf": [
                {
                  "allOf": [
                    {
                      "description": "Base definition for all elements in a resource.",
                      "properties": {
                        "id": {
                          "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                {
                  "description": "A reference from one resource to another.",
                  "properties": {
                    "reference": {
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
                      "type": "string"
                    },
                    "identifier": {
                      "allOf": [
                        {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "description": "Base definition for all elements in a resource.",
                                  "properties": {
                                    "id": {
                                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                                      "type": "string"
                                    }
                                  }
                                }
                              ]
                            },
                            {
                              "description": "A technical identifier - identifies some entity uniquely and unambiguously.",
                              "properties": {
                                "system": {
                                  "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
                                  "type": "string"
                                },
                                "value": {
                                  "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "description": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                        }
                      ]
                    },
                    "display": {
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "The patient who is the subject of a referral or transfer of care request."
            }
          ]
        },
        "context": {
          "allOf": [
            {
              "allOf": [
                {
                  "allOf": [
                    {
                      "description": "Base definition for all elements in a resource.",
                      "properties": {
                        "id": {
                          "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                {
                  "description": "A reference from one resource to another.",
                  "properties": {
                    "reference": {
                      "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
                      "type": "string"
                    },
                    "identifier": {
                      "allOf": [
                        {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "description": "Base definition for all elements in a resource.",
                                  "properties": {
                                    "id": {
                                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                                      "type": "string"
                                    }
                                  }
                                }
                              ]
                            },
                            {
                              "description": "A technical identifier - identifies some entity uniquely and unambiguously.",
                              "properties": {
                                "system": {
                                  "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
                                  "type": "string"
                                },
                                "value": {
                                  "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "description": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                        }
                      ]
                    },
                    "display": {
                      "description": "Plain text narrative that identifies the resource in addition to the resource reference.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "The encounter at which the request for referral or transfer of care is initiated."
            }
          ]
        },
        "authoredOn": {
          "description": "Date/DateTime of creation for draft requests and date of activation for active requests.",
          "type": "string",
          "pattern": "-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?"
        },
        "requester": {
          "allOf": [
            {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                      "properties": {}
                    }
                  ]
                },
                {
                  "description": "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.",
                  "properties": {
                    "agent": {
                      "allOf": [
                        {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "description": "Base definition for all elements in a resource.",
                                  "properties": {
                                    "id": {
                                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                                      "type": "string"
                                    }
                                  }
                                }
                              ]
                            },
                            {
                              "description": "A reference from one resource to another.",
                              "properties": {
                                "reference": {
                                  "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
                                  "type": "string"
                                },
                                "identifier": {
                                  "allOf": [
                                    {
                                      "allOf": [
                                        {
                                          "allOf": [
                                            {
                                              "description": "Base definition for all elements in a resource.",
                                              "properties": {
                                                "id": {
                                                  "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                                                  "type": "string"
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "description": "A technical identifier - identifies some entity uniquely and unambiguously.",
                                          "properties": {
                                            "system": {
                                              "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
                                              "type": "string"
                                            },
                                            "value": {
                                              "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      ]
                                    },
                                    {
                                      "description": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                    }
                                  ]
                                },
                                "display": {
                                  "description": "Plain text narrative that identifies the resource in addition to the resource reference.",
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "description": "The device, practitioner, etc. who initiated the request."
                        }
                      ]
                    },
                    "onBehalfOf": {
                      "allOf": [
                        {
                          "allOf": [
                            {
                              "allOf": [
                                {
                                  "description": "Base definition for all elements in a resource.",
                                  "properties": {
                                    "id": {
                                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                                      "type": "string"
                                    }
                                  }
                                }
                              ]
                            },
                            {
                              "description": "A reference from one resource to another.",
                              "properties": {
                                "reference": {
                                  "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
                                  "type": "string"
                                },
                                "identifier": {
                                  "allOf": [
                                    {
                                      "allOf": [
                                        {
                                          "allOf": [
                                            {
                                              "description": "Base definition for all elements in a resource.",
                                              "properties": {
                                                "id": {
                                                  "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                                                  "type": "string"
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "description": "A technical identifier - identifies some entity uniquely and unambiguously.",
                                          "properties": {
                                            "system": {
                                              "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
                                              "type": "string"
                                            },
                                            "value": {
                                              "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      ]
                                    },
                                    {
                                      "description": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                                    }
                                  ]
                                },
                                "display": {
                                  "description": "Plain text narrative that identifies the resource in addition to the resource reference.",
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        },
                        {
                          "description": "The organization the device or practitioner was acting on behalf of."
                        }
                      ]
                    }
                  },
                  "required": [
                    "agent"
                  ]
                }
              ]
            },
            {
              "description": "The individual who initiated the request and has responsibility for its activation."
            }
          ]
        },
        "recipient": {
          "description": "The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "description": "Base definition for all elements in a resource.",
                    "properties": {
                      "id": {
                        "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              {
                "description": "A reference from one resource to another.",
                "properties": {
                  "reference": {
                    "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
                    "type": "string"
                  },
                  "identifier": {
                    "allOf": [
                      {
                        "allOf": [
                          {
                            "allOf": [
                              {
                                "description": "Base definition for all elements in a resource.",
                                "properties": {
                                  "id": {
                                    "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                                    "type": "string"
                                  }
                                }
                              }
                            ]
                          },
                          {
                            "description": "A technical identifier - identifies some entity uniquely and unambiguously.",
                            "properties": {
                              "system": {
                                "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
                                "type": "string"
                              },
                              "value": {
                                "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
                                "type": "string"
                              }
                            }
                          }
                        ]
                      },
                      {
                        "description": "An identifier for the other resource. This is used when there is no way to reference the other resource directly, either because the entity is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."
                      }
                    ]
                  },
                  "display": {
                    "description": "Plain text narrative that identifies the resource in addition to the resource reference.",
                    "type": "string"
                  }
                }
              }
            ]
          }
        },
        "description": {
          "description": "The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.",
          "type": "string"
        },
        "note": {
          "description": "Comments made about the referral request by any of the participants.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "description": "Base definition for all elements in a resource.",
                    "properties": {
                      "id": {
                        "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              {
                "description": "A  text note which also  contains information about who made the statement and when.",
                "properties": {
                  "text": {
                    "description": "The text of the annotation.",
                    "type": "string"
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "subject",
        "resourceType"
      ]
    }
  ]
}

Response 200

Successfully created referral request

{
  "id": "string",
  "text": {
    "id": "string",
    "status": "generated"
  },
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "id": "string",
      "severity": "fatal",
      "code": "invalid",
      "diagnostics": "string",
      "location": [
        "string"
      ],
      "expression": [
        "string"
      ]
    }
  ]
}
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}

Response 401

Invalid token.

OperationOutcome
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}
101
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}
[
  {
    "severity": "error",
    "code": "forbidden",
    "details": {
      "text": "The authorization token was invalid"
    },
    "diagnostics": "TokenError"
  }
]
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}
{
  "id": "string",
  "text": {
    "id": "string",
    "status": "generated"
  },
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "id": "string",
      "severity": "fatal",
      "code": "invalid",
      "diagnostics": "string",
      "location": [
        "string"
      ],
      "expression": [
        "string"
      ]
    }
  ]
}
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}

Response 403

Insufficient OAuth2 scope.

{
  "statusCode": 403,
  "message": "Insufficient scope."
}
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}
{
  "id": "string",
  "text": {
    "id": "string",
    "status": "generated"
  },
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "id": "string",
      "severity": "fatal",
      "code": "invalid",
      "diagnostics": "string",
      "location": [
        "string"
      ],
      "expression": [
        "string"
      ]
    }
  ]
}
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}

Response 429

Call rate limit exceeded.

{
  "statusCode": 429,
  "message": "Rate limit is exceeded. Try again in 5 seconds."
}
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}
{
  "id": "string",
  "text": {
    "id": "string",
    "status": "generated"
  },
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "id": "string",
      "severity": "fatal",
      "code": "invalid",
      "diagnostics": "string",
      "location": [
        "string"
      ],
      "expression": [
        "string"
      ]
    }
  ]
}
{
  "allOf": [
    {
      "allOf": [
        {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Base definition for all elements in a resource.",
                  "properties": {
                    "id": {
                      "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            {
              "description": "This is the base resource type for everything.",
              "properties": {
                "id": {
                  "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                  "type": "string",
                  "pattern": "[A-Za-z0-9\\-\\.]{1,64}"
                }
              }
            }
          ]
        },
        {
          "description": "A resource that includes narrative, extensions, and contained resources.",
          "properties": {
            "text": {
              "allOf": [
                {
                  "allOf": [
                    {
                      "allOf": [
                        {
                          "description": "Base definition for all elements in a resource.",
                          "properties": {
                            "id": {
                              "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    {
                      "description": "A human-readable formatted text, including images.",
                      "properties": {
                        "status": {
                          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
                          "enum": [
                            "generated",
                            "extensions",
                            "additional",
                            "empty"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "div"
                      ]
                    }
                  ]
                },
                {
                  "description": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."
                }
              ]
            }
          }
        }
      ]
    },
    {
      "description": "A collection of error, warning or information messages that result from a system action.",
      "properties": {
        "resourceType": {
          "description": "This is a OperationOutcome resource",
          "type": "string",
          "enum": [
            "OperationOutcome"
          ]
        },
        "issue": {
          "description": "An error, warning or information message that results from a system action.",
          "type": "array",
          "items": {
            "allOf": [
              {
                "allOf": [
                  {
                    "allOf": [
                      {
                        "description": "Base definition for all elements in a resource.",
                        "properties": {
                          "id": {
                            "description": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  {
                    "description": "Base definition for all elements that are defined inside a resource - but not those in a data type.",
                    "properties": {}
                  }
                ]
              },
              {
                "description": "A collection of error, warning or information messages that result from a system action.",
                "properties": {
                  "severity": {
                    "description": "Indicates whether the issue indicates a variation from successful processing.",
                    "enum": [
                      "fatal",
                      "error",
                      "warning",
                      "information"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "description": "Describes the type of the issue. The system that creates an OperationOutcome SHALL choose the most applicable code from the IssueType value set, and may additional provide its own code for the error in the details element.",
                    "enum": [
                      "invalid",
                      "structure",
                      "required",
                      "value",
                      "invariant",
                      "security",
                      "login",
                      "unknown",
                      "expired",
                      "forbidden",
                      "suppressed",
                      "processing",
                      "not-supported",
                      "duplicate",
                      "not-found",
                      "too-long",
                      "code-invalid",
                      "extension",
                      "too-costly",
                      "business-rule",
                      "conflict",
                      "incomplete",
                      "transient",
                      "lock-error",
                      "no-store",
                      "exception",
                      "timeout",
                      "throttled",
                      "informational"
                    ],
                    "type": "string"
                  },
                  "diagnostics": {
                    "description": "Additional diagnostic information about the issue.  Typically, this may be a description of how a value is erroneous, or a stack dump to help trace the issue.",
                    "type": "string"
                  },
                  "location": {
                    "description": "For resource issues, this will be a simple XPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.  For HTTP errors, will be \"http.\" + the parameter name.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "expression": {
                    "description": "A simple FHIRPath limited to element names, repetition indicators and the default child access that identifies one of the elements in the resource that caused this issue to be raised.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "required": [
        "issue",
        "resourceType"
      ]
    }
  ]
}

Code samples

@ECHO OFF

curl -v -X POST "https://api.openservices.cambio.se/patients/referrals/"
-H "Content-Type: application/json"
-H "Ocp-Apim-Subscription-Key: {subscription key}"
-H "Authorization: {access token}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");
            client.DefaultRequestHeaders.Add("Authorization", "{access token}");

            var uri = "https://api.openservices.cambio.se/patients/referrals/?" + queryString;

            HttpResponseMessage response;

            // Request body
            byte[] byteData = Encoding.UTF8.GetBytes("{body}");

            using (var content = new ByteArrayContent(byteData))
            {
               content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
               response = await client.PostAsync(uri, content);
            }

        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://api.openservices.cambio.se/patients/referrals/");


            URI uri = builder.build();
            HttpPost request = new HttpPost(uri);
            request.setHeader("Content-Type", "application/json");
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");
            request.setHeader("Authorization", "{access token}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://api.openservices.cambio.se/patients/referrals/?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Content-Type","application/json");
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
                xhrObj.setRequestHeader("Authorization","{access token}");
            },
            type: "POST",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://api.openservices.cambio.se/patients/referrals/";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"POST"];
    // Request headers
    [_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    [_request setValue:@"{access token}" forHTTPHeaderField:@"Authorization"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://api.openservices.cambio.se/patients/referrals/');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Content-Type' => 'application/json',
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
    'Authorization' => '{access token}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_POST);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('api.openservices.cambio.se')
    conn.request("POST", "/patients/referrals/?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Content-Type': 'application/json',
    'Ocp-Apim-Subscription-Key': '{subscription key}',
    'Authorization': '{access token}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('api.openservices.cambio.se')
    conn.request("POST", "/patients/referrals/?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://api.openservices.cambio.se/patients/referrals/')


request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request headers
request['Authorization'] = '{access token}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body