{
  "description": "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.",
  "type": "object",
  "properties": {
    "resourceType": {
      "description": "This is a Questionnaire resource",
      "type": "string",
      "enum": [
        "Questionnaire"
      ],
      "title": "Resource type",
      "widget": {"id": "hidden"}
    },
    "id": {
      "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
      "title": "Id",
      "pattern": "^[A-Za-z0-9\\-\\.]{1,64}$",
      "type": "string",
      "widget": {"id": "hidden"}
    },
    "meta": {
      "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
      "title": "Meta",
      "$ref": "#/definitions/Meta",
      "widget": {"id": "hidden"}
    },
    "implicitRules": {
      "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
      "title": "Implicit rules",
      "pattern": "^\\S*$",
      "type": "string"
    },
    "language": {
      "description": "The base language in which the resource is written.",
      "title": "Language",
      "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
      "type": "string",
      "widget": {
        "id": "string",
        "labelPosition": "left",
        "labelClasses": "col-sm-2 m-0 ps-0 pe-1",
        "controlClasses": "col-sm-10 m-0 p-0",
      }
    },
    "text": {
      "description": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
      "title": "Text",
      "properties": {
        "id": {
          "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
          "pattern": "^[ \\r\\n\\t\\S]+$",
          "type": "string"
        },
        "extension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
          "items": {
            "$ref": "#/definitions/Extension"
          },
          "type": "array",
          "widget": {
            "id": "hidden"
          }
        },
        "status": {
          "description": "The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data.",
          "enum": [
            "generated",
            "extensions",
            "additional",
            "empty"
          ],
          "type": "string"
        },
        "div": {
          "description": "The actual narrative content, a stripped down version of XHTML.",
          "pattern": "^[ \\r\\n\\t\\S]+$",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "div"
      ],
      "type": "object"
    },
    "__$extensionContainer": {
      "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "type": "string",
      "widget": {
        "id": "extension-container",
      }
    },
    "extension": {
      "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "items": {
        "$ref": "#/definitions/Extension"
      },
      "type": "array",
      "title": "Extensions",
      "widget": {
        "id": "extension"
      }
    },
    "modifierExtension": {
      "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "items": {
        "$ref": "#/definitions/Extension"
      },
      "type": "array",
      "title": "Modifier extension",
      "widget": {
        "id": "hidden"
      }
    },
    "url": {
      "description": "An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers.",
      "title": "URL",
      "type": "string",
      "pattern": "^\\S*$"
    },
    "identifier": {
      "description": "A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.",
      "items": {
        "description": "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.",
        "properties": {
          "id": {
            "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "extension": {
            "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "items": {
              "$ref": "#/definitions/Extension"
            },
            "type": "array",
            "widget": {
              "id": "hidden"
            }
          },
          "use": {
            "description": "The purpose of this identifier.",
            "enum": [
              "usual",
              "official",
              "temp",
              "secondary",
              "old"
            ],
            "type": "string"
          },
          "type": {
            "description": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "coding": {
                "description": "A reference to a code defined by a terminology system.",
                "items": {
                  "description": "A reference to a code defined by a terminology system.",
                  "properties": {
                    "id": {
                      "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "widget": {
                        "id": "hidden"
                      },
                      "pattern": "^[ \\r\\n\\t\\S]+$",
                      "type": "string"
                    },
                    "extension": {
                      "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                      "items": {
                        "$ref": "#/definitions/Extension"
                      },
                      "type": "array",
                      "widget": {
                        "id": "hidden"
                      }
                    },
                    "system": {
                      "description": "The identification of the code system that defines the meaning of the symbol in the code.",
                      "pattern": "^\\S*$",
                      "type": "string"
                    },
                    "version": {
                      "description": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
                      "widget": {
                        "id": "hidden"
                      },
                      "pattern": "^[ \\r\\n\\t\\S]+$",
                      "type": "string"
                    },
                    "code": {
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
                      "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
                      "type": "string"
                    },
                    "display": {
                      "description": "A representation of the meaning of the code in the system, following the rules of the system.",
                      "pattern": "^[ \\r\\n\\t\\S]+$",
                      "type": "string"
                    },
                    "userSelected": {
                      "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
                      "pattern": "^true|false$",
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "type": "object"
                },
                "type": "array"
              },
              "text": {
                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          "system": {
            "description": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
            "pattern": "^\\S*$",
            "type": "string"
          },
          "value": {
            "description": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "period": {
            "description": "Time period during which identifier is/was valid for use.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "start": {
                "description": "The start of the period. The boundary is inclusive.",
                "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
                "type": "string"
              },
              "end": {
                "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.",
                "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          "assigner": {
            "description": "Organization that issued/manages the identifier.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "reference": {
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "type": {
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
                "pattern": "^\\S*$",
                "type": "string"
              },
              "display": {
                "description": "Plain text narrative that identifies the resource in addition to the resource reference.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "type": "object"
          }
        },
        "additionalProperties": false,
        "type": "object"
      },
      "type": "array"
    },
    "version": {
      "description": "The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.",
      "title": "Version",
      "pattern": "^[ \\r\\n\\t\\S]+$",
      "type": "string"
    },
    "name": {
      "description": "A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
      "title": "Name",
      "pattern": "^[ \\r\\n\\t\\S]+$",
      "type": "string"
    },
    "title": {
      "description": "A short, descriptive, user-friendly title for the questionnaire.",
      "title": "Title",
      "pattern": "^[ \\r\\n\\t\\S]+$",
      "type": "string"
    },
    "derivedFrom": {
      "description": "The URL of a Questionnaire that this Questionnaire is based on.",
      "items": {
        "pattern": "^\\S*$",
        "type": "string",
        "description": "A URI that is a reference to a canonical URL on a FHIR resource"
      },
      "type": "array",
      "title": "Derived from"
    },
    "status": {
      "description": "The status of this questionnaire. Enables tracking the life-cycle of the content.",
      "enum": [
        "draft",
        "active",
        "retired",
        "unknown"
      ],
      "type": "string",
      "title": "Status",
      "widget": {
        "id": "lb-radio",
        "layout": "row",
        "labelPosition": "left",
        "labelClasses": "col-2 ps-0 pe-1",
        "controlClasses": "col-auto ps-0 btn-group btn-group-sm"
      }
    },
    "experimental": {
      "description": "A Boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
      "title": "Experimental",
      "pattern": "^true|false$",
      "type": "boolean"
    },
    "subjectType": {
      "description": "The types of subjects that can be the subject of responses created for the questionnaire.",
      "items": {
        "type": "string",
        "oneOf": [
          { "enum": ["Account"], "description": "Account", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ActivityDefinition"], "description": "ActivityDefinition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ActorDefinition"], "description": "ActorDefinition", "versions": ["R5", "R6"] },
          { "enum": ["AdministrableProductDefinition"], "description": "AdministrableProductDefinition", "versions": ["R5", "R6"] },
          { "enum": ["AdverseEvent"], "description": "AdverseEvent", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["AllergyIntolerance"], "description": "AllergyIntolerance", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Appointment"], "description": "Appointment", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["AppointmentResponse"], "description": "AppointmentResponse", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ArtifactAssessment"], "description": "ArtifactAssessment", "versions": ["R5", "R6"] },
          { "enum": ["AuditEvent"], "description": "AuditEvent", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Basic"], "description": "Basic", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Binary"], "description": "Binary", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["BiologicallyDerivedProduct"], "description": "BiologicallyDerivedProduct", "versions": ["R4", "R5", "R6"] },
          { "enum": ["BiologicallyDerivedProductDispense"], "description": "BiologicallyDerivedProductDispense", "versions": ["R5"] },
          { "enum": ["BodyStructure"], "description": "BodyStructure", "versions": ["R4", "R5", "R6"] },
          { "enum": ["Bundle"], "description": "Bundle", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["CapabilityStatement"], "description": "CapabilityStatement", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["CarePlan"], "description": "CarePlan", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["CareTeam"], "description": "CareTeam", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["CatalogEntry"], "description": "CatalogEntry", "versions": ["R4"] },
          { "enum": ["ChargeItem"], "description": "ChargeItem", "versions": ["R4", "R5"] },
          { "enum": ["ChargeItemDefinition"], "description": "ChargeItemDefinition", "versions": ["R4", "R5"] },
          { "enum": ["Citation"], "description": "Citation", "versions": ["R5"] },
          { "enum": ["Claim"], "description": "Claim", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ClaimResponse"], "description": "ClaimResponse", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ClinicalImpression"], "description": "ClinicalImpression", "versions": ["R3", "R4", "R5"] },
          { "enum": ["ClinicalUseDefinition"], "description": "ClinicalUseDefinition", "versions": ["R5", "R6"] },
          { "enum": ["CodeSystem"], "description": "CodeSystem", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Communication"], "description": "Communication", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["CommunicationRequest"], "description": "CommunicationRequest", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["CompartmentDefinition"], "description": "CompartmentDefinition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Composition"], "description": "Composition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ConceptMap"], "description": "ConceptMap", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Condition"], "description": "Condition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ConditionDefinition"], "description": "ConditionDefinition", "versions": ["R5"] },
          { "enum": ["Consent"], "description": "Consent", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Contract"], "description": "Contract", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Coverage"], "description": "Coverage", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["CoverageEligibilityRequest"], "description": "CoverageEligibilityRequest", "versions": ["R4", "R5", "R6"] },
          { "enum": ["CoverageEligibilityResponse"], "description": "CoverageEligibilityResponse", "versions": ["R4", "R5", "R6"] },
          { "enum": ["DetectedIssue"], "description": "DetectedIssue", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Device"], "description": "Device", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["DeviceAlert"], "description": "DeviceAlert", "versions": ["R6"] },
          { "enum": ["DeviceAssociation"], "description": "DeviceAssociation", "versions": ["R5", "R6"] },
          { "enum": ["DeviceDefinition"], "description": "DeviceDefinition", "versions": ["R4", "R5", "R6"] },
          { "enum": ["DeviceDispense"], "description": "DeviceDispense", "versions": ["R5"] },
          { "enum": ["DeviceMetric"], "description": "DeviceMetric", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["DeviceRequest"], "description": "DeviceRequest", "versions": ["R4", "R5", "R6"] },
          { "enum": ["DeviceUsage"], "description": "DeviceUsage", "versions": ["R5"] },
          { "enum": ["DeviceUseStatement"], "description": "DeviceUseStatement", "versions": ["R3", "R4"] },
          { "enum": ["DiagnosticReport"], "description": "DiagnosticReport", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["DocumentManifest"], "description": "DocumentManifest", "versions": ["R3", "R4"] },
          { "enum": ["DocumentReference"], "description": "DocumentReference", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["EffectEvidenceSynthesis"], "description": "EffectEvidenceSynthesis", "versions": ["R4"] },
          { "enum": ["Encounter"], "description": "Encounter", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["EncounterHistory"], "description": "EncounterHistory", "versions": ["R5"] },
          { "enum": ["Endpoint"], "description": "Endpoint", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["EnrollmentRequest"], "description": "EnrollmentRequest", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["EnrollmentResponse"], "description": "EnrollmentResponse", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["EpisodeOfCare"], "description": "EpisodeOfCare", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["EventDefinition"], "description": "EventDefinition", "versions": ["R4", "R5", "R6"] },
          { "enum": ["Evidence"], "description": "Evidence", "versions": ["R4", "R5", "R6"] },
          { "enum": ["EvidenceReport"], "description": "EvidenceReport", "versions": ["R5"] },
          { "enum": ["EvidenceVariable"], "description": "EvidenceVariable", "versions": ["R4", "R5", "R6"] },
          { "enum": ["ExampleScenario"], "description": "ExampleScenario", "versions": ["R4", "R5", "R6"] },
          { "enum": ["ExplanationOfBenefit"], "description": "ExplanationOfBenefit", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["FamilyMemberHistory"], "description": "FamilyMemberHistory", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Flag"], "description": "Flag", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["FormularyItem"], "description": "FormularyItem", "versions": ["R5"] },
          { "enum": ["GenomicStudy"], "description": "GenomicStudy", "versions": ["R5"] },
          { "enum": ["Goal"], "description": "Goal", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["GraphDefinition"], "description": "GraphDefinition", "versions": ["R3", "R4", "R5"] },
          { "enum": ["Group"], "description": "Group", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["GuidanceResponse"], "description": "GuidanceResponse", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["HealthcareService"], "description": "HealthcareService", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ImagingSelection"], "description": "ImagingSelection", "versions": ["R5", "R6"] },
          { "enum": ["ImagingStudy"], "description": "ImagingStudy", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Immunization"], "description": "Immunization", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ImmunizationEvaluation"], "description": "ImmunizationEvaluation", "versions": ["R4", "R5"] },
          { "enum": ["ImmunizationRecommendation"], "description": "ImmunizationRecommendation", "versions": ["R3", "R4", "R5"] },
          { "enum": ["ImplementationGuide"], "description": "ImplementationGuide", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Ingredient"], "description": "Ingredient", "versions": ["R5", "R6"] },
          { "enum": ["InsurancePlan"], "description": "InsurancePlan", "versions": ["R4", "R5", "R6"] },
          { "enum": ["InsuranceProduct"], "description": "InsuranceProduct", "versions": ["R6"] },
          { "enum": ["InventoryItem"], "description": "InventoryItem", "versions": ["R5"] },
          { "enum": ["InventoryReport"], "description": "InventoryReport", "versions": ["R5"] },
          { "enum": ["Invoice"], "description": "Invoice", "versions": ["R4", "R5", "R6"] },
          { "enum": ["Library"], "description": "Library", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Linkage"], "description": "Linkage", "versions": ["R3", "R4", "R5"] },
          { "enum": ["List"], "description": "List", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Location"], "description": "Location", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ManufacturedItemDefinition"], "description": "ManufacturedItemDefinition", "versions": ["R5", "R6"] },
          { "enum": ["Measure"], "description": "Measure", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MeasureReport"], "description": "MeasureReport", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Media"], "description": "Media", "versions": ["R3", "R4"] },
          { "enum": ["Medication"], "description": "Medication", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MedicationAdministration"], "description": "MedicationAdministration", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MedicationDispense"], "description": "MedicationDispense", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MedicationKnowledge"], "description": "MedicationKnowledge", "versions": ["R4", "R5"] },
          { "enum": ["MedicationRequest"], "description": "MedicationRequest", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MedicationStatement"], "description": "MedicationStatement", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MedicinalProduct"], "description": "MedicinalProduct", "versions": ["R4"] },
          { "enum": ["MedicinalProductAuthorization"], "description": "MedicinalProductAuthorization", "versions": ["R4"] },
          { "enum": ["MedicinalProductContraindication"], "description": "MedicinalProductContraindication", "versions": ["R4"] },
          { "enum": ["MedicinalProductDefinition"], "description": "MedicinalProductDefinition", "versions": ["R5", "R6"] },
          { "enum": ["MedicinalProductIndication"], "description": "MedicinalProductIndication", "versions": ["R4"] },
          { "enum": ["MedicinalProductIngredient"], "description": "MedicinalProductIngredient", "versions": ["R4"] },
          { "enum": ["MedicinalProductInteraction"], "description": "MedicinalProductInteraction", "versions": ["R4"] },
          { "enum": ["MedicinalProductManufactured"], "description": "MedicinalProductManufactured", "versions": ["R4"] },
          { "enum": ["MedicinalProductPackaged"], "description": "MedicinalProductPackaged", "versions": ["R4"] },
          { "enum": ["MedicinalProductPharmaceutical"], "description": "MedicinalProductPharmaceutical", "versions": ["R4"] },
          { "enum": ["MedicinalProductUndesirableEffect"], "description": "MedicinalProductUndesirableEffect", "versions": ["R4"] },
          { "enum": ["MessageDefinition"], "description": "MessageDefinition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MessageHeader"], "description": "MessageHeader", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["MolecularSequence"], "description": "MolecularSequence", "versions": ["R4", "R5"] },
          { "enum": ["NamingSystem"], "description": "NamingSystem", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["NutritionIntake"], "description": "NutritionIntake", "versions": ["R5", "R6"] },
          { "enum": ["NutritionOrder"], "description": "NutritionOrder", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["NutritionProduct"], "description": "NutritionProduct", "versions": ["R5", "R6"] },
          { "enum": ["Observation"], "description": "Observation", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ObservationDefinition"], "description": "ObservationDefinition", "versions": ["R4", "R5", "R6"] },
          { "enum": ["OperationDefinition"], "description": "OperationDefinition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["OperationOutcome"], "description": "OperationOutcome", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Organization"], "description": "Organization", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["OrganizationAffiliation"], "description": "OrganizationAffiliation", "versions": ["R4", "R5", "R6"] },
          { "enum": ["PackagedProductDefinition"], "description": "PackagedProductDefinition", "versions": ["R5", "R6"] },
          { "enum": ["Parameters"], "description": "Parameters", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Patient"], "description": "Patient", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["PaymentNotice"], "description": "PaymentNotice", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["PaymentReconciliation"], "description": "PaymentReconciliation", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Permission"], "description": "Permission", "versions": ["R5"] },
          { "enum": ["Person"], "description": "Person", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["PlanDefinition"], "description": "PlanDefinition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Practitioner"], "description": "Practitioner", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["PractitionerRole"], "description": "PractitionerRole", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Procedure"], "description": "Procedure", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Provenance"], "description": "Provenance", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Questionnaire"], "description": "Questionnaire", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["QuestionnaireResponse"], "description": "QuestionnaireResponse", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["RegulatedAuthorization"], "description": "RegulatedAuthorization", "versions": ["R5", "R6"] },
          { "enum": ["RelatedPerson"], "description": "RelatedPerson", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["RequestGroup"], "description": "RequestGroup", "versions": ["R3", "R4"] },
          { "enum": ["RequestOrchestration"], "description": "RequestOrchestration", "versions": ["R5", "R6"] },
          { "enum": ["Requirements"], "description": "Requirements", "versions": ["R5", "R6"] },
          { "enum": ["ResearchDefinition"], "description": "ResearchDefinition", "versions": ["R4"] },
          { "enum": ["ResearchElementDefinition"], "description": "ResearchElementDefinition", "versions": ["R4"] },
          { "enum": ["ResearchStudy"], "description": "ResearchStudy", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ResearchSubject"], "description": "ResearchSubject", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["RiskAssessment"], "description": "RiskAssessment", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["RiskEvidenceSynthesis"], "description": "RiskEvidenceSynthesis", "versions": ["R4"] },
          { "enum": ["Schedule"], "description": "Schedule", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["SearchParameter"], "description": "SearchParameter", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["ServiceRequest"], "description": "ServiceRequest", "versions": ["R4", "R5", "R6"] },
          { "enum": ["Slot"], "description": "Slot", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Specimen"], "description": "Specimen", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["SpecimenDefinition"], "description": "SpecimenDefinition", "versions": ["R4", "R5", "R6"] },
          { "enum": ["StructureDefinition"], "description": "StructureDefinition", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["StructureMap"], "description": "StructureMap", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["Subscription"], "description": "Subscription", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["SubscriptionStatus"], "description": "SubscriptionStatus", "versions": ["R5", "R6"] },
          { "enum": ["SubscriptionTopic"], "description": "SubscriptionTopic", "versions": ["R5", "R6"] },
          { "enum": ["Substance"], "description": "Substance", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["SubstanceDefinition"], "description": "SubstanceDefinition", "versions": ["R5", "R6"] },
          { "enum": ["SubstanceNucleicAcid"], "description": "SubstanceNucleicAcid", "versions": ["R4", "R5"] },
          { "enum": ["SubstancePolymer"], "description": "SubstancePolymer", "versions": ["R4", "R5"] },
          { "enum": ["SubstanceProtein"], "description": "SubstanceProtein", "versions": ["R4", "R5"] },
          { "enum": ["SubstanceReferenceInformation"], "description": "SubstanceReferenceInformation", "versions": ["R4", "R5"] },
          { "enum": ["SubstanceSourceMaterial"], "description": "SubstanceSourceMaterial", "versions": ["R4", "R5"] },
          { "enum": ["SubstanceSpecification"], "description": "SubstanceSpecification", "versions": ["R4"] },
          { "enum": ["SupplyDelivery"], "description": "SupplyDelivery", "versions": ["R3", "R4", "R5"] },
          { "enum": ["SupplyRequest"], "description": "SupplyRequest", "versions": ["R3", "R4", "R5"] },
          { "enum": ["Task"], "description": "Task", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["TerminologyCapabilities"], "description": "TerminologyCapabilities", "versions": ["R4", "R5", "R6"] },
          { "enum": ["TestPlan"], "description": "TestPlan", "versions": ["R5"] },
          { "enum": ["TestReport"], "description": "TestReport", "versions": ["R3", "R4", "R5"] },
          { "enum": ["TestScript"], "description": "TestScript", "versions": ["R3", "R4", "R5"] },
          { "enum": ["Transport"], "description": "Transport", "versions": ["R5"] },
          { "enum": ["ValueSet"], "description": "ValueSet", "versions": ["R3", "R4", "R5", "R6"] },
          { "enum": ["VerificationResult"], "description": "VerificationResult", "versions": ["R4", "R5"] },
          { "enum": ["VisionPrescription"], "description": "VisionPrescription", "versions": ["R4", "R5", "R6"] }
        ]
      },
      "type": "array",
      "title": "Subject type",
      "widget": {
        "id": "select",
        "labelPosition": "left",
        "labelClasses": "col-sm-2 m-0 ps-0 pe-1",
        "controlClasses": "col p-0 position-relative",
        "autocomplete": true,
        "autocompletePlaceholder": "Search and add resource types",
        "autocompleteOptions": {
          "maxSelect": "*",
          "matchListValue": true
        }
      }
    },
    "date": {
      "description": "The date  (and optionally time) when the questionnaire was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.",
      "title": "Date",
      "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
      "type": "string"
    },
    "publisher": {
      "description": "The name of the organization or individual that published the questionnaire.",
      "title": "Publisher",
      "pattern": "^[ \\r\\n\\t\\S]+$",
      "type": "string"
    },
    "contact": {
      "description": "Contact details to assist a user in finding and communicating with the publisher.",
      "items": {
        "description": "Specifies contact information for a person or organization.",
        "properties": {
          "id": {
            "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "extension": {
            "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "items": {
              "$ref": "#/definitions/Extension"
            },
            "type": "array",
            "widget": {
              "id": "hidden"
            }
          },
          "name": {
            "description": "The name of an individual to contact.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "telecom": {
            "description": "The contact details for the individual (if a name was provided) or the organization.",
            "items": {
              "description": "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.",
              "properties": {
                "id": {
                  "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                  "pattern": "^[ \\r\\n\\t\\S]+$",
                  "type": "string"
                },
                "extension": {
                  "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                  "items": {
                    "$ref": "#/definitions/Extension"
                  },
                  "type": "array",
                  "widget": {
                    "id": "hidden"
                  }
                },
                "system": {
                  "description": "Telecommunications form for contact point - what communications system is required to make use of the contact.",
                  "enum": [
                    "phone",
                    "fax",
                    "email",
                    "pager",
                    "url",
                    "sms",
                    "other"
                  ],
                  "type": "string"
                },
                "value": {
                  "description": "The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).",
                  "pattern": "^[ \\r\\n\\t\\S]+$",
                  "type": "string"
                },
                "use": {
                  "description": "Identifies the purpose for the contact point.",
                  "enum": [
                    "home",
                    "work",
                    "temp",
                    "old",
                    "mobile"
                  ],
                  "type": "string"
                },
                "rank": {
                  "description": "Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values.",
                  "pattern": "^[1-9][0-9]*$",
                  "type": "number"
                },
                "period": {
                  "description": "Time period when the contact point was/is in use.",
                  "properties": {
                    "id": {
                      "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "pattern": "^[ \\r\\n\\t\\S]+$",
                      "type": "string"
                    },
                    "extension": {
                      "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                      "items": {
                        "$ref": "#/definitions/Extension"
                      },
                      "type": "array",
                      "widget": {
                        "id": "hidden"
                      }
                    },
                    "start": {
                      "description": "The start of the period. The boundary is inclusive.",
                      "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
                      "type": "string"
                    },
                    "end": {
                      "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.",
                      "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "type": "object"
                }
              },
              "additionalProperties": false,
              "type": "object"
            },
            "type": "array"
          }
        },
        "additionalProperties": false,
        "type": "object"
      },
      "type": "array",
      "title": "Contact"
    },
    "description": {
      "description": "A free text natural language description of the questionnaire from a consumer's perspective.",
      "title": "Description",
      "pattern": "^[ \\r\\n\\t\\S]+$",
      "type": "string"
    },
    "useContext": {
      "description": "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate questionnaire instances.",
      "items": {
        "description": "Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).",
        "properties": {
          "id": {
            "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "extension": {
            "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "items": {
              "$ref": "#/definitions/Extension"
            },
            "type": "array",
            "widget": {
              "id": "hidden"
            }
          },
          "code": {
            "description": "A code that identifies the type of context being specified by this usage context.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "widget": {
                  "id": "hidden"
                },
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "system": {
                "description": "The identification of the code system that defines the meaning of the symbol in the code.",
                "pattern": "^\\S*$",
                "type": "string"
              },
              "version": {
                "description": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
                "widget": {
                  "id": "hidden"
                },
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "code": {
                "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
                "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
                "type": "string"
              },
              "display": {
                "description": "A representation of the meaning of the code in the system, following the rules of the system.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "userSelected": {
                "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
                "pattern": "^true|false$",
                "type": "boolean"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          "valueCodeableConcept": {
            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "coding": {
                "description": "A reference to a code defined by a terminology system.",
                "items": {
                  "description": "A reference to a code defined by a terminology system.",
                  "properties": {
                    "id": {
                      "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                      "widget": {
                        "id": "hidden"
                      },
                      "pattern": "^[ \\r\\n\\t\\S]+$",
                      "type": "string"
                    },
                    "extension": {
                      "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                      "items": {
                        "$ref": "#/definitions/Extension"
                      },
                      "type": "array",
                      "widget": {
                        "id": "hidden"
                      }
                    },
                    "system": {
                      "description": "The identification of the code system that defines the meaning of the symbol in the code.",
                      "pattern": "^\\S*$",
                      "type": "string"
                    },
                    "version": {
                      "description": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
                      "widget": {
                        "id": "hidden"
                      },
                      "pattern": "^[ \\r\\n\\t\\S]+$",
                      "type": "string"
                    },
                    "code": {
                      "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
                      "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
                      "type": "string"
                    },
                    "display": {
                      "description": "A representation of the meaning of the code in the system, following the rules of the system.",
                      "pattern": "^[ \\r\\n\\t\\S]+$",
                      "type": "string"
                    },
                    "userSelected": {
                      "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
                      "pattern": "^true|false$",
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "type": "object"
                },
                "type": "array"
              },
              "text": {
                "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          "valueQuantity": {
            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "value": {
                "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.",
                "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][+-]?[0-9]+)?$",
                "type": "number"
              },
              "comparator": {
                "description": "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value.",
                "enum": [
                  "<",
                  "<=",
                  ">=",
                  ">",
                  "ad"
                ],
                "type": "string"
              },
              "unit": {
                "description": "A human-readable form of the unit.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "system": {
                "description": "The identification of the system that provides the coded form of the unit.",
                "pattern": "^\\S*$",
                "type": "string"
              },
              "code": {
                "description": "A computer processable form of the unit in some unit representation system.",
                "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          "valueRange": {
            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "low": {
                "description": "The low limit. The boundary is inclusive.",
                "properties": {
                  "id": {
                    "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                    "pattern": "^[ \\r\\n\\t\\S]+$",
                    "type": "string"
                  },
                  "extension": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                    "items": {
                      "$ref": "#/definitions/Extension"
                    },
                    "type": "array",
                    "widget": {
                      "id": "hidden"
                    }
                  },
                  "value": {
                    "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.",
                    "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][+-]?[0-9]+)?$",
                    "type": "number"
                  },
                  "comparator": {
                    "description": "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value.",
                    "enum": [
                      "<",
                      "<=",
                      ">=",
                      ">"
                    ],
                    "type": "string"
                  },
                  "unit": {
                    "description": "A human-readable form of the unit.",
                    "pattern": "^[ \\r\\n\\t\\S]+$",
                    "type": "string"
                  },
                  "system": {
                    "description": "The identification of the system that provides the coded form of the unit.",
                    "pattern": "^\\S*$",
                    "type": "string"
                  },
                  "code": {
                    "description": "A computer processable form of the unit in some unit representation system.",
                    "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
                    "type": "string"
                  }
                },
                "additionalProperties": false,
                "type": "object"
              },
              "high": {
                "description": "The high limit. The boundary is inclusive.",
                "properties": {
                  "id": {
                    "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                    "pattern": "^[ \\r\\n\\t\\S]+$",
                    "type": "string"
                  },
                  "extension": {
                    "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                    "items": {
                      "$ref": "#/definitions/Extension"
                    },
                    "type": "array",
                    "widget": {
                      "id": "hidden"
                    }
                  },
                  "value": {
                    "description": "The value of the measured amount. The value includes an implicit precision in the presentation of the value.",
                    "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][+-]?[0-9]+)?$",
                    "type": "number"
                  },
                  "comparator": {
                    "description": "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value.",
                    "enum": [
                      "<",
                      "<=",
                      ">=",
                      ">"
                    ],
                    "type": "string"
                  },
                  "unit": {
                    "description": "A human-readable form of the unit.",
                    "pattern": "^[ \\r\\n\\t\\S]+$",
                    "type": "string"
                  },
                  "system": {
                    "description": "The identification of the system that provides the coded form of the unit.",
                    "pattern": "^\\S*$",
                    "type": "string"
                  },
                  "code": {
                    "description": "A computer processable form of the unit in some unit representation system.",
                    "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
                    "type": "string"
                  }
                },
                "additionalProperties": false,
                "type": "object"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          "valueReference": {
            "description": "A value that defines the context specified in this context of use. The interpretation of the value is defined by the code.",
            "properties": {
              "id": {
                "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "extension": {
                "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "items": {
                  "$ref": "#/definitions/Extension"
                },
                "type": "array",
                "widget": {
                  "id": "hidden"
                }
              },
              "reference": {
                "description": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              },
              "type": {
                "description": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
                "pattern": "^\\S*$",
                "type": "string"
              },
              "display": {
                "description": "Plain text narrative that identifies the resource in addition to the resource reference.",
                "pattern": "^[ \\r\\n\\t\\S]+$",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "type": "object"
          },
          "__$valueSummary": {
            "description": "Generated summary of the selected UsageContext value.",
            "title": "Value",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string",
            "widget": {
              "id": "string",
              "tooltipFormat": "json"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "code"
        ],
        "type": "object"
      },
      "type": "array",
      "title": "Usage Context"
    },
    "jurisdiction": {
      "description": "A legal or geographic region in which the questionnaire is intended to be used.",
      "items": {
        "properties": {
          "id": {
            "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "extension": {
            "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "items": {
              "$ref": "#/definitions/Extension"
            },
            "type": "array",
            "widget": {
              "id": "hidden"
            }
          },
          "coding": {
            "description": "A reference to a code defined by a terminology system.",
            "items": {
              "description": "A reference to a code defined by a terminology system.",
              "properties": {
                "id": {
                  "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                  "widget": {
                    "id": "hidden"
                  },
                  "pattern": "^[ \\r\\n\\t\\S]+$",
                  "type": "string"
                },
                "extension": {
                  "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                  "items": {
                    "$ref": "#/definitions/Extension"
                  },
                  "type": "array",
                  "widget": {
                    "id": "hidden"
                  }
                },
                "system": {
                  "description": "The identification of the code system that defines the meaning of the symbol in the code.",
                  "pattern": "^\\S*$",
                  "type": "string"
                },
                "version": {
                  "description": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
                  "widget": {
                    "id": "hidden"
                  },
                  "pattern": "^[ \\r\\n\\t\\S]+$",
                  "type": "string"
                },
                "code": {
                  "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
                  "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
                  "type": "string"
                },
                "display": {
                  "description": "A representation of the meaning of the code in the system, following the rules of the system.",
                  "pattern": "^[ \\r\\n\\t\\S]+$",
                  "type": "string"
                },
                "userSelected": {
                  "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
                  "pattern": "^true|false$",
                  "type": "boolean"
                }
              },
              "additionalProperties": false,
              "type": "object"
            },
            "type": "array"
          },
          "text": {
            "description": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "type": "object"
      },
      "type": "array",
      "title": "Jurisdiction"
    },
    "purpose": {
      "description": "Explanation of why this questionnaire is needed and why it has been designed as it has.",
      "title": "Purpose",
      "pattern": "^[ \\r\\n\\t\\S]+$",
      "type": "string"
    },
    "copyright": {
      "description": "A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.",
      "title": "Copyright",
      "pattern": "^[ \\r\\n\\t\\S]+$",
      "type": "string"
    },
    "approvalDate": {
      "description": "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.",
      "title": "Approval date",
      "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?$",
      "type": "string"
    },
    "lastReviewDate": {
      "description": "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.",
      "title": "Last review date",
      "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?$",
      "type": "string"
    },
    "effectivePeriod": {
      "description": "The period during which the questionnaire content was or is planned to be in active use.",
      "title": "Effective period",
      "properties": {
        "id": {
          "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
          "pattern": "^[ \\r\\n\\t\\S]+$",
          "type": "string"
        },
        "extension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
          "items": {
            "$ref": "#/definitions/Extension"
          },
          "type": "array",
          "widget": {
            "id": "hidden"
          }
        },
        "start": {
          "description": "The start of the period. The boundary is inclusive.",
          "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
          "type": "string"
        },
        "end": {
          "description": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.",
          "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "__$codeYesNo": {
      "description": "An identifier for this question or group of questions in a particular terminology such as LOINC.",
      "default": false,
      "type": "boolean",
      "title": "Code",
      "widget": {
        "id": "boolean-radio",
        "optionLabels": [
          [
            false,
            "No code"
          ],
          [
            true,
            "Include code"
          ]
        ],
        "labelClasses": "col-2 ps-0 pe-1",
        "controlClasses": "col-auto btn-group btn-group-sm ps-0"
      }
    },
    "code": {
      "description": "An identifier for this question or group of questions in a particular terminology such as LOINC.",
      "items": {
        "properties": {
          "id": {
            "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
            "widget": {
              "id": "hidden"
            },
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "extension": {
            "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "items": {
              "$ref": "#/definitions/Extension"
            },
            "type": "array",
            "widget": {
              "id": "hidden"
            }
          },
          "system": {
            "description": "The identification of the code system that defines the meaning of the symbol in the code.",
            "pattern": "^\\S*$",
            "type": "string"
          },
          "version": {
            "description": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
            "widget": {
              "id": "hidden"
            },
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "code": {
            "description": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
            "pattern": "^[^\\s]+(\\s[^\\s]+)*$",
            "type": "string"
          },
          "display": {
            "description": "A representation of the meaning of the code in the system, following the rules of the system.",
            "pattern": "^[ \\r\\n\\t\\S]+$",
            "type": "string"
          },
          "userSelected": {
            "description": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
            "pattern": "^true|false$",
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "type": "object"
      },
      "type": "array",
      "title": "Code",
      "visibleIf": {
        "__$codeYesNo": [true]
      },
      "widget": {
        "id": "table",
        "noTableLabel": true,
        "labelPosition": "left",
        "labelClasses": "col-sm-2",
        "controlClasses": "col-sm-10",
        "addButtonLabel": "Add new code",
        "showFields": [
          {"field": "code", "col": 3, "nolabel": true},
          {"field": "system", "col": 4, "nolabel": true},
          {"field": "display", "col": 4, "nolabel": true}
        ]
      }
    },
    "__$terminologyServer": {
      "description": "Enter url for preferred terminology server.",
      "title": "Terminology server",
      "type": "string"
    },
    "contained": {
      "description": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
      "items": {
        "$ref": "#/definitions/ValueSet"
      },
      "type": "array"
    },
    "__$variable": {
      "description": "Use to store values derived from calculations, references to other answers, or external data.",
      "title": "Variables",
      "type": "array",
      "items": {
        "$ref": "#/definitions/Extension"
      }
    }
  },
  "additionalProperties": true,
  "required": [
    "resourceType"
  ],
  "definitions": {
    // Merge field definitions from fhir-definitions.schema.json5.
  },
  "steps": [
    {
      "title": "Form level attributes",
      "optional": false,
      "rows": [
        {
          "showFields": [
            { "field": "title", "col": 12 },
            { "field": "code", "col": 12 },
            { "field": "status", "col": 12},
            { "field": "description", "col": 12},
            { "field": "purpose", "col": 12}
          ]
        }
      ]
    }
  ],
  "fieldsets": [
    {
      "fields": [
        "resourceType",
        "title",
        "name",
        "__$codeYesNo",
        "code",
        "status",
        "description",
        "purpose",
        "__$terminologyServer",
        "__$variable",
        "__$extensionContainer"
      ]
    },
    {
      "fields": [
        "url",
        "identifier",
        "version",
        "derivedFrom",
        "experimental",
        "subjectType",
        "date",
        "publisher",
        "copyright",
        "approvalDate",
        "lastReviewDate",
        "effectivePeriod",
        "contained"
      ]
    },
    {
      "fields": [
        "id",
        "meta",
        "implicitRules",
        "language",
        "text",
        "extension",
        "modifierExtension",
        "contact",
        "useContext",
        "jurisdiction"
      ]
    }
  ],
  "widget": {
    "keyField": "/resourceType",
    "id": "row-layout"
  }
}
