{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://hl7.org/fhir/json-schema/ResearchSubject",
  "$ref": "#/definitions/ResearchSubject",
  "description": "see http://hl7.org/fhir/json.html#schema for information about the FHIR Json Schemas",
  "definitions": {
    "ResearchSubject": {
      "allOf": [
        {
          "$ref": "DomainResource#/definitions/DomainResource"
        },
        {
          "description": "A physical entity which is the primary unit of operational and/or administrative interest in a study.",
          "properties": {
            "resourceType": {
              "description": "This is a ResearchSubject resource",
              "type": "string",
              "const": "ResearchSubject",
              "enum": [
                "ResearchSubject"
              ]
            },
            "identifier": {
              "description": "Identifiers assigned to this research subject for a study.",
              "type": "array",
              "items": {
                "$ref": "Identifier.schema.json#/definitions/Identifier"
              }
            },
            "status": {
              "description": "The current state of the subject.",
              "enum": [
                "candidate",
                "eligible",
                "follow-up",
                "ineligible",
                "not-registered",
                "off-study",
                "on-study",
                "on-study-intervention",
                "on-study-observation",
                "pending-on-study",
                "potential-candidate",
                "screening",
                "withdrawn"
              ],
              "type": "string"
            },
            "_status": {
              "description": "Extensions for status",
              "$ref": "Element.schema.json#/definitions/Element"
            },
            "period": {
              "description": "The dates the subject began and ended their participation in the study.",
              "$ref": "Period.schema.json#/definitions/Period"
            },
            "study": {
              "description": "Reference to the study the subject is participating in.",
              "$ref": "Reference.schema.json#/definitions/Reference"
            },
            "individual": {
              "description": "The record of the person or animal who is involved in the study.",
              "$ref": "Reference.schema.json#/definitions/Reference"
            },
            "assignedArm": {
              "description": "The name of the arm in the study the subject is expected to follow as part of this study.",
              "type": "string",
              "pattern": "\\s*(\\S|\\s)*"
            },
            "_assignedArm": {
              "description": "Extensions for assignedArm",
              "$ref": "Element.schema.json#/definitions/Element"
            },
            "actualArm": {
              "description": "The name of the arm in the study the subject actually followed as part of this study.",
              "type": "string",
              "pattern": "\\s*(\\S|\\s)*"
            },
            "_actualArm": {
              "description": "Extensions for actualArm",
              "$ref": "Element.schema.json#/definitions/Element"
            },
            "consent": {
              "description": "A record of the patient\u0027s informed agreement to participate in the study.",
              "$ref": "Reference.schema.json#/definitions/Reference"
            }
          },
          "required": [
            "study",
            "individual",
            "resourceType"
          ]
        }
      ]
    }
  }
}