PatientView icon

PatientView

The recommended REST API endpoints to be used when integrating with PatientView

COMMUNITYNO AUTH0 INSTALLS
OpenAPI Specificationv3.0
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://www.patientview.org/"
    }
  ],
  "info": {
    "description": "The recommended REST API endpoints to be used when integrating with PatientView",
    "termsOfService": "https://www.patientview.org/#/terms",
    "title": "PatientView",
    "version": "1.0",
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_www.patientview.org_images_pv-logo.png"
    },
    "x-origin": [
      {
        "converter": {
          "url": "https://github.com/lucybot/api-spec-converter",
          "version": "2.7.31"
        },
        "format": "swagger",
        "url": "https://www.patientview.org/api/api-docs",
        "version": "1.2"
      }
    ],
    "x-providerName": "patientview.org"
  },
  "tags": [
    {
      "description": "Auth Controller",
      "name": "auth-controller"
    },
    {
      "description": "Observation Controller",
      "name": "observation-controller"
    },
    {
      "description": "Observation Heading Controller",
      "name": "observation-heading-controller"
    },
    {
      "description": "Patient Controller",
      "name": "patient-controller"
    },
    {
      "description": "Patient Management Controller",
      "name": "patient-management-controller"
    }
  ],
  "paths": {
    "/auth/login": {
      "post": {
        "deprecated": false,
        "description": "Authenticate using username and password, returns token, which must be added to X-Auth-Token in header of all future requests",
        "operationId": "logIn",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Credentials"
              }
            }
          },
          "description": "credentials"
        },
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/UserToken"
                }
              }
            },
            "description": "Description was not specified"
          },
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Log In",
        "tags": [
          "auth-controller"
        ]
      }
    },
    "/auth/logout/{token}": {
      "delete": {
        "deprecated": false,
        "description": "Log Out",
        "operationId": "logOut",
        "parameters": [
          {
            "description": "token",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Description was not specified"
          },
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "summary": "Log Out",
        "tags": [
          "auth-controller"
        ]
      }
    },
    "/auth/{token}/basicuserinformation": {
      "get": {
        "deprecated": false,
        "description": "Once logged in and have a token, get basic user information including group role membership",
        "operationId": "getBasicUserInformation",
        "parameters": [
          {
            "description": "token",
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get Basic User Information",
        "tags": [
          "auth-controller"
        ]
      }
    },
    "/patient/{userId}/basic": {
      "get": {
        "deprecated": false,
        "description": "Given a User ID, get basic patient information for a user from clinical data stored in FHIR",
        "operationId": "getBasicPatientDetails",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Patient"
                  },
                  "type": "array",
                  "uniqueItems": false
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get Basic Patient Information",
        "tags": [
          "patient-controller"
        ]
      }
    },
    "/patientmanagement/diagnoses": {
      "get": {
        "deprecated": false,
        "description": "getPatientManagementDiagnoses",
        "operationId": "getPatientManagementDiagnoses",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Code"
                  },
                  "type": "array",
                  "uniqueItems": false
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "getPatientManagementDiagnoses",
        "tags": [
          "patient-management-controller"
        ]
      }
    },
    "/patientmanagement/lookuptypes": {
      "get": {
        "deprecated": false,
        "description": "getPatientManagementLookupTypes",
        "operationId": "getPatientManagementLookupTypes",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/LookupType"
                  },
                  "type": "array",
                  "uniqueItems": false
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "getPatientManagementLookupTypes",
        "tags": [
          "patient-management-controller"
        ]
      }
    },
    "/patientmanagement/validate": {
      "post": {
        "deprecated": false,
        "description": "validatePatientManagement",
        "operationId": "validatePatientManagement",
        "requestBody": {
          "$ref": "#/components/requestBodies/PatientManagement"
        },
        "responses": {
          "200": {
            "description": "Description was not specified"
          },
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "validatePatientManagement",
        "tags": [
          "patient-management-controller"
        ]
      }
    },
    "/patientmanagement/{userId}/group/{groupId}/identifier/{identifierId}": {
      "get": {
        "deprecated": false,
        "description": "getPatientManagement",
        "operationId": "getPatientManagement",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "groupId",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "identifierId",
            "in": "path",
            "name": "identifierId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatientManagement"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "getPatientManagement",
        "tags": [
          "patient-management-controller"
        ]
      },
      "post": {
        "deprecated": false,
        "description": "savePatientManagement",
        "operationId": "savePatientManagement",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "groupId",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "identifierId",
            "in": "path",
            "name": "identifierId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientManagement"
              }
            }
          },
          "description": "patientManagement"
        },
        "responses": {
          "200": {
            "description": "Description was not specified"
          },
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "savePatientManagement",
        "tags": [
          "patient-management-controller"
        ]
      }
    },
    "/patientmanagement/{userId}/group/{groupId}/identifier/{identifierId}/surgeries": {
      "post": {
        "deprecated": false,
        "description": "savePatientManagementSurgeries",
        "operationId": "savePatientManagementSurgeries",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "groupId",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "identifierId",
            "in": "path",
            "name": "identifierId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatientManagement"
              }
            }
          },
          "description": "patientManagement"
        },
        "responses": {
          "200": {
            "description": "Description was not specified"
          },
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "savePatientManagementSurgeries",
        "tags": [
          "patient-management-controller"
        ]
      }
    },
    "/user/{userId}/availableobservationheadings": {
      "get": {
        "deprecated": false,
        "description": "Given a User ID retrieve a list of available observation types for that user (where they have observation data).",
        "operationId": "getAvailableObservationHeadings",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ObservationHeading"
                  },
                  "type": "array",
                  "uniqueItems": false
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get Available Observations Types For a User",
        "tags": [
          "observation-heading-controller"
        ]
      }
    },
    "/user/{userId}/observations": {
      "get": {
        "deprecated": false,
        "description": "Given a User ID and search parameters, retrieve a page of observations.",
        "operationId": "getObservationsByCodes",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "code",
            "in": "query",
            "name": "code",
            "required": true,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "uniqueItems": false
            }
          },
          {
            "description": "limit",
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "offset",
            "in": "query",
            "name": "offset",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "orderDirection",
            "in": "query",
            "name": "orderDirection",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/FhirObservationPage"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get Observations of Multiple Types For a User",
        "tags": [
          "observation-controller"
        ]
      }
    },
    "/user/{userId}/observations/{code}": {
      "get": {
        "deprecated": false,
        "description": "Given a User ID and observation code, retrieve all observations.",
        "operationId": "getObservationsByCode",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "code",
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FhirObservation"
                  },
                  "type": "array",
                  "uniqueItems": false
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get Observations of a Certain Type For a User",
        "tags": [
          "observation-controller"
        ]
      }
    },
    "/user/{userId}/observations/{code}/patiententered": {
      "get": {
        "deprecated": false,
        "description": "Given a User ID and observation code, retrieve patient entered observations.",
        "operationId": "getPatientEnteredObservationsByCode",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "code",
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "*/*": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FhirObservation"
                  },
                  "type": "array",
                  "uniqueItems": false
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get patient entered Observations of a Certain Type For a User",
        "tags": [
          "observation-controller"
        ]
      }
    },
    "/user/{userId}/patiententeredobservationheadings": {
      "get": {
        "deprecated": false,
        "description": "Given a User ID retrieve a list of available observation types for that user (where they have patient entered observation data).",
        "operationId": "getPatientEnteredObservationHeadings",
        "parameters": [
          {
            "description": "userId",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ObservationHeading"
                  },
                  "type": "array",
                  "uniqueItems": false
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Get Available Patient Entered Observations Types For a User",
        "tags": [
          "observation-heading-controller"
        ]
      }
    }
  },
  "components": {
    "requestBodies": {
      "PatientManagement": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PatientManagement"
            }
          }
        },
        "description": "patientManagement"
      }
    },
    "schemas": {
      "ApiKey": {
        "properties": {
          "expired": {
            "type": "boolean"
          },
          "expiryDate": {
            "format": "date-time",
            "type": "string"
          },
          "key": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BaseGroup": {
        "properties": {
          "code": {
            "type": "string"
          },
          "groupType": {
            "$ref": "#/components/schemas/Lookup"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastImportDate": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parentCodes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "shortName": {
            "type": "string"
          },
          "visible": {
            "type": "boolean"
          },
          "visibleToJoin": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Category": {
        "properties": {
          "friendlyDescription": {
            "type": "string"
          },
          "hidden": {
            "type": "boolean"
          },
          "icd10Description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "number": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Code": {
        "properties": {
          "code": {
            "type": "string"
          },
          "codeCategories": {
            "items": {
              "$ref": "#/components/schemas/CodeCategory"
            },
            "type": "array",
            "uniqueItems": true
          },
          "codeType": {
            "$ref": "#/components/schemas/Lookup"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "displayOrder": {
            "format": "int32",
            "type": "integer"
          },
          "externalStandards": {
            "items": {
              "$ref": "#/components/schemas/CodeExternalStandard"
            },
            "type": "array",
            "uniqueItems": true
          },
          "fullDescription": {
            "type": "string"
          },
          "hideFromPatients": {
            "type": "boolean"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "type": "array",
            "uniqueItems": true
          },
          "patientFriendlyName": {
            "type": "string"
          },
          "removedExternally": {
            "type": "boolean"
          },
          "sourceType": {
            "enum": [
              "PATIENTVIEW",
              "NHS_CHOICES"
            ],
            "type": "string"
          },
          "standardType": {
            "$ref": "#/components/schemas/Lookup"
          }
        },
        "type": "object"
      },
      "CodeCategory": {
        "properties": {
          "category": {
            "$ref": "#/components/schemas/Category"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CodeExternalStandard": {
        "properties": {
          "codeString": {
            "type": "string"
          },
          "externalStandard": {
            "$ref": "#/components/schemas/ExternalStandard"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "ContactPoint": {
        "properties": {
          "contactPointType": {
            "$ref": "#/components/schemas/ContactPointType"
          },
          "content": {
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ContactPointType": {
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lookupType": {
            "$ref": "#/components/schemas/LookupType"
          },
          "value": {
            "enum": [
              "UNIT_WEB_ADDRESS",
              "TRUST_WEB_ADDRESS",
              "PV_ADMIN_NAME",
              "PV_ADMIN_PHONE",
              "PV_ADMIN_EMAIL",
              "UNIT_ENQUIRIES_PHONE",
              "UNIT_ENQUIRIES_EMAIL",
              "APPOINTMENT_PHONE",
              "APPOINTMENT_EMAIL",
              "OUT_OF_HOURS_INFO"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Credentials": {
        "properties": {
          "apiKey": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Entry_long_Map_string_List_FhirObservation_": {
        "properties": {
          "key": {
            "items": {
              "$ref": "#/components/schemas/Entry_string_List_FhirObservation_"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Entry_string_List_FhirObservation_": {
        "properties": {
          "key": {
            "items": {
              "$ref": "#/components/schemas/FhirObservation"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ExternalStandard": {
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Feature": {
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirAllergy": {
        "properties": {
          "confidenceLevel": {
            "type": "string"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "identifier": {
            "type": "string"
          },
          "infoSource": {
            "type": "string"
          },
          "reaction": {
            "type": "string"
          },
          "recordedDate": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "substance": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirCondition": {
        "properties": {
          "asserter": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "date": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "fullDescription": {
            "type": "string"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "identifier": {
            "type": "string"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "type": "array",
            "uniqueItems": true
          },
          "notes": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirContact": {
        "properties": {
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "system": {
            "type": "string"
          },
          "use": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirEncounter": {
        "properties": {
          "date": {
            "format": "date-time",
            "type": "string"
          },
          "encounterType": {
            "type": "string"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "identifier": {
            "type": "string"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "type": "array",
            "uniqueItems": true
          },
          "observations": {
            "items": {
              "$ref": "#/components/schemas/FhirObservation"
            },
            "type": "array",
            "uniqueItems": true
          },
          "procedures": {
            "items": {
              "$ref": "#/components/schemas/FhirProcedure"
            },
            "type": "array",
            "uniqueItems": true
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirIdentifier": {
        "properties": {
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirObservation": {
        "properties": {
          "applies": {
            "format": "date-time",
            "type": "string"
          },
          "bodySite": {
            "type": "string"
          },
          "comments": {
            "type": "string"
          },
          "comparator": {
            "type": "string"
          },
          "diagram": {
            "type": "string"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "identifier": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "temporaryUuid": {
            "type": "string"
          },
          "units": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirObservationPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Entry_long_Map_string_List_FhirObservation_"
            },
            "type": "array"
          },
          "totalElements": {
            "format": "int64",
            "type": "integer"
          },
          "totalPages": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "FhirPatient": {
        "properties": {
          "address1": {
            "type": "string"
          },
          "address2": {
            "type": "string"
          },
          "address3": {
            "type": "string"
          },
          "address4": {
            "type": "string"
          },
          "contacts": {
            "items": {
              "$ref": "#/components/schemas/FhirContact"
            },
            "type": "array"
          },
          "dateOfBirth": {
            "format": "date-time",
            "type": "string"
          },
          "dateOfBirthNoTime": {
            "type": "string"
          },
          "forename": {
            "type": "string"
          },
          "gender": {
            "type": "string"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "groupCode": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "identifiers": {
            "items": {
              "$ref": "#/components/schemas/FhirIdentifier"
            },
            "type": "array"
          },
          "postcode": {
            "type": "string"
          },
          "practitioners": {
            "items": {
              "$ref": "#/components/schemas/FhirPractitioner"
            },
            "type": "array"
          },
          "surname": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirPractitioner": {
        "properties": {
          "address1": {
            "type": "string"
          },
          "address2": {
            "type": "string"
          },
          "address3": {
            "type": "string"
          },
          "address4": {
            "type": "string"
          },
          "allowInviteGp": {
            "type": "boolean"
          },
          "contacts": {
            "items": {
              "$ref": "#/components/schemas/FhirContact"
            },
            "type": "array"
          },
          "gender": {
            "type": "string"
          },
          "groupCode": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "inviteDate": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "postcode": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "FhirProcedure": {
        "properties": {
          "bodySite": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Group": {
        "properties": {
          "address1": {
            "type": "string"
          },
          "address2": {
            "type": "string"
          },
          "address3": {
            "type": "string"
          },
          "childGroups": {
            "items": {
              "$ref": "#/components/schemas/Group"
            },
            "type": "array"
          },
          "code": {
            "type": "string"
          },
          "contactPoints": {
            "items": {
              "$ref": "#/components/schemas/ContactPoint"
            },
            "type": "array",
            "uniqueItems": true
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "fhirResourceId": {
            "format": "uuid",
            "type": "string"
          },
          "groupFeatures": {
            "items": {
              "$ref": "#/components/schemas/GroupFeature"
            },
            "type": "array",
            "uniqueItems": true
          },
          "groupType": {
            "$ref": "#/components/schemas/Lookup"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastImportDate": {
            "format": "date-time",
            "type": "string"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "links": {
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "type": "array",
            "uniqueItems": true
          },
          "locations": {
            "items": {
              "$ref": "#/components/schemas/Location"
            },
            "type": "array",
            "uniqueItems": true
          },
          "name": {
            "type": "string"
          },
          "parentGroups": {
            "items": {
              "$ref": "#/components/schemas/Group"
            },
            "type": "array"
          },
          "postcode": {
            "type": "string"
          },
          "sftpUser": {
            "type": "string"
          },
          "shortName": {
            "type": "string"
          },
          "visible": {
            "type": "boolean"
          },
          "visibleToJoin": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "GroupFeature": {
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "feature": {
            "$ref": "#/components/schemas/Feature"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GroupRole": {
        "properties": {
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          }
        },
        "type": "object"
      },
      "Link": {
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "displayOrder": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "linkType": {
            "$ref": "#/components/schemas/Lookup"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Location": {
        "properties": {
          "address": {
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "web": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Lookup": {
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionFriendly": {
            "type": "string"
          },
          "displayOrder": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "lookupType": {
            "$ref": "#/components/schemas/LookupType"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "LookupType": {
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "enum": [
              "GROUP",
              "MENU",
              "ROLE",
              "CODE_STANDARD",
              "CODE_TYPE",
              "FEATURE_TYPE",
              "RELATIONSHIP_TYPE",
              "IDENTIFIER",
              "CONTACT_POINT_TYPE",
              "STATISTIC_TYPE",
              "NEWS_TYPE",
              "GENDER",
              "IBD_CROHNSLOCATION",
              "IBD_CROHNSPROXIMALTERMINALILEUM",
              "IBD_CROHNSPERIANAL",
              "IBD_CROHNSBEHAVIOUR",
              "IBD_UCEXTENT",
              "IBD_EGIMCOMPLICATION",
              "IBD_SURGERYMAINPROCEDURE",
              "IBD_SMOKINGSTATUS",
              "IBD_FAMILYHISTORY",
              "LINK_TYPE"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "ObservationHeading": {
        "properties": {
          "code": {
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "decimalPlaces": {
            "format": "int64",
            "type": "integer"
          },
          "defaultPanel": {
            "format": "int64",
            "type": "integer"
          },
          "defaultPanelOrder": {
            "format": "int64",
            "type": "integer"
          },
          "heading": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "infoLink": {
            "type": "string"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "maxGraph": {
            "format": "double",
            "type": "number"
          },
          "minGraph": {
            "format": "double",
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "normalRange": {
            "type": "string"
          },
          "observationHeadingGroups": {
            "items": {
              "$ref": "#/components/schemas/ObservationHeadingGroup"
            },
            "type": "array",
            "uniqueItems": true
          },
          "units": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ObservationHeadingGroup": {
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "panel": {
            "format": "int64",
            "type": "integer"
          },
          "panelOrder": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Patient": {
        "properties": {
          "diagnosisCodes": {
            "items": {
              "$ref": "#/components/schemas/Code"
            },
            "type": "array"
          },
          "fhirAllergies": {
            "items": {
              "$ref": "#/components/schemas/FhirAllergy"
            },
            "type": "array"
          },
          "fhirConditions": {
            "items": {
              "$ref": "#/components/schemas/FhirCondition"
            },
            "type": "array"
          },
          "fhirEncounters": {
            "items": {
              "$ref": "#/components/schemas/FhirEncounter"
            },
            "type": "array"
          },
          "fhirObservations": {
            "items": {
              "$ref": "#/components/schemas/FhirObservation"
            },
            "type": "array"
          },
          "fhirPatient": {
            "$ref": "#/components/schemas/FhirPatient"
          },
          "fhirPractitioners": {
            "items": {
              "$ref": "#/components/schemas/FhirPractitioner"
            },
            "type": "array"
          },
          "group": {
            "$ref": "#/components/schemas/Group"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PatientManagement": {
        "properties": {
          "condition": {
            "$ref": "#/components/schemas/FhirCondition"
          },
          "encounters": {
            "items": {
              "$ref": "#/components/schemas/FhirEncounter"
            },
            "type": "array"
          },
          "groupCode": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "observations": {
            "items": {
              "$ref": "#/components/schemas/FhirObservation"
            },
            "type": "array"
          },
          "patient": {
            "$ref": "#/components/schemas/FhirPatient"
          },
          "practitioners": {
            "items": {
              "$ref": "#/components/schemas/FhirPractitioner"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Role": {
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "enum": [
              "PATIENT",
              "UNIT_ADMIN",
              "STAFF_ADMIN",
              "DISEASE_GROUP_ADMIN",
              "SPECIALTY_ADMIN",
              "GLOBAL_ADMIN",
              "GP_ADMIN",
              "MEMBER",
              "PUBLIC",
              "UNIT_ADMIN_API",
              "IMPORTER"
            ],
            "type": "string"
          },
          "visible": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Route": {
        "properties": {
          "controller": {
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "displayOrder": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lookup": {
            "$ref": "#/components/schemas/Lookup"
          },
          "templateUrl": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UUID": {},
      "User": {
        "properties": {
          "apiKey": {
            "$ref": "#/components/schemas/ApiKey"
          },
          "canSwitchUser": {
            "type": "boolean"
          },
          "changePassword": {
            "type": "boolean"
          },
          "contactNumber": {
            "type": "string"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "currentLogin": {
            "format": "date-time",
            "type": "string"
          },
          "currentLoginIpAddress": {
            "type": "string"
          },
          "dateOfBirth": {
            "format": "date-time",
            "type": "string"
          },
          "deleted": {
            "type": "boolean"
          },
          "dummy": {
            "type": "boolean"
          },
          "email": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "forename": {
            "type": "string"
          },
          "groupRoles": {
            "items": {
              "$ref": "#/components/schemas/GroupRole"
            },
            "type": "array",
            "uniqueItems": true
          },
          "hideSecretWordNotification": {
            "type": "boolean"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "identifiers": {
            "items": {
              "type": "object"
            },
            "type": "array",
            "uniqueItems": true
          },
          "lastLogin": {
            "format": "date-time",
            "type": "string"
          },
          "lastLoginIpAddress": {
            "type": "string"
          },
          "latestDataReceivedBy": {
            "$ref": "#/components/schemas/BaseGroup"
          },
          "latestDataReceivedDate": {
            "format": "date-time",
            "type": "string"
          },
          "locked": {
            "type": "boolean"
          },
          "picture": {
            "type": "string"
          },
          "roleDescription": {
            "type": "string"
          },
          "secretWordIsSet": {
            "type": "boolean"
          },
          "surname": {
            "type": "string"
          },
          "userFeatures": {
            "items": {
              "$ref": "#/components/schemas/UserFeature"
            },
            "type": "array",
            "uniqueItems": true
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserFeature": {
        "properties": {
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "feature": {
            "$ref": "#/components/schemas/Feature"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "lastUpdate": {
            "format": "date-time",
            "type": "string"
          },
          "optInDate": {
            "format": "date-time",
            "type": "string"
          },
          "optInHidden": {
            "type": "boolean"
          },
          "optInStatus": {
            "type": "boolean"
          },
          "optOutHidden": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UserToken": {
        "properties": {
          "auditActions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "checkSecretWord": {
            "type": "boolean"
          },
          "created": {
            "format": "date-time",
            "type": "string"
          },
          "expiration": {
            "format": "date-time",
            "type": "string"
          },
          "externalStandards": {
            "items": {
              "$ref": "#/components/schemas/ExternalStandard"
            },
            "type": "array"
          },
          "groupFeatures": {
            "items": {
              "$ref": "#/components/schemas/Feature"
            },
            "type": "array"
          },
          "groupMessagingEnabled": {
            "type": "boolean"
          },
          "mustSetSecretWord": {
            "type": "boolean"
          },
          "patientFeatures": {
            "items": {
              "$ref": "#/components/schemas/Feature"
            },
            "type": "array"
          },
          "patientMessagingFeatureTypes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "patientRoles": {
            "items": {
              "$ref": "#/components/schemas/Role"
            },
            "type": "array"
          },
          "routes": {
            "items": {
              "$ref": "#/components/schemas/Route"
            },
            "type": "array",
            "uniqueItems": true
          },
          "secretWord": {
            "type": "string"
          },
          "secretWordChoices": {
            "type": "object"
          },
          "secretWordIndexes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "secretWordSalt": {
            "type": "string"
          },
          "secretWordToken": {
            "type": "string"
          },
          "securityRoles": {
            "items": {
              "$ref": "#/components/schemas/Role"
            },
            "type": "array"
          },
          "shouldEnterCondition": {
            "type": "boolean"
          },
          "staffFeatures": {
            "items": {
              "$ref": "#/components/schemas/Feature"
            },
            "type": "array"
          },
          "staffRoles": {
            "items": {
              "$ref": "#/components/schemas/Role"
            },
            "type": "array"
          },
          "token": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "userFeatures": {
            "items": {
              "$ref": "#/components/schemas/Feature"
            },
            "type": "array"
          },
          "userGroups": {
            "items": {
              "$ref": "#/components/schemas/BaseGroup"
            },
            "type": "array"
          }
        },
        "type": "object"
      }
    }
  }
}