{
    "definitions": {
        "emergency_contact": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "additionalProperties": false,
            "definitions": {
                "create_payload": {
                    "additionalProperties": false,
                    "description": "Expected payload needed to create an emergency contact",
                    "properties": {
                        "emergency_contact": {
                            "$ref": "#/definitions/emergency_contact/definitions/emergency_contact_payload"
                        }
                    },
                    "required": [
                        "emergency_contact"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "create_response": {
                    "$ref": "#/definitions/emergency_contact/definitions/emergency_contact_response"
                },
                "email": {
                    "description": "An emergency contact's email address",
                    "example": "jane.jackson@partners.com",
                    "format": "email",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "emergency_contact_payload": {
                    "additionalProperties": false,
                    "description": "Expected emergency contact content needed to create an emergency contact",
                    "properties": {
                        "email": {
                            "$ref": "#/definitions/emergency_contact/definitions/email"
                        },
                        "first_name": {
                            "$ref": "#/definitions/emergency_contact/definitions/first_name"
                        },
                        "last_name": {
                            "$ref": "#/definitions/emergency_contact/definitions/last_name"
                        },
                        "phone": {
                            "$ref": "#/definitions/emergency_contact/definitions/phone"
                        },
                        "relationship": {
                            "$ref": "#/definitions/emergency_contact/definitions/relationship"
                        }
                    },
                    "required": [
                        "first_name",
                        "last_name",
                        "phone",
                        "relationship"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "emergency_contact_response": {
                    "description": "Response to an emergency contact show request",
                    "oneOf": [
                        {
                            "additionalProperties": false,
                            "description": "A successful response.",
                            "properties": {
                                "emergency_contact": {
                                    "$ref": "#/definitions/emergency_contact"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/patient/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "emergency_contact"
                            ],
                            "type": [
                                "object"
                            ]
                        },
                        {
                            "additionalProperties": false,
                            "description": "A failed response.",
                            "properties": {
                                "errors": {
                                    "$ref": "#/definitions/patient/definitions/errors"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/patient/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "errors"
                            ],
                            "type": [
                                "object"
                            ]
                        }
                    ],
                    "optionalProperties": {
                        "emergency_contact": {
                            "$ref": "#/definitions/emergency_contact"
                        },
                        "errors": {
                            "$ref": "#/definitions/patient/definitions/errors"
                        }
                    },
                    "properties": {
                        "emergency_contact": {
                            "$ref": "#/definitions/emergency_contact"
                        },
                        "reference_id": {
                            "$ref": "#/definitions/patient/definitions/reference_id"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "first_name": {
                    "description": "the first name of the contact",
                    "example": "Jane",
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "last_name": {
                    "description": "the last name of the contact",
                    "example": "Jackson",
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "phone": {
                    "description": "An emergency contact's phone number",
                    "example": "617-123-5555",
                    "pattern": "^[0-9]{3}-[0-9]{3}-[0-9]{4}$",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "relationship": {
                    "description": "The relationship to the patient.",
                    "example": "Partner",
                    "maxLength": 255,
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "show_response": {
                    "$ref": "#/definitions/emergency_contact/definitions/emergency_contact_response"
                }
            },
            "description": "A Patient's Emergency Contact",
            "links": [
                {
                    "description": "Retrieve a patient's emergency contact",
                    "href": "/patients/{(%23%2Fdefinitions%2Fpatient%2Fdefinitions%2Fidentity)}/emergency_contact",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instance",
                    "targetSchema": {
                        "$ref": "#/definitions/emergency_contact/definitions/show_response"
                    },
                    "title": "Show"
                },
                {
                    "description": "Creates a new Emergency Contact for a patient",
                    "href": "/patients/{(%23%2Fdefinitions%2Fpatient%2Fdefinitions%2Fidentity)}/emergency_contact",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "POST",
                    "rel": "create",
                    "schema": {
                        "$ref": "#/definitions/emergency_contact/definitions/create_payload"
                    },
                    "targetSchema": {
                        "$ref": "#/definitions/emergency_contact/definitions/create_response"
                    },
                    "title": "Create"
                }
            ],
            "properties": {
                "email": {
                    "$ref": "#/definitions/emergency_contact/definitions/email"
                },
                "first_name": {
                    "$ref": "#/definitions/emergency_contact/definitions/first_name"
                },
                "last_name": {
                    "$ref": "#/definitions/emergency_contact/definitions/last_name"
                },
                "phone": {
                    "$ref": "#/definitions/emergency_contact/definitions/phone"
                },
                "relationship": {
                    "$ref": "#/definitions/emergency_contact/definitions/relationship"
                }
            },
            "required": [
                "first_name",
                "last_name",
                "phone",
                "relationship"
            ],
            "title": "Emergency Contact",
            "type": [
                "object"
            ]
        },
        "location": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "additionalProperties": false,
            "definitions": {
                "address": {
                    "additionalProperties": false,
                    "description": "The location's address",
                    "properties": {
                        "city": {
                            "$ref": "#/definitions/location/definitions/city"
                        },
                        "state": {
                            "$ref": "#/definitions/location/definitions/state"
                        },
                        "street_line_1": {
                            "$ref": "#/definitions/location/definitions/street_line_1"
                        },
                        "street_line_2": {
                            "$ref": "#/definitions/location/definitions/street_line_2"
                        },
                        "zip": {
                            "$ref": "#/definitions/location/definitions/zip"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "city": {
                    "description": "the city of a street address",
                    "example": "camden",
                    "maxLength": 255,
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "error": {
                    "description": "An error explaining why an action failed",
                    "example": "Icis::Error(Couldn't find Location with 'id'=99)",
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "errors": {
                    "description": "A collection of errors",
                    "items": {
                        "$ref": "#/definitions/location/definitions/error"
                    },
                    "type": [
                        "array"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/location/definitions/uid"
                },
                "name": {
                    "description": "the name of the location",
                    "example": "HarkenHealth Wicker Park",
                    "maxLength": 255,
                    "minLength": 3,
                    "type": [
                        "string"
                    ]
                },
                "phone": {
                    "description": "A phone number for the location",
                    "example": "617-123-5555",
                    "pattern": "^[0-9]{3}-[0-9]{3}-[0-9]{4}$",
                    "type": [
                        "string"
                    ]
                },
                "reference_id": {
                    "description": "A unique identifer for the request. This can be useful for debuggin and logging.",
                    "example": "517b00b9-a469-87a0-fdb2-65983f733c54",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "show_response": {
                    "description": "Response to a show request",
                    "oneOf": [
                        {
                            "additionalProperties": false,
                            "description": "A success response to a show request.",
                            "properties": {
                                "location": {
                                    "$ref": "#/definitions/location"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/location/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "location"
                            ],
                            "type": [
                                "object"
                            ]
                        },
                        {
                            "additionalProperties": false,
                            "description": "A failure response to a show request.",
                            "properties": {
                                "errors": {
                                    "$ref": "#/definitions/location/definitions/errors"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/location/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "errors"
                            ],
                            "type": [
                                "object"
                            ]
                        }
                    ],
                    "properties": {
                        "location": {
                            "$ref": "#/definitions/location"
                        },
                        "reference_id": {
                            "$ref": "#/definitions/location/definitions/reference_id"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "state": {
                    "description": "The state of a street address",
                    "example": "MA",
                    "maxLength": 2,
                    "minLength": 2,
                    "type": [
                        "string"
                    ]
                },
                "street_line_1": {
                    "description": "first line of a street address",
                    "example": "33 day st.",
                    "maxLength": 255,
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "street_line_2": {
                    "description": "second line of a street address",
                    "example": "unit #333",
                    "maxLength": 255,
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "uid": {
                    "description": "unique identifier of a location",
                    "example": "63268a3fd22b4e1b9d806bbc424b010b",
                    "pattern": "^[0-9a-f]{32}$",
                    "type": [
                        "string"
                    ]
                },
                "zip": {
                    "description": "The zip of a street address",
                    "example": "01232",
                    "maxLength": 10,
                    "minLength": 5,
                    "type": [
                        "string"
                    ]
                }
            },
            "description": "A Location resource represents a physical location with an address",
            "links": [
                {
                    "description": "Retrieve a location",
                    "href": "/locations/{(%23%2Fdefinitions%2Flocation%2Fdefinitions%2Fidentity)}",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instance",
                    "targetSchema": {
                        "$ref": "#/definitions/location/definitions/show_response"
                    },
                    "title": "Show"
                }
            ],
            "properties": {
                "address": {
                    "$ref": "#/definitions/location/definitions/address"
                },
                "name": {
                    "$ref": "#/definitions/location/definitions/name"
                },
                "phone": {
                    "$ref": "#/definitions/location/definitions/phone"
                },
                "uid": {
                    "$ref": "#/definitions/location/definitions/uid"
                }
            },
            "required": [
                "uid",
                "name"
            ],
            "title": "Location",
            "type": [
                "object"
            ]
        },
        "patient": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "additionalProperties": false,
            "definitions": {
                "care_team": {
                    "description": "A collection of staff members that, with the patient, make up the patient's care team",
                    "items": {
                        "$ref": "#/definitions/patient/definitions/staff_member"
                    },
                    "type": [
                        "array"
                    ]
                },
                "dob": {
                    "description": "the patient's date of birth",
                    "example": "1960-01-09",
                    "maxLength": 10,
                    "minLength": 10,
                    "type": [
                        "string"
                    ]
                },
                "error": {
                    "description": "An error explaining why an action failed",
                    "example": "Icis::Error(Couldn't find Location with 'id'=99)",
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "error_response": {
                    "additionalProperties": false,
                    "description": "Error response to a show or search request",
                    "properties": {
                        "errors": {
                            "$ref": "#/definitions/patient/definitions/errors"
                        },
                        "reference_id": {
                            "$ref": "#/definitions/patient/definitions/reference_id"
                        }
                    },
                    "required": [
                        "reference_id",
                        "errors"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "errors": {
                    "description": "A collection of errors",
                    "items": {
                        "$ref": "#/definitions/patient/definitions/error"
                    },
                    "type": [
                        "array"
                    ]
                },
                "first_name": {
                    "description": "the first name",
                    "example": "Severus",
                    "maxLength": 255,
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "guid": {
                    "description": "unique identifier of a patient",
                    "example": "265983f733c54517b00b9a46987a0fdb",
                    "pattern": "^[0-9a-f]{32}$",
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/patient/definitions/guid"
                },
                "last_name": {
                    "description": "the last name",
                    "example": "Snape",
                    "maxLength": 255,
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "patient_app_shared": {
                    "description": "Identifies if the patient app will have content if embedded.",
                    "example": true,
                    "type": [
                        "boolean"
                    ]
                },
                "patient_response": {
                    "additionalProperties": false,
                    "description": "Successful response to a show or search request",
                    "properties": {
                        "patient": {
                            "$ref": "#/definitions/patient"
                        },
                        "reference_id": {
                            "$ref": "#/definitions/patient/definitions/reference_id"
                        }
                    },
                    "required": [
                        "reference_id",
                        "patient"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "practice": {
                    "description": "The Practice to which the patient belongs.",
                    "properties": {
                        "uid": {
                            "$ref": "#/definitions/practice/definitions/uid"
                        }
                    },
                    "required": [
                        "uid"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "preferred_location": {
                    "description": "The patient's preferred location to visit with Care Team.",
                    "properties": {
                        "uid": {
                            "$ref": "#/definitions/location/definitions/uid"
                        }
                    },
                    "required": [
                        "uid"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "primary_insurance_number": {
                    "description": "The insurance member id",
                    "example": "15004695201",
                    "type": [
                        "string"
                    ]
                },
                "reference_id": {
                    "description": "A unique identifer for the request. This can be useful for debuggin and logging.",
                    "example": "517b00b9-a469-87a0-fdb2-65983f733c54",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "search_payload": {
                    "additionalProperties": false,
                    "description": "The expected payload for a search request",
                    "properties": {
                        "dob": {
                            "$ref": "#/definitions/patient/definitions/dob"
                        },
                        "first_name": {
                            "$ref": "#/definitions/patient/definitions/first_name"
                        },
                        "last_name": {
                            "$ref": "#/definitions/patient/definitions/last_name"
                        },
                        "primary_insurance_number": {
                            "$ref": "#/definitions/patient/definitions/primary_insurance_number"
                        }
                    },
                    "required": [
                        "primary_insurance_number",
                        "dob",
                        "first_name",
                        "last_name"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "show_response": {
                    "additionalProperties": false,
                    "description": "Result of a get request. Can be either a success or a failure.",
                    "oneOf": [
                        {
                            "$ref": "#/definitions/patient/definitions/patient_response"
                        },
                        {
                            "$ref": "#/definitions/patient/definitions/error_response"
                        }
                    ],
                    "optionalProperties": {
                        "patient": {
                            "$ref": "#/definitions/patient"
                        },
                        "reference_id": {
                            "$ref": "#/definitions/patient/definitions/reference_id"
                        }
                    },
                    "properties": {
                        "patient": {
                            "$ref": "#/definitions/patient"
                        },
                        "reference_id": {
                            "$ref": "#/definitions/patient/definitions/reference_id"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "staff_member": {
                    "description": "A Staff Member at a practice",
                    "properties": {
                        "uid": {
                            "$ref": "#/definitions/staff_member/definitions/uid"
                        }
                    },
                    "required": [
                        "uid"
                    ],
                    "type": [
                        "object"
                    ]
                }
            },
            "description": "A Patient at a practice",
            "links": [
                {
                    "description": "Retrieve a patient",
                    "href": "/patients/{(%23%2Fdefinitions%2Fpatient%2Fdefinitions%2Fidentity)}",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instance",
                    "targetSchema": {
                        "$ref": "#/definitions/patient/definitions/show_response"
                    },
                    "title": "Show"
                },
                {
                    "description": "Search for a patient",
                    "href": "/patients/search",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instance",
                    "schema": {
                        "$ref": "#/definitions/patient/definitions/search_payload"
                    },
                    "targetSchema": {
                        "$ref": "#/definitions/patient/definitions/show_response"
                    },
                    "title": "Search"
                }
            ],
            "properties": {
                "care_team": {
                    "$ref": "#/definitions/patient/definitions/care_team"
                },
                "dob": {
                    "$ref": "#/definitions/patient/definitions/dob"
                },
                "first_name": {
                    "$ref": "#/definitions/patient/definitions/first_name"
                },
                "guid": {
                    "$ref": "#/definitions/patient/definitions/guid"
                },
                "last_name": {
                    "$ref": "#/definitions/patient/definitions/last_name"
                },
                "patient_app_shared": {
                    "$ref": "#/definitions/patient/definitions/patient_app_shared"
                },
                "practice": {
                    "$ref": "#/definitions/patient/definitions/practice"
                },
                "preferred_location": {
                    "$ref": "#/definitions/patient/definitions/preferred_location"
                }
            },
            "required": [
                "guid",
                "first_name",
                "last_name",
                "dob"
            ],
            "title": "Patient",
            "type": [
                "object"
            ]
        },
        "practice": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "additionalProperties": false,
            "definitions": {
                "error": {
                    "description": "An error explaining why an action failed",
                    "example": "Icis::Error(Couldn't find Practice with 'id'=99)",
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "errors": {
                    "description": "A collection of errors",
                    "items": {
                        "$ref": "#/definitions/practice/definitions/error"
                    },
                    "type": [
                        "array"
                    ]
                },
                "get_response": {
                    "description": "Response to a show request",
                    "oneOf": [
                        {
                            "additionalProperties": false,
                            "description": "A success response to a show request.",
                            "properties": {
                                "practice": {
                                    "$ref": "#/definitions/practice"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/practice/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "practice"
                            ],
                            "type": [
                                "object"
                            ]
                        },
                        {
                            "additionalProperties": false,
                            "description": "A failure response to a show request.",
                            "properties": {
                                "errors": {
                                    "$ref": "#/definitions/practice/definitions/errors"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/practice/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "errors"
                            ],
                            "type": [
                                "object"
                            ]
                        }
                    ],
                    "properties": {
                        "practice": {
                            "$ref": "#/definitions/practice"
                        },
                        "reference_id": {
                            "$ref": "#/definitions/location/definitions/reference_id"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/practice/definitions/uid"
                },
                "locations": {
                    "description": "A collection of location resources associated with the practice.",
                    "items": {
                        "$ref": "#/definitions/location"
                    },
                    "type": [
                        "array"
                    ]
                },
                "name": {
                    "description": "the name of the practice",
                    "example": "HarkenHealth Chicago",
                    "maxLength": 255,
                    "minLength": 3,
                    "type": [
                        "string"
                    ]
                },
                "reference_id": {
                    "description": "A unique identifer for the request. This can be useful for debuggin and logging.",
                    "example": "517b00b9-a469-87a0-fdb2-65983f733c54",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "uid": {
                    "description": "unique identifier of a practice",
                    "example": "f78ff4140b49430b9033ff1deb65d20b",
                    "pattern": "^[0-9a-f]{32}$",
                    "type": [
                        "string"
                    ]
                }
            },
            "description": "A Practice resource represents an entity with a shared staff across multiple locations.",
            "links": [
                {
                    "description": "Retrieve a practice",
                    "href": "/practices/{(%23%2Fdefinitions%2Fpractice%2Fdefinitions%2Fidentity)}",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instance",
                    "targetSchema": {
                        "$ref": "#/definitions/practice/definitions/get_response"
                    },
                    "title": "Show"
                }
            ],
            "properties": {
                "locations": {
                    "$ref": "#/definitions/practice/definitions/locations"
                },
                "name": {
                    "$ref": "#/definitions/practice/definitions/name"
                },
                "uid": {
                    "$ref": "#/definitions/practice/definitions/uid"
                }
            },
            "required": [
                "uid",
                "name"
            ],
            "title": "Practice",
            "type": [
                "object"
            ]
        },
        "staff_member": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "additionalProperties": false,
            "definitions": {
                "degree": {
                    "description": "The degree level of the staff member",
                    "example": "RN",
                    "maxLength": 255,
                    "type": [
                        "null",
                        "string"
                    ]
                },
                "error": {
                    "description": "An error explaining why an action failed",
                    "example": "Icis::Error(Couldn't find Location with 'id'=99)",
                    "minLength": 1,
                    "type": [
                        "string"
                    ]
                },
                "errors": {
                    "description": "A collection of errors",
                    "items": {
                        "$ref": "#/definitions/staff_member/definitions/error"
                    },
                    "type": [
                        "array"
                    ]
                },
                "first_name": {
                    "description": "the first name",
                    "example": "Liz",
                    "maxLength": 255,
                    "minLength": 2,
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/staff_member/definitions/uid"
                },
                "index_response": {
                    "description": "Response to an index request",
                    "oneOf": [
                        {
                            "additionalProperties": false,
                            "description": "A success response to an index request.",
                            "properties": {
                                "reference_id": {
                                    "$ref": "#/definitions/staff_member/definitions/reference_id"
                                },
                                "staff_members": {
                                    "$ref": "#/definitions/staff_member/definitions/staff_members"
                                }
                            },
                            "required": [
                                "reference_id",
                                "staff_members"
                            ],
                            "type": [
                                "object"
                            ]
                        },
                        {
                            "additionalProperties": false,
                            "description": "A failure response to an index request.",
                            "properties": {
                                "errors": {
                                    "$ref": "#/definitions/staff_member/definitions/errors"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/staff_member/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "errors"
                            ],
                            "type": [
                                "object"
                            ]
                        }
                    ],
                    "properties": {
                        "reference_id": {
                            "$ref": "#/definitions/staff_member/definitions/reference_id"
                        },
                        "staff_members": {
                            "$ref": "#/definitions/staff_member/definitions/staff_members"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "last_name": {
                    "description": "the last name",
                    "example": "Lemon",
                    "maxLength": 255,
                    "minLength": 2,
                    "type": [
                        "string"
                    ]
                },
                "location": {
                    "description": "One of possibly may physical locations of a practice.",
                    "properties": {
                        "uid": {
                            "$ref": "#/definitions/location/definitions/uid"
                        }
                    },
                    "required": [
                        "uid"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "photo": {
                    "description": "A photo",
                    "example": "https://s3.amazonaws.com/snowflake-staging/photos/44/small.jpg",
                    "format": "uri",
                    "type": [
                        "string"
                    ]
                },
                "photos": {
                    "additionalProperties": false,
                    "description": "The staff member's photo in different dimensions",
                    "properties": {
                        "large": {
                            "$ref": "#/definitions/staff_member/definitions/photo"
                        },
                        "medium": {
                            "$ref": "#/definitions/staff_member/definitions/photo"
                        },
                        "small": {
                            "$ref": "#/definitions/staff_member/definitions/photo"
                        }
                    },
                    "required": [
                        "small",
                        "medium",
                        "large"
                    ],
                    "type": [
                        "object"
                    ]
                },
                "reference_id": {
                    "description": "A unique identifer for the request. This can be useful for debuggin and logging.",
                    "example": "517b00b9-a469-87a0-fdb2-65983f733c54",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "role": {
                    "description": "The clinical role the staff member holds within the practice.",
                    "enum": [
                        "Provider",
                        "Health Coach",
                        "Specialist",
                        "ROBOT"
                    ],
                    "example": "Specialist",
                    "type": [
                        "string"
                    ]
                },
                "show_response": {
                    "description": "Response to an show request",
                    "oneOf": [
                        {
                            "additionalProperties": false,
                            "description": "A success response to an index request.",
                            "properties": {
                                "reference_id": {
                                    "$ref": "#/definitions/staff_member/definitions/reference_id"
                                },
                                "staff_member": {
                                    "$ref": "#/definitions/staff_member"
                                }
                            },
                            "required": [
                                "reference_id",
                                "staff_member"
                            ],
                            "type": [
                                "object"
                            ]
                        },
                        {
                            "additionalProperties": false,
                            "description": "A failure response to an index request.",
                            "properties": {
                                "errors": {
                                    "$ref": "#/definitions/staff_member/definitions/errors"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/staff_member/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "errors"
                            ],
                            "type": [
                                "object"
                            ]
                        }
                    ],
                    "properties": {
                        "reference_id": {
                            "$ref": "#/definitions/staff_member/definitions/reference_id"
                        },
                        "staff_member": {
                            "$ref": "#/definitions/staff_member"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "speciality": {
                    "additionalProperties": false,
                    "description": "The associated speciality if a staff member is a specialist.",
                    "properties": {
                        "name": {
                            "$ref": "#/definitions/staff_member/definitions/speciality_name"
                        },
                        "uid": {
                            "$ref": "#/definitions/staff_member/definitions/uid"
                        }
                    },
                    "required": [
                        "uid",
                        "name"
                    ],
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "speciality_name": {
                    "description": "The speciality",
                    "example": "Nutritionist",
                    "maxLength": 255,
                    "minLength": 2,
                    "type": [
                        "string"
                    ]
                },
                "staff_members": {
                    "description": "A collection of staff",
                    "items": {
                        "$ref": "#/definitions/staff_member"
                    },
                    "type": [
                        "array"
                    ]
                },
                "suffix": {
                    "description": "The suffix to use when displaying name (this can be used in addition to degree",
                    "example": "MD",
                    "maxLength": 255,
                    "type": [
                        "null",
                        "string"
                    ]
                },
                "uid": {
                    "description": "unique identifier of a staff member",
                    "example": "ef63894da35641189b3fc1bf5b931202",
                    "pattern": "^[0-9a-f]{32}$",
                    "type": [
                        "string"
                    ]
                }
            },
            "description": "A Staff Member at a practice",
            "links": [
                {
                    "description": "Retrieve a staff member",
                    "href": "/staff_members/{(%23%2Fdefinitions%2Fstaff_member%2Fdefinitions%2Fidentity)}",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instance",
                    "targetSchema": {
                        "$ref": "#/definitions/staff_member/definitions/show_response"
                    },
                    "title": "Show"
                },
                {
                    "description": "Retrieve staff members",
                    "href": "/staff_members",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instances",
                    "schema": {
                        "properties": {
                            "location_uid": {
                                "$ref": "#/definitions/location/definitions/uid"
                            },
                            "practice_uid": {
                                "$ref": "#/definitions/practice/definitions/uid"
                            },
                            "uids": {
                                "items": {
                                    "$ref": "#/definitions/staff_member/definitions/uid"
                                },
                                "type": [
                                    "array"
                                ]
                            }
                        },
                        "type": [
                            "object"
                        ]
                    },
                    "targetSchema": {
                        "$ref": "#/definitions/staff_member/definitions/index_response"
                    },
                    "title": "Index"
                }
            ],
            "properties": {
                "default_location": {
                    "$ref": "#/definitions/staff_member/definitions/location"
                },
                "degree": {
                    "$ref": "#/definitions/staff_member/definitions/degree"
                },
                "first_name": {
                    "$ref": "#/definitions/staff_member/definitions/first_name"
                },
                "last_name": {
                    "$ref": "#/definitions/staff_member/definitions/last_name"
                },
                "photos": {
                    "$ref": "#/definitions/staff_member/definitions/photos"
                },
                "role": {
                    "$ref": "#/definitions/staff_member/definitions/role"
                },
                "speciality": {
                    "$ref": "#/definitions/staff_member/definitions/speciality"
                },
                "suffix": {
                    "$ref": "#/definitions/staff_member/definitions/suffix"
                },
                "uid": {
                    "$ref": "#/definitions/staff_member/definitions/uid"
                }
            },
            "required": [
                "uid",
                "first_name",
                "last_name",
                "role",
                "photos"
            ],
            "title": "Staff Member Resource",
            "type": [
                "object"
            ]
        },
        "state_of_health": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "additionalProperties": false,
            "definitions": {
                "created_at": {
                    "description": "The time at which the value was stored in ICIS",
                    "example": "1990-12-31T15:59:60-08:00",
                    "format": "date-time",
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/state_of_health/definitions/uid"
                },
                "reference_id": {
                    "description": "A unique identifer for the request. This can be useful for debuggin and logging.",
                    "example": "517b00b9-a469-87a0-fdb2-65983f733c54",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "state_of_health_response": {
                    "description": "Response to an state of health show request",
                    "oneOf": [
                        {
                            "additionalProperties": false,
                            "description": "A successful response.",
                            "properties": {
                                "reference_id": {
                                    "$ref": "#/definitions/patient/definitions/reference_id"
                                },
                                "state_of_health": {
                                    "$ref": "#/definitions/state_of_health"
                                }
                            },
                            "required": [
                                "reference_id",
                                "state_of_health"
                            ],
                            "type": [
                                "object"
                            ]
                        },
                        {
                            "additionalProperties": false,
                            "description": "A failed response.",
                            "properties": {
                                "errors": {
                                    "$ref": "#/definitions/patient/definitions/errors"
                                },
                                "reference_id": {
                                    "$ref": "#/definitions/patient/definitions/reference_id"
                                }
                            },
                            "required": [
                                "reference_id",
                                "errors"
                            ],
                            "type": [
                                "object"
                            ]
                        }
                    ],
                    "properties": {
                        "reference_id": {
                            "$ref": "#/definitions/patient/definitions/reference_id"
                        },
                        "state_of_health": {
                            "$ref": "#/definitions/state_of_health"
                        }
                    },
                    "type": [
                        "object"
                    ]
                },
                "uid": {
                    "description": "unique identifier of a state of health recording",
                    "example": "bebe83f733c54517b00bbebe987a0fdb",
                    "pattern": "^[0-9a-f]{32}$",
                    "type": [
                        "string"
                    ]
                },
                "value": {
                    "description": "A number between 1-10.",
                    "example": 5,
                    "maxValue": 10,
                    "minValue": 1,
                    "type": [
                        "integer"
                    ]
                }
            },
            "description": "A StateOfHealth Resource for a Patient.",
            "links": [
                {
                    "description": "Retrieve a patient's latest State of Health",
                    "href": "/patients/{(%23%2Fdefinitions%2Fpatient%2Fdefinitions%2Fidentity)}/state_of_health",
                    "http_header": {
                        "X-API-KEY": "fb0d2f7a-9a15-4cce-8822-0e92d2a9a2a0",
                        "X-API-SECRET": "98ba7951-bd19-4db2-a9c4-b25387f66f31"
                    },
                    "method": "GET",
                    "rel": "instance",
                    "targetSchema": {
                        "$ref": "#/definitions/state_of_health/definitions/state_of_health_response"
                    },
                    "title": "State of Health Show"
                },
                {
                    "description": "Creates a new State of Health resourse for a patient",
                    "href": "/patients/{(%23%2Fdefinitions%2Fpatient%2Fdefinitions%2Fidentity)}/state_of_health",
                    "method": "POST",
                    "rel": "create",
                    "schema": {
                        "additionalProperties": false,
                        "properties": {
                            "value": {
                                "$ref": "#/definitions/state_of_health/definitions/value"
                            }
                        },
                        "required": [
                            "value"
                        ],
                        "type": [
                            "object"
                        ]
                    },
                    "targetSchema": {
                        "$ref": "#/definitions/state_of_health/definitions/state_of_health_response"
                    },
                    "title": "State of Health Create"
                }
            ],
            "properties": {
                "created_at": {
                    "$ref": "#/definitions/state_of_health/definitions/created_at"
                },
                "value": {
                    "$ref": "#/definitions/state_of_health/definitions/value"
                }
            },
            "required": [
                "value"
            ],
            "title": "State of Health",
            "type": [
                "object"
            ]
        }
    },
    "description": "ICIS API v20150918",
    "links": [
        {
            "href": "https://api.icisapp.com/v20150918",
            "rel": "self"
        }
    ],
    "properties": {
        "emergency_contact": {
            "$ref": "#/definitions/emergency_contact"
        },
        "location": {
            "$ref": "#/definitions/location"
        },
        "patient": {
            "$ref": "#/definitions/patient"
        },
        "practice": {
            "$ref": "#/definitions/practice"
        },
        "staff_member": {
            "$ref": "#/definitions/staff_member"
        },
        "state_of_health": {
            "$ref": "#/definitions/state_of_health"
        }
    },
    "title": "ICIS API v20150918",
    "type": [
        "object"
    ]
}