{
    "definitions": {
        "patient": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "dob": {
                    "description": "The patients date of birth",
                    "example": "2012-01-01T12:00:00Z",
                    "format": "date-time",
                    "type": [
                        "string"
                    ]
                },
                "email": {
                    "description": "The patients email",
                    "example": "gorby.puff.puff.thunderhorse@gmail.com",
                    "type": [
                        "string"
                    ]
                },
                "first_name": {
                    "description": "The first name of the patient",
                    "example": "Gorby",
                    "type": [
                        "string"
                    ]
                },
                "guid": {
                    "description": "unique identifier of patient",
                    "example": "adsgjh2352462cah23jh23asd4avb",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "id": {
                    "description": "internal ID of the patient",
                    "example": 4,
                    "type": [
                        "integer"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/patient/definitions/guid"
                },
                "last_name": {
                    "description": "The last name of the patient",
                    "example": "Puff",
                    "type": [
                        "string"
                    ]
                },
                "middle_name": {
                    "description": "The middle name of the patient",
                    "example": "Puffy",
                    "type": [
                        "string"
                    ]
                },
                "nickname": {
                    "description": "The patients preferred nickname",
                    "example": "Ser Gorbechov Puff Puff the Third",
                    "type": [
                        "string"
                    ]
                }
            },
            "description": "Resource for creating a patient.",
            "links": [
                {
                    "description": "Create a new patient.",
                    "href": "/patients",
                    "method": "POST",
                    "rel": "create",
                    "schema": {
                        "properties": {
                            "guid": {
                                "$ref": "#/definitions/patient/definitions/guid"
                            }
                        },
                        "type": [
                            "object"
                        ]
                    },
                    "title": "Create"
                },
                {
                    "description": "Search for a patient via first or last name",
                    "href": "/patients/actions/autocomplete",
                    "method": "GET",
                    "rel": "instances",
                    "schema": {
                        "properties": {
                            "practice_id": {
                                "description": "The practice_id to narrow the query down by",
                                "example": 4,
                                "type": [
                                    "integer"
                                ]
                            },
                            "query": {
                                "description": "part of the patients first, last, middle, or nickname, at least 3 characters",
                                "example": "Gorb",
                                "type": [
                                    "string"
                                ]
                            }
                        },
                        "required": [
                            "practice_id",
                            "query"
                        ]
                    },
                    "title": "Autocomplete"
                }
            ],
            "properties": {
                "dob": {
                    "$ref": "#/definitions/patient/definitions/dob"
                },
                "email": {
                    "$ref": "#/definitions/patient/definitions/email"
                },
                "first_name": {
                    "$ref": "#/definitions/patient/definitions/first_name"
                },
                "guid": {
                    "$ref": "#/definitions/patient/definitions/guid"
                },
                "id": {
                    "$ref": "#/definitions/patient/definitions/id"
                },
                "last_name": {
                    "$ref": "#/definitions/patient/definitions/last_name"
                },
                "middle_name": {
                    "$ref": "#/definitions/patient/definitions/middle_name"
                },
                "nickname": {
                    "$ref": "#/definitions/patient/definitions/nickname"
                }
            },
            "title": "Patient Resource",
            "type": [
                "object"
            ]
        }
    },
    "description": "Patients API v3",
    "links": [
        {
            "href": "https://production.icisapp.com/api/patients/v3",
            "rel": "self"
        }
    ],
    "properties": {
        "patient": {
            "$ref": "#/definitions/patient"
        }
    },
    "title": "Patients API v3",
    "type": [
        "object"
    ]
}