{
  "swagger": "2.0",
  "info": {
    "description": "RippleOSI Middle Tier REST APIs",
    "version": "1.1.0",
    "title": "Ripple Showcase Stack  - Swagger - Open APIs"
  },
  "schemes": [
    "http"
  ],
  "tags": [
    {
      "name": "Ripple"
    }
  ],
  "securityDefinitions": {
    "QEWDToken": {
      "description": "For accessing the API a valid token must be passed in all the queries in the 'Cookies' header.  A valid token is generated by the /api/initialise API.  The following syntax must be used in the 'Cookie' header :    JSESSIONID=xxxxxxx",
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  },
  "paths": {
    "/api/initialise": {
      "get": {
        "tags": [
          "Ripple"
        ],
        "description": "Starts a User Session",
        "parameters": [],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "The users session token and mode",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/initialiseResponse"
            }
          }
        }
      }
    },
    "/api/ui/{uiType}": {
      "get": {
        "tags": [
          "Ripple"
        ],
        "description": "Switch UI between React and Angular versions",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "uiType",
            "in": "path",
            "description": "UI Type: react or angular",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation of UI swap",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/uiResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/application": {
      "get": {
        "tags": [
          "Ripple"
        ],
        "description": "Gets user's application settings",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The users application settings",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/applicationPayload"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Ripple"
        ],
        "description": "Saves user's application settings",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing application settings",
            "required": true,
            "schema": {
              "$ref": "#/definitions/applicationPayload"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/applicationSaveResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "put": {
        "tags": [
          "Ripple"
        ],
        "description": "Saves user's application settings",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing application settings",
            "required": true,
            "schema": {
              "$ref": "#/definitions/applicationPayload"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/applicationSaveResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/user": {
      "get": {
        "tags": [
          "Ripple"
        ],
        "description": "Gets current user's details",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The users details",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/userResponse"
            }
          },
          "400": {
            "description": "Delivers new user session token to browser and signals it to reload",
            "schema": {
              "$ref": "#/definitions/userError"
            }
          }
        }
      }
    },
    "/api/patients": {
      "get": {
        "tags": [
          "Ripple"
        ],
        "description": "Gets data for all patients in PAS",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Patient Data",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/patientsResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/counts": {
      "get": {
        "tags": [
          "Ripple"
        ],
        "description": "Gets Heading counts for specified patient",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Counts for selected headings",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/countsResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/dicom/studies": {
      "get": {
        "tags": [
          "Ripple"
        ],
        "description": "Gets all Digital Imaging for Communications in Medicine (DICOM) records for specified patient",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "All DICOM documents",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/dicomStudiesResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/documents/patient/{patientId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "description": "Get a summary list of documents for a patient",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary List of Documents",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/documentsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/documents/patient/{patientId}/{sourceId}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "description": "Get the contents of a specified document for a patient",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "Document Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Document Contents",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/documentsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/documents/patient/{patientId}/{host}": {
      "post": {
        "tags": [
          "Documents"
        ],
        "description": "Saves a Healthlink Referral or Discharge Document",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "consumes": [
          "application/xml"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing HealthLink XML Document",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "host",
            "in": "path",
            "description": "OpenEHR Host System on which to save Document (eg marand, ethercis)",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/postDocumentResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/allergies": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get allergies summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for allergies",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/allergiesSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new allergies record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/allergiesSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/allergies/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete allergies data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for allergies",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/allergiesDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/problems": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get problems summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for problems",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/problemsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new problems record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/problemsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/problems/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete problems data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for problems",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/problemsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/medications": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get medications summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for medications",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/medicationsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new medications record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/medicationsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/medications/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete medications data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for medications",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/medicationsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/contacts": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get contacts summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for contacts",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/contactsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new contacts record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/contactsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/contacts/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete contacts data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for contacts",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/contactsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/laborders": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get laborders summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for laborders",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/labordersSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new laborders record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/labordersSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/laborders/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete laborders data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for laborders",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/labordersDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/labresults": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get labresults summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for labresults",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/labresultsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/labresults/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete labresults data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for labresults",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/labresultsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/procedures": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get procedures summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for procedures",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/proceduresSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new procedures record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/proceduresSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/procedures/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete procedures data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for procedures",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/proceduresDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/referrals": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get referrals summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for referrals",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/referralsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new referrals record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/referralsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/referrals/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete referrals data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for referrals",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/referralsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/appointments": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get appointments summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for appointments",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/appointmentsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new appointments record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/appointmentsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/appointments/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete appointments data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for appointments",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/appointmentsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/eolcareplans": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get eolcareplans summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for eolcareplans",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/eolcareplansSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new eolcareplans record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/eolcareplansSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/eolcareplans/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete eolcareplans data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for eolcareplans",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/eolcareplansDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/mdtreports": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get mdtreports summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for mdtreports",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/mdtreportsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/mdtreports/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete mdtreports data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for mdtreports",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/mdtreportsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/personalnotes": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get personalnotes summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for personalnotes",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/personalnotesSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new personalnotes record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/personalnotesSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/personalnotes/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete personalnotes data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for personalnotes",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/personalnotesDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/vaccinations": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get vaccinations summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for vaccinations",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/vaccinationsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new vaccinations record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/vaccinationsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/vaccinations/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete vaccinations data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for vaccinations",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/vaccinationsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/vitalsigns": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get vitalsigns summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for vitalsigns",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/vitalsignsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new vitalsigns record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/vitalsignsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/vitalsigns/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete vitalsigns data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for vitalsigns",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/vitalsignsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/clinicalnotes": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get clinicalnotes summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for clinicalnotes",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/clinicalnotesSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new clinicalnotes record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/clinicalnotesSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/clinicalnotes/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete clinicalnotes data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for clinicalnotes",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/clinicalnotesDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/events": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get events summary data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary Data for events",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/eventsSummaryResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      },
      "post": {
        "tags": [
          "Headings"
        ],
        "description": "Save a new events record",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Body Payload containing heading data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/eventsSchema"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation that data has been saved",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/headingPostResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    },
    "/api/patients/{patientId}/events/{sourceId}": {
      "get": {
        "tags": [
          "Headings"
        ],
        "description": "Get complete events data",
        "security": [
          {
            "QEWDToken": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "patientId",
            "in": "path",
            "description": "Patient Id",
            "required": true,
            "type": "string"
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "OpenEHR Composition Id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Full Data for events",
            "headers": {
              "X-ResponseTime": {
                "description": "Back-end response time",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/eventsDetailResponse"
            }
          },
          "403": {
            "description": "Missing or invalid authentication credentials"
          }
        }
      }
    }
  },
  "definitions": {
    "initialiseResponse": {
      "properties": {
        "token": {
          "type": "string"
        },
        "mode": {
          "type": "string"
        }
      }
    },
    "uiResponse": {
      "properties": {
        "ok": {
          "type": "string"
        },
        "uiType": {
          "description": "The UI Type selected (react or angular)",
          "type": "string"
        }
      }
    },
    "applicationPayload": {
      "properties": {
        "title": {
          "description": "Application Heading Title",
          "type": "string"
        },
        "logoB64": {
          "description": "Logo image defined as Base64 string, chunked into array elements, max 4000 characters",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "themeColor": {
          "description": "CSS Theming Colour definition",
          "type": "string"
        },
        "browserTitle": {
          "description": "Title for browser tab/heading",
          "type": "string"
        }
      }
    },
    "applicationSaveResponse": {
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "role": {
          "description": "User role",
          "type": "string"
        }
      }
    },
    "userResponse": {
      "properties": {
        "sub": {
          "description": "authentication key",
          "type": "string"
        },
        "given_name": {
          "description": "User's given (first) name",
          "type": "string"
        },
        "family_name": {
          "description": "User's family (last) name",
          "type": "string"
        },
        "email": {
          "description": "User's email address",
          "type": "string"
        },
        "tenant": {
          "description": "Not used",
          "type": "string"
        },
        "role": {
          "description": "User role",
          "type": "string"
        },
        "roles": {
          "description": "Array of roles (where more than 1 applies)",
          "type": "array",
          "items": {
            "description": "role",
            "type": "string"
          }
        }
      }
    },
    "userError": {
      "properties": {
        "error": {
          "type": "object",
          "properties": {
            "token": {
              "description": "User Session Token",
              "type": "string"
            },
            "reload": {
              "description": "UI reload trigger signal",
              "type": "boolean"
            }
          }
        }
      }
    },
    "patientsResponse": {
      "properties": {
        "patientId": {
          "description": "Object containing patient's data",
          "type": "object",
          "properties": {
            "address": {
              "description": "Postal Address",
              "type": "string"
            },
            "dateOfBirth": {
              "description": "Date of Birth: JavaScript Date().getTime() format",
              "type": "string"
            },
            "department": {
              "description": "Department category",
              "type": "string"
            },
            "gender": {
              "description": "Patient's Gender (Male/Female)",
              "type": "string"
            },
            "gpAddress": {
              "description": "GP's address",
              "type": "string"
            },
            "gpName": {
              "description": "GP's Name",
              "type": "string"
            },
            "id": {
              "description": "Patient's Id",
              "type": "string"
            },
            "name": {
              "description": "Patient's Name",
              "type": "string"
            },
            "nhsNumber": {
              "description": "NHS Number",
              "type": "string"
            },
            "pasNo": {
              "description": "PAS-specific Patient Identifier",
              "type": "string"
            },
            "phone": {
              "description": "User's Phone No",
              "type": "string"
            }
          }
        }
      }
    },
    "countsResponse": {
      "type": "array",
      "items": {
        "description": "Counts from one OpenEHR Source",
        "type": "object",
        "properties": {
          "diagnosesCount": {
            "description": "Number of Diagnoses",
            "type": "string"
          },
          "diagnosesDate": {
            "description": "Date count last updated",
            "type": "string"
          },
          "ordersCount": {
            "description": "Number of Orders",
            "type": "string"
          },
          "ordersDate": {
            "description": "Date count last updated",
            "type": "string"
          },
          "resultsCount": {
            "description": "Number of Results",
            "type": "string"
          },
          "resultsDate": {
            "description": "Date count last updated",
            "type": "string"
          },
          "vitalsCount": {
            "description": "Number of Vital Sign records",
            "type": "string"
          },
          "vitalsDate": {
            "description": "Date count last updated",
            "type": "string"
          },
          "source": {
            "description": "Source OpenEHR System",
            "type": "string"
          },
          "sourceId": {
            "description": "Notional Source Identifier (for completeness)",
            "type": "string"
          }
        }
      }
    },
    "headingPostResponse": {
      "properties": {
        "info": {
          "description": "Successful Post Confirmation",
          "type": "string"
        }
      }
    },
    "dicomStudiesResponse": {
      "type": "array",
      "items": {
        "description": "All Digital Imaging and Communications in Medicine (DICOM) studies for a specified patient",
        "type": "object",
        "properties": {
          "dateRecorded": {
            "description": "Date the study was recororded",
            "type": "string"
          },
          "studyDescription": {
            "description": "Description of the type of study conducted",
            "type": "string"
          },
          "source": {
            "description": "Reference to the originating system, e.g. orthanc",
            "type": "string"
          },
          "studyId": {
            "description": "Unique ID of the study",
            "type": "string"
          }
        }
      }
    },
    "documentsSummaryResponse": {
      "type": "array",
      "items": {
        "description": "Summary of documents for the selected patient",
        "type": "object",
        "properties": {
          "sourceId": {
            "description": "Composition Id of the Document",
            "type": "string"
          },
          "dateCreated": {
            "description": "Date on which the Document was created",
            "type": "string"
          },
          "author": {
            "description": "The Documents Author",
            "type": "string"
          },
          "documentType": {
            "description": "The Document type: Referral or Discharge Summary",
            "type": "string"
          },
          "source": {
            "description": "The OpenEHR system from which the Document was retrieved",
            "type": "string"
          }
        }
      }
    },
    "documentsDetailResponse": {
      "properties": {
        "sourceId": {
          "description": "Document Composition Id",
          "type": "string"
        },
        "author_name": {
          "description": "Document Author",
          "type": "string"
        },
        "author_id": {
          "description": "Document Author Id",
          "type": "string"
        },
        "author_idScheme": {
          "description": "Document Author Id Scheme",
          "type": "string"
        },
        "documentDate": {
          "description": "Document Creation Date",
          "type": "string"
        },
        "facility": {
          "description": "Hospital / Facility for which the document was created",
          "type": "string"
        },
        "patientIdentifer_mrn": {
          "description": "Patient Medical Record Number",
          "type": "string"
        },
        "patientIdentifer_mrnType": {
          "description": "Patient Medical Record Number Type",
          "type": "string"
        },
        "patientIdentifer_oth": {
          "description": "Patient OTH",
          "type": "string"
        },
        "patientIdentifer_othType": {
          "description": "Patient OTH Type",
          "type": "string"
        },
        "patientIdentifer_gms": {
          "description": "Patient GMS",
          "type": "string"
        },
        "patientIdentifer_gmsType": {
          "description": "Patient GMS Type",
          "type": "string"
        },
        "responsibleProfessional_name": {
          "description": "Name of Responsible Professional",
          "type": "string"
        },
        "responsibleProfessional_id": {
          "description": "Id of Responsible Professional",
          "type": "string"
        },
        "responsibleProfessional_idType": {
          "description": "Id Type of Responsible Professional",
          "type": "string"
        },
        "dischargingOrganisation": {
          "description": "Discharging Organisation",
          "type": "string"
        }
      }
    },
    "postDocumentResponse": {
      "properties": {
        "ok": {
          "type": "string"
        }
      }
    },
    "allergiesSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "cause": {
          "type": "string"
        },
        "reaction": {
          "type": "string"
        }
      }
    },
    "allergiesDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "cause": {
          "type": "string"
        },
        "causeCode": {
          "type": "string"
        },
        "causeTerminology": {
          "type": "string"
        },
        "terminologyCode": {
          "type": "string"
        },
        "reaction": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        },
        "originalComposition": {
          "type": "string"
        },
        "originalSource": {
          "type": "string"
        }
      }
    },
    "allergiesSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "cause": {
          "type": "string"
        },
        "causeCode": {
          "type": "string"
        },
        "causeTerminology": {
          "type": "string"
        },
        "reaction": {
          "type": "string"
        },
        "originalComposition": {
          "type": "string"
        },
        "originalSource": {
          "type": "string"
        }
      }
    },
    "problemsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "problem": {
          "type": "string"
        },
        "dateOfOnset": {
          "type": "string"
        }
      }
    },
    "problemsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "problem": {
          "type": "string"
        },
        "dateOfOnset": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "terminology": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        },
        "originalComposition": {
          "type": "string"
        },
        "originalSource": {
          "type": "string"
        }
      }
    },
    "problemsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "problem": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "terminology": {
          "type": "string"
        },
        "dateOfOnset": {
          "type": "string"
        },
        "originalComposition": {
          "type": "string"
        },
        "originalSource": {
          "type": "string"
        }
      }
    },
    "medicationsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "doseAmount": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "medicationsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "doseAmount": {
          "type": "string"
        },
        "doseDirections": {
          "type": "string"
        },
        "doseTiming": {
          "type": "string"
        },
        "route": {
          "type": "string"
        },
        "startDate": {
          "type": "string"
        },
        "startTime": {
          "type": "string"
        },
        "medicationCode": {
          "type": "string"
        },
        "medicationTerminology": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "medicationsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "medicationCode": {
          "type": "string"
        },
        "medicationTerminology": {
          "type": "string"
        },
        "doseDirections": {
          "type": "string"
        },
        "route": {
          "type": "string"
        },
        "doseAmount": {
          "type": "string"
        },
        "doseTiming": {
          "type": "string"
        },
        "startDate": {
          "type": "string"
        }
      }
    },
    "contactsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "relationship": {
          "type": "string"
        },
        "nextOfKin": {
          "type": "string"
        }
      }
    },
    "contactsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "relationship": {
          "type": "string"
        },
        "relationshipType": {
          "type": "string"
        },
        "relationshipCode": {
          "type": "string"
        },
        "relationshipTerminology": {
          "type": "string"
        },
        "contactInformation": {
          "type": "string"
        },
        "nextOfKin": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "contactsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "contactInformation": {
          "type": "string"
        },
        "relationshipCode": {
          "type": "string"
        },
        "relationship": {
          "type": "string"
        },
        "nextOfKin": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "labordersSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "orderDate": {
          "type": "string"
        }
      }
    },
    "labordersDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "terminology": {
          "type": "string"
        },
        "orderDate": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "labordersSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "terminology": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "labresultsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "testName": {
          "type": "string"
        },
        "sampleTaken": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "labresultsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "testName": {
          "type": "string"
        },
        "sampleTaken": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "conclusion": {
          "type": "string"
        },
        "testResults": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "proceduresSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "date": {
          "type": "string"
        },
        "time": {
          "type": "string"
        }
      }
    },
    "proceduresDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "procedureName": {
          "type": "string"
        },
        "procedureCode": {
          "type": "string"
        },
        "date": {
          "type": "string"
        },
        "time": {
          "type": "string"
        },
        "procedureTerminology": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "performer": {
          "type": "string"
        },
        "currentStatus": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateSubmitted": {
          "type": "string"
        },
        "originalComposition": {
          "type": "string"
        },
        "originalSource": {
          "type": "string"
        }
      }
    },
    "proceduresSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "procedureName": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "procedureCode": {
          "type": "string"
        },
        "performer": {
          "type": "string"
        },
        "date": {
          "type": "string"
        },
        "originalComposition": {
          "type": "string"
        },
        "originalSource": {
          "type": "string"
        }
      }
    },
    "referralsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "dateOfReferral": {
          "type": "string"
        },
        "referralFrom": {
          "type": "string"
        },
        "referralTo": {
          "type": "string"
        }
      }
    },
    "referralsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "referralType": {
          "type": "string"
        },
        "referralReason": {
          "type": "string"
        },
        "referralSummary": {
          "type": "string"
        },
        "referralFrom": {
          "type": "string"
        },
        "referralTo": {
          "type": "string"
        },
        "referralRef": {
          "type": "string"
        },
        "referralOutcome": {
          "type": "string"
        },
        "referralStateDate": {
          "type": "string"
        },
        "referralState": {
          "type": "string"
        },
        "referralStateCode": {
          "type": "string"
        },
        "referralCareFlow": {
          "type": "string"
        },
        "referralServiceName": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateOfReferral": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "referralsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "referralServiceName": {
          "type": "string"
        },
        "referralReason": {
          "type": "string"
        },
        "referralSummary": {
          "type": "string"
        },
        "referralStateDate": {
          "type": "string"
        },
        "referralFrom": {
          "type": "string"
        },
        "referralRef": {
          "type": "string"
        },
        "referralTo": {
          "type": "string"
        },
        "referralReason)": {
          "type": "string"
        }
      }
    },
    "appointmentsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "serviceTeam": {
          "type": "string"
        },
        "dateOfAppointment": {
          "type": "string"
        },
        "timeOfAppointment": {
          "type": "string"
        }
      }
    },
    "appointmentsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "serviceTeam": {
          "type": "string"
        },
        "dateOfAppointment": {
          "type": "string"
        },
        "timeOfAppointment": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "appointmentsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "serviceTeam": {
          "type": "string"
        },
        "dateOfAppointment": {
          "type": "string"
        },
        "location": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "eolcareplansSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "eolcareplansDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "careDocument": {
          "type": "string"
        },
        "cprDecision": {
          "type": "string"
        },
        "prioritiesOfCare": {
          "type": "string"
        },
        "treatmentDecision": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "eolcareplansSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "prioritiesOfCare.placeOfCare": {
          "type": "string"
        },
        "prioritiesOfCare.placeOfDeath": {
          "type": "string"
        },
        "prioritiesOfCare.comment": {
          "type": "string"
        },
        "treatmentDecision.decisionToRefuseTreatment": {
          "type": "string"
        },
        "treatmentDecision.dateOfDecision)": {
          "type": "string"
        },
        "cprDecision.cprDecision": {
          "type": "string"
        },
        "cprDecision.dateOfDecision)": {
          "type": "string"
        },
        "cprDecision.comment": {
          "type": "string"
        }
      }
    },
    "mdtreportsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "serviceTeam": {
          "type": "string"
        },
        "dateOfRequest": {
          "type": "string"
        },
        "dateOfMeeting": {
          "type": "string"
        }
      }
    },
    "mdtreportsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "serviceTeam": {
          "type": "string"
        },
        "dateOfRequest": {
          "type": "string"
        },
        "dateOfMeeting": {
          "type": "string"
        },
        "timeOfMeeting": {
          "type": "string"
        },
        "servicePageLink": {
          "type": "string"
        },
        "question": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "personalnotesSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "noteType": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "personalnotesDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "noteType": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "personalnotesSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "noteType": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "vaccinationsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "vaccinationName": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "vaccinationsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "vaccinationName": {
          "type": "string"
        },
        "comment": {
          "type": "string"
        },
        "series": {
          "type": "string"
        },
        "vaccinationDateTime": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "vaccinationsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "vaccinationName": {
          "type": "string"
        },
        "series": {
          "type": "string"
        },
        "comment": {
          "type": "string"
        },
        "vaccinationDateTime)": {
          "type": "string"
        }
      }
    },
    "vitalsignsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        },
        "newsScore": {
          "type": "string"
        },
        "respirationRate": {
          "type": "string"
        },
        "oxygenSupplemental": {
          "type": "string"
        },
        "heartRate": {
          "type": "string"
        },
        "temperature": {
          "type": "string"
        },
        "levelOfConsciousness": {
          "type": "string"
        },
        "systolicBP": {
          "type": "string"
        },
        "diastolicBP": {
          "type": "string"
        },
        "oxygenSaturation": {
          "type": "string"
        }
      }
    },
    "vitalsignsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "respirationRate": {
          "type": "string"
        },
        "oxygenSupplemental": {
          "type": "string"
        },
        "heartRate": {
          "type": "string"
        },
        "temperature": {
          "type": "string"
        },
        "levelOfConsciousness": {
          "type": "string"
        },
        "systolicBP": {
          "type": "string"
        },
        "diastolicBP": {
          "type": "string"
        },
        "oxygenSaturation": {
          "type": "string"
        },
        "newsScore": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "vitalsignsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "respirationRate": {
          "type": "string"
        },
        "oxygenSupplemental)": {
          "type": "string"
        },
        "heartRate": {
          "type": "string"
        },
        "temperature": {
          "type": "string"
        },
        "levelOfConsciousness)": {
          "type": "string"
        },
        "systolicBP": {
          "type": "string"
        },
        "diastolicBP": {
          "type": "string"
        },
        "oxygenSaturation": {
          "type": "string"
        },
        "newsScore": {
          "type": "string"
        }
      }
    },
    "clinicalnotesSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        },
        "clinicalNotesType": {
          "type": "string"
        }
      }
    },
    "clinicalnotesDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "clinicalNotesType": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "clinicalnotesSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "clinicalNotesType": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "eventsSummaryResponse": {
      "properties": {
        "source": {
          "description": "Source OpenEHR System",
          "type": "string"
        },
        "sourceId": {
          "description": "Source OpenEHR Composition Id",
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "dateTime": {
          "type": "string"
        }
      }
    },
    "eventsDetailResponse": {
      "properties": {
        "source": {
          "type": "string"
        },
        "sourceId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "dateTime": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "dateCreated": {
          "type": "string"
        }
      }
    },
    "eventsSchema": {
      "properties": {
        "author": {
          "type": "string"
        },
        "healthcareFacilityId": {
          "type": "string"
        },
        "healthcareFacilityName": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "dateTime": {
          "type": "string"
        }
      }
    }
  }
}
