//    Copyright 2019 Google Inc.
//
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//        https://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.

syntax = "proto3";

package google.fhir.r4.uscore;

import "google/protobuf/any.proto";
import "google/fhir/core/proto/annotations.proto";
import "google/fhir/r4/proto/core/codes.proto";
import "google/fhir/r4/proto/core/datatypes.proto";
import "google/fhir/r4/proto/core/valuesets.proto";
import "google/fhir/r4/proto/uscore_codes.proto";

option java_multiple_files = true;
option java_package = "com.google.fhir.r4.uscore";
option (.google.fhir.proto.fhir_version) = R4;

// Auto-generated from StructureDefinition for USCoreBirthSexExtension.
// Extension.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex
message PatientUSCoreBirthSexExtension {
  option (.google.fhir.proto.structure_definition_kind) = KIND_COMPLEX_TYPE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Extension";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex";

  // Unique id for inter-element referencing
  core.String id = 1;

  // Additional content defined by implementations
  repeated core.Extension extension = 2;

  // Value of extension
  message ValueCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/us/core/ValueSet/birthsex";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    BirthSexValueSet.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  ValueCode value_code = 3;
}

// Auto-generated from StructureDefinition for USCoreEthnicityExtension.
// US Core ethnicity Extension.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity
message PatientUSCoreEthnicityExtension {
  option (.google.fhir.proto.structure_definition_kind) = KIND_COMPLEX_TYPE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Extension";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity";

  // Unique id for inter-element referencing
  core.String id = 1;

  // Additional content defined by implementations
  repeated core.Extension extension = 2;

  // Hispanic or Latino|Not Hispanic or Latino
  message OmbCategoryCoding {
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/Coding";

    core.String id = 1;

    repeated core.Extension extension = 2;

    core.String version = 4;

    message BoundCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/us/core/ValueSet/omb-ethnicity-category";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      OmbEthnicityCategoriesValueSet.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    BoundCode code = 5;

    core.String display = 6;

    core.Boolean user_selected = 7;
  }
  OmbCategoryCoding omb_category = 4;

  // Extended ethnicity codes
  message DetailedCoding {
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/Coding";

    core.String id = 1;

    repeated core.Extension extension = 2;

    core.String version = 4;

    message BoundCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/us/core/ValueSet/detailed-ethnicity";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      DetailedEthnicityValueSet.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    BoundCode code = 5;

    core.String display = 6;

    core.Boolean user_selected = 7;
  }
  repeated DetailedCoding detailed = 5;

  // ethnicity Text
  core.String text = 6
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];
}

// Auto-generated from StructureDefinition for USCoreRaceExtension.
// US Core Race Extension.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-race
message PatientUSCoreRaceExtension {
  option (.google.fhir.proto.structure_definition_kind) = KIND_COMPLEX_TYPE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Extension";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race";

  // Unique id for inter-element referencing
  core.String id = 1;

  // Additional content defined by implementations
  repeated core.Extension extension = 2;

  // American Indian or Alaska Native|Asian|Black or African American|Native
  // Hawaiian or Other Pacific Islander|White
  message OmbCategoryCoding {
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/Coding";

    core.String id = 1;

    repeated core.Extension extension = 2;

    core.String version = 4;

    message BoundCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/us/core/ValueSet/omb-race-category";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      OmbRaceCategoriesValueSet.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    BoundCode code = 5;

    core.String display = 6;

    core.Boolean user_selected = 7;
  }
  repeated OmbCategoryCoding omb_category = 4;

  // Extended race codes
  message DetailedCoding {
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/Coding";

    core.String id = 1;

    repeated core.Extension extension = 2;

    core.String version = 4;

    message BoundCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/us/core/ValueSet/detailed-race";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      DetailedRaceValueSet.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    BoundCode code = 5;

    core.String display = 6;

    core.Boolean user_selected = 7;
  }
  repeated DetailedCoding detailed = 5;

  // Race Text
  core.String text = 6
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];
}

// Auto-generated from StructureDefinition for USCoreAllergyIntolerance.
// Allergy or Intolerance (generally: Risk of adverse reaction to a substance).
// See
// http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance
message USCoreAllergyIntolerance {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').exists() or clinicalStatus.exists()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "verificationStatus.coding.where(system = 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification' and code = 'entered-in-error').empty() or clinicalStatus.empty()";
  option (.google.fhir.proto.search_parameter) = {
    name: "asserter"
    type: REFERENCE
    expression: "AllergyIntolerance.asserter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "AllergyIntolerance.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "clinical-status"
    type: TOKEN
    expression: "AllergyIntolerance.clinicalStatus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "criticality"
    type: TOKEN
    expression: "AllergyIntolerance.criticality"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "last-date"
    type: DATE
    expression: "AllergyIntolerance.lastOccurrence"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "manifestation"
    type: TOKEN
    expression: "AllergyIntolerance.reaction.manifestation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "onset"
    type: DATE
    expression: "AllergyIntolerance.reaction.onset"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "recorder"
    type: REFERENCE
    expression: "AllergyIntolerance.recorder"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "route"
    type: TOKEN
    expression: "AllergyIntolerance.reaction.exposureRoute"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "severity"
    type: TOKEN
    expression: "AllergyIntolerance.reaction.severity"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "type"
    type: TOKEN
    expression: "AllergyIntolerance.type | Composition.type | DocumentManifest.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "verification-status"
    type: TOKEN
    expression: "AllergyIntolerance.verificationStatus"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // AllergyIntolerance.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // External ids for this item
  repeated core.Identifier identifier = 10;

  // active | inactive | resolved
  core.CodeableConcept clinical_status = 11;

  // unconfirmed | confirmed | refuted | entered-in-error
  core.CodeableConcept verification_status = 12;

  // allergy | intolerance - Underlying mechanism (if known)
  message TypeCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/allergy-intolerance-type";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.AllergyIntoleranceTypeCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  TypeCode type = 13;

  // food | medication | environment | biologic
  message CategoryCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/allergy-intolerance-category";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.AllergyIntoleranceCategoryCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  repeated CategoryCode category = 14;

  // low | high | unable-to-assess
  message CriticalityCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.AllergyIntoleranceCriticalityCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  CriticalityCode criticality = 15;

  // Code that identifies the allergy or intolerance
  core.CodeableConcept code = 16
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who the sensitivity is for
  core.Reference patient = 17 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Encounter when the allergy or intolerance was asserted
  core.Reference encounter = 18
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // When allergy or intolerance was identified
  message OnsetX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Age age = 2;
      core.Period period = 3;
      core.Range range = 4;
      core.String string_value = 5 [json_name = "string"];
    }
  }
  OnsetX onset = 19;

  // Date first version of the resource instance was recorded
  core.DateTime recorded_date = 20;

  // Who recorded the sensitivity
  core.Reference recorder = 21 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Source of the information about the allergy
  core.Reference asserter = 22 [
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole"
  ];

  // Date(/time) of last known occurrence of a reaction
  core.DateTime last_occurrence = 23;

  // Additional text not captured in other fields
  repeated core.Annotation note = 24;

  // Adverse Reaction Events linked to exposure to substance
  message Reaction {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Specific substance or pharmaceutical product considered to be responsible
    // for event
    core.CodeableConcept substance = 4;

    // Clinical symptoms/signs associated with the Event
    repeated core.CodeableConcept manifestation = 5
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Description of the event as a whole
    core.String description = 6;

    // Date(/time) when manifestations showed
    core.DateTime onset = 7;

    // mild | moderate | severe (of event as a whole)
    message SeverityCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/reaction-event-severity";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.AllergyIntoleranceSeverityCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    SeverityCode severity = 8;

    // How the subject was exposed to the substance
    core.CodeableConcept exposure_route = 9;

    // Text about event not captured in other fields
    repeated core.Annotation note = 10;
  }
  repeated Reaction reaction = 25;
}

// Auto-generated from StructureDefinition for USCoreCarePlanProfile.
// Healthcare plan for patient or group.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan
message USCoreCarePlanProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/CarePlan";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan";
  option (.google.fhir.proto.search_parameter) = {
    name: "activity-code"
    type: TOKEN
    expression: "CarePlan.activity.detail.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "activity-date"
    type: DATE
    expression: "CarePlan.activity.detail.scheduled"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "activity-reference"
    type: REFERENCE
    expression: "CarePlan.activity.reference"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "CarePlan.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "care-team"
    type: REFERENCE
    expression: "CarePlan.careTeam"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "CarePlan.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "condition"
    type: REFERENCE
    expression: "CarePlan.addresses"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "CarePlan.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "goal"
    type: REFERENCE
    expression: "CarePlan.goal"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "instantiates-canonical"
    type: REFERENCE
    expression: "CarePlan.instantiatesCanonical"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "instantiates-uri"
    type: URI
    expression: "CarePlan.instantiatesUri"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "intent"
    type: TOKEN
    expression: "CarePlan.intent"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "CarePlan.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "CarePlan.activity.detail.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "replaces"
    type: REFERENCE
    expression: "CarePlan.replaces"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "CarePlan.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "CarePlan.subject"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // CarePlan.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // External Ids for this plan
  repeated core.Identifier identifier = 10;

  // Instantiates FHIR protocol or definition
  repeated core.Canonical instantiates_canonical = 11;

  // Instantiates external protocol or definition
  repeated core.Uri instantiates_uri = 12;

  // Fulfills CarePlan
  repeated core.Reference based_on = 13
      [(.google.fhir.proto.valid_reference_type) = "CarePlan"];

  // CarePlan replaced by this CarePlan
  repeated core.Reference replaces = 14
      [(.google.fhir.proto.valid_reference_type) = "CarePlan"];

  // Part of referenced CarePlan
  repeated core.Reference part_of = 15
      [(.google.fhir.proto.valid_reference_type) = "CarePlan"];

  // draft | active | on-hold | revoked | completed | entered-in-error | unknown
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/request-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.RequestStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 16
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // proposal | plan | order | option
  message IntentCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/care-plan-intent";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.CarePlanIntentValueSet.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  IntentCode intent = 17
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Type of plan
  repeated core.CodeableConcept category = 18
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Human-friendly name for the care plan
  core.String title = 19;

  // Summary of nature of plan
  core.String description = 20;

  // Who the care plan is for
  core.Reference subject = 21 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Encounter created as part of
  core.Reference encounter = 22
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Time period plan covers
  core.Period period = 23;

  // Date record was first recorded
  core.DateTime created = 24;

  // Who is the designated responsible party
  core.Reference author = 25 [
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam"
  ];

  // Who provided the content of the care plan
  repeated core.Reference contributor = 26 [
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam"
  ];

  // Who's involved in plan?
  repeated core.Reference care_team = 27
      [(.google.fhir.proto.valid_reference_type) = "CareTeam"];

  // Health issues this plan addresses
  repeated core.Reference addresses = 28
      [(.google.fhir.proto.valid_reference_type) = "Condition"];

  // Information considered as part of plan
  repeated core.Reference supporting_info = 29
      [(.google.fhir.proto.valid_reference_type) = "Resource"];

  // Desired outcome of plan
  repeated core.Reference goal = 30
      [(.google.fhir.proto.valid_reference_type) = "Goal"];

  // Action to occur as part of plan
  message Activity {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "detail.empty() or reference.empty()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Results of the activity
    repeated core.CodeableConcept outcome_codeable_concept = 4;

    // Appointment, Encounter, Procedure, etc.
    repeated core.Reference outcome_reference = 5
        [(.google.fhir.proto.valid_reference_type) = "Resource"];

    // Comments about the activity status/progress
    repeated core.Annotation progress = 6;

    // Activity details defined in specific resource
    core.Reference reference = 7 [
      (.google.fhir.proto.valid_reference_type) = "Appointment",
      (.google.fhir.proto.valid_reference_type) = "CommunicationRequest",
      (.google.fhir.proto.valid_reference_type) = "DeviceRequest",
      (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
      (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
      (.google.fhir.proto.valid_reference_type) = "Task",
      (.google.fhir.proto.valid_reference_type) = "ServiceRequest",
      (.google.fhir.proto.valid_reference_type) = "VisionPrescription",
      (.google.fhir.proto.valid_reference_type) = "RequestGroup"
    ];

    // In-line definition of activity
    message Detail {
      // Unique id for inter-element referencing
      core.String id = 1;

      // Additional content defined by implementations
      repeated core.Extension extension = 2;

      // Extensions that cannot be ignored even if unrecognized
      repeated core.Extension modifier_extension = 3;

      // Appointment | CommunicationRequest | DeviceRequest | MedicationRequest
      // | NutritionOrder | Task | ServiceRequest | VisionPrescription
      message KindCode {
        option (.google.fhir.proto.structure_definition_kind) =
            KIND_PRIMITIVE_TYPE;
        option (.google.fhir.proto.fhir_valueset_url) =
            "http://hl7.org/fhir/ValueSet/care-plan-activity-kind";
        option (.google.fhir.proto.fhir_profile_base) =
            "http://hl7.org/fhir/StructureDefinition/code";

        core.CarePlanActivityKindValueSet.Value value = 1;

        core.String id = 2;

        repeated core.Extension extension = 3;
      }
      KindCode kind = 4;

      // Instantiates FHIR protocol or definition
      repeated core.Canonical instantiates_canonical = 5;

      // Instantiates external protocol or definition
      repeated core.Uri instantiates_uri = 6;

      // Detail type of activity
      core.CodeableConcept code = 7;

      // Why activity should be done or why activity was prohibited
      repeated core.CodeableConcept reason_code = 8;

      // Why activity is needed
      repeated core.Reference reason_reference = 9 [
        (.google.fhir.proto.valid_reference_type) = "Condition",
        (.google.fhir.proto.valid_reference_type) = "Observation",
        (.google.fhir.proto.valid_reference_type) = "DiagnosticReport",
        (.google.fhir.proto.valid_reference_type) = "DocumentReference"
      ];

      // Goals this activity relates to
      repeated core.Reference goal = 10
          [(.google.fhir.proto.valid_reference_type) = "Goal"];

      // not-started | scheduled | in-progress | on-hold | completed | cancelled
      // | stopped | unknown | entered-in-error
      message StatusCode {
        option (.google.fhir.proto.structure_definition_kind) =
            KIND_PRIMITIVE_TYPE;
        option (.google.fhir.proto.fhir_valueset_url) =
            "http://hl7.org/fhir/ValueSet/care-plan-activity-status";
        option (.google.fhir.proto.fhir_profile_base) =
            "http://hl7.org/fhir/StructureDefinition/code";

        core.CarePlanActivityStatusCode.Value value = 1;

        core.String id = 2;

        repeated core.Extension extension = 3;
      }
      StatusCode status = 11
          [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

      // Reason for current status
      core.CodeableConcept status_reason = 12;

      // If true, activity is prohibiting action
      core.Boolean do_not_perform = 13;

      // When activity is to occur
      message ScheduledX {
        option (.google.fhir.proto.is_choice_type) = true;

        oneof choice {
          core.Timing timing = 1;
          core.Period period = 2;
          core.String string_value = 3 [json_name = "string"];
        }
      }
      ScheduledX scheduled = 14;

      // Where it should happen
      core.Reference location = 15
          [(.google.fhir.proto.valid_reference_type) = "Location"];

      // Who will be responsible?
      repeated core.Reference performer = 16 [
        (.google.fhir.proto.valid_reference_type) = "Practitioner",
        (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
        (.google.fhir.proto.valid_reference_type) = "Organization",
        (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
        (.google.fhir.proto.valid_reference_type) = "Patient",
        (.google.fhir.proto.valid_reference_type) = "CareTeam",
        (.google.fhir.proto.valid_reference_type) = "HealthcareService",
        (.google.fhir.proto.valid_reference_type) = "Device"
      ];

      // What is to be administered/supplied
      message ProductX {
        option (.google.fhir.proto.is_choice_type) = true;

        oneof choice {
          core.CodeableConcept codeable_concept = 1;
          core.Reference reference = 2 [
            (.google.fhir.proto.valid_reference_type) = "Medication",
            (.google.fhir.proto.valid_reference_type) = "Substance"
          ];
        }
      }
      ProductX product = 17;

      // How to consume/day?
      core.SimpleQuantity daily_amount = 18;

      // How much to administer/supply/consume
      core.SimpleQuantity quantity = 19;

      // Extra info describing activity to perform
      core.String description = 20;
    }
    Detail detail = 8;
  }
  repeated Activity activity = 31;

  // Comments about the plan
  repeated core.Annotation note = 32;

  // field 33 reserved for CarePlan.category:AssessPlan which uses an
  // unsupported slicing on CodeableConcept
  reserved 33;
}

// Auto-generated from StructureDefinition for USCoreCareTeam.
// Planned participants in the coordination and delivery of care for a patient
// or group. See
// http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam
message USCoreCareTeam {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/CareTeam";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam";
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "CareTeam.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "CareTeam.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "participant"
    type: REFERENCE
    expression: "CareTeam.participant.member"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "CareTeam.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "CareTeam.subject"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // CareTeam.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // External Ids for this team
  repeated core.Identifier identifier = 10;

  // proposed | active | suspended | inactive | entered-in-error
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/care-team-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.CareTeamStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 11;

  // Type of team
  repeated core.CodeableConcept category = 12;

  // Name of the team, such as crisis assessment team
  core.String name = 13;

  // Who care team is for
  core.Reference subject = 14 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Encounter created as part of
  core.Reference encounter = 15
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Time period team covers
  core.Period period = 16;

  // Members of the team
  message Participant {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "onBehalfOf.exists() implies (member.resolve().iif(empty(), true, ofType(Practitioner).exists()))";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Type of involvement
    core.CodeableConcept role = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Who is involved
    core.Reference member = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Patient",
      (.google.fhir.proto.valid_reference_type) = "Practitioner",
      (.google.fhir.proto.valid_reference_type) = "Organization",
      (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
    ];

    // Organization of the practitioner
    core.Reference on_behalf_of = 6
        [(.google.fhir.proto.valid_reference_type) = "Organization"];

    // Time period of participant
    core.Period period = 7;
  }
  repeated Participant participant = 17
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Why the care team exists
  repeated core.CodeableConcept reason_code = 18;

  // Why the care team exists
  repeated core.Reference reason_reference = 19
      [(.google.fhir.proto.valid_reference_type) = "Condition"];

  // Organization responsible for the care team
  repeated core.Reference managing_organization = 20
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // A contact detail for the care team (that applies to all members)
  repeated core.ContactPoint telecom = 21;

  // Comments made about the CareTeam
  repeated core.Annotation note = 22;
}

// Auto-generated from StructureDefinition for
// USCoreDiagnosticReportProfileLaboratoryReporting. A Diagnostic report - a
// combination of request information, atomic results, images, interpretation,
// as well as formatted reports. See
// http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab
message USCoreDiagnosticReportProfileLaboratoryReporting {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/DiagnosticReport";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab";
  option (.google.fhir.proto.search_parameter) = {
    name: "assessed-condition"
    type: REFERENCE
    expression: "DiagnosticReport.extension('http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "DiagnosticReport.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "DiagnosticReport.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "conclusion"
    type: TOKEN
    expression: "DiagnosticReport.conclusionCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "issued"
    type: DATE
    expression: "DiagnosticReport.issued"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "media"
    type: REFERENCE
    expression: "DiagnosticReport.media.link"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "DiagnosticReport.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "result"
    type: REFERENCE
    expression: "DiagnosticReport.result"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "results-interpreter"
    type: REFERENCE
    expression: "DiagnosticReport.resultsInterpreter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specimen"
    type: REFERENCE
    expression: "DiagnosticReport.specimen"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "DiagnosticReport.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "DiagnosticReport.subject"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // DiagnosticReport.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business identifier for report
  repeated core.Identifier identifier = 10;

  // What was requested
  repeated core.Reference based_on = 11 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // registered | partial | preliminary | final +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/diagnostic-report-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.DiagnosticReportStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 12
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Service category
  repeated core.CodeableConcept category = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // US Core Laboratory Report Order Code
  core.CodeableConcept code = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // The subject of the report - usually, but not always, the patient
  core.Reference subject = 15 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Health care event when test ordered
  core.Reference encounter = 16
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Specimen Collection Datetime or Period
  message EffectiveX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
    }
  }
  EffectiveX effective = 17
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // DateTime this version was made
  core.Instant issued = 18
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Responsible Diagnostic Service
  repeated core.Reference performer = 19 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "Organization"
  ];

  // Primary result interpreter
  repeated core.Reference results_interpreter = 20 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam"
  ];

  // Specimens this report is based on
  repeated core.Reference specimen = 21
      [(.google.fhir.proto.valid_reference_type) = "Specimen"];

  // Observations
  repeated core.Reference result = 22
      [(.google.fhir.proto.valid_reference_type) = "Observation"];

  // Reference to full details of imaging associated with the diagnostic report
  repeated core.Reference imaging_study = 23
      [(.google.fhir.proto.valid_reference_type) = "ImagingStudy"];

  // Key images associated with this report
  message Media {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Comment about the image (e.g. explanation)
    core.String comment = 4;

    // Reference to the image source
    core.Reference link = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Media"
    ];
  }
  repeated Media media = 24;

  // Clinical conclusion (interpretation) of test results
  core.String conclusion = 25;

  // Codes for the clinical conclusion of test results
  repeated core.CodeableConcept conclusion_code = 26;

  // Entire report as issued
  repeated core.Attachment presented_form = 27;

  // field 28 reserved for DiagnosticReport.category:LaboratorySlice which uses
  // an unsupported slicing on CodeableConcept
  reserved 28;
}

// Auto-generated from StructureDefinition for
// USCoreDiagnosticReportProfileNoteExchange. US Core Diagnostic Report Profile
// for Report and Note exchange. See
// http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-note
message USCoreDiagnosticReportProfileNoteExchange {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/DiagnosticReport";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-note";
  option (.google.fhir.proto.search_parameter) = {
    name: "assessed-condition"
    type: REFERENCE
    expression: "DiagnosticReport.extension('http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "DiagnosticReport.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "DiagnosticReport.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "conclusion"
    type: TOKEN
    expression: "DiagnosticReport.conclusionCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "issued"
    type: DATE
    expression: "DiagnosticReport.issued"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "media"
    type: REFERENCE
    expression: "DiagnosticReport.media.link"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "DiagnosticReport.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "result"
    type: REFERENCE
    expression: "DiagnosticReport.result"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "results-interpreter"
    type: REFERENCE
    expression: "DiagnosticReport.resultsInterpreter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specimen"
    type: REFERENCE
    expression: "DiagnosticReport.specimen"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "DiagnosticReport.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "DiagnosticReport.subject"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // DiagnosticReport.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business identifier for report
  repeated core.Identifier identifier = 10;

  // What was requested
  repeated core.Reference based_on = 11 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // registered | partial | preliminary | final +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/diagnostic-report-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.DiagnosticReportStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 12
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Service category
  repeated core.CodeableConcept category = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // US Core Report Code
  core.CodeableConcept code = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // The subject of the report - usually, but not always, the patient
  core.Reference subject = 15 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Health care event when test ordered
  core.Reference encounter = 16
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Time of the report or note
  message EffectiveX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
    }
  }
  EffectiveX effective = 17
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // DateTime this version was made
  core.Instant issued = 18;

  // Responsible Diagnostic Service
  repeated core.Reference performer = 19 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "Organization"
  ];

  // Primary result interpreter
  repeated core.Reference results_interpreter = 20 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam"
  ];

  // Specimens this report is based on
  repeated core.Reference specimen = 21
      [(.google.fhir.proto.valid_reference_type) = "Specimen"];

  // Observations
  repeated core.Reference result = 22
      [(.google.fhir.proto.valid_reference_type) = "Observation"];

  // Reference to full details of imaging associated with the diagnostic report
  repeated core.Reference imaging_study = 23
      [(.google.fhir.proto.valid_reference_type) = "ImagingStudy"];

  // Key images associated with this report
  message Media {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Comment about the image (e.g. explanation)
    core.String comment = 4;

    // Reference to the image source
    core.Reference link = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Media"
    ];
  }
  repeated Media media = 24;

  // Clinical conclusion (interpretation) of test results
  core.String conclusion = 25;

  // Codes for the clinical conclusion of test results
  repeated core.CodeableConcept conclusion_code = 26;

  // Entire report as issued
  repeated core.Attachment presented_form = 27;
}

// Auto-generated from StructureDefinition for USCoreDocumentReferenceProfile.
// A reference to a document.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference
message USCoreDocumentReferenceProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/DocumentReference";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference";
  option (.google.fhir.proto.search_parameter) = {
    name: "authenticator"
    type: REFERENCE
    expression: "DocumentReference.authenticator"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "author"
    type: REFERENCE
    expression: "DocumentReference.author"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "DocumentReference.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "contenttype"
    type: TOKEN
    expression: "DocumentReference.content.attachment.contentType"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "custodian"
    type: REFERENCE
    expression: "DocumentReference.custodian"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "DocumentReference.date"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "description"
    type: STRING
    expression: "DocumentReference.description"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "event"
    type: TOKEN
    expression: "DocumentReference.context.event"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "facility"
    type: TOKEN
    expression: "DocumentReference.context.facilityType"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "format"
    type: TOKEN
    expression: "DocumentReference.content.format"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "language"
    type: TOKEN
    expression: "DocumentReference.content.attachment.language"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location"
    type: URI
    expression: "DocumentReference.content.attachment.url"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "period"
    type: DATE
    expression: "DocumentReference.context.period"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "related"
    type: REFERENCE
    expression: "DocumentReference.context.related"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "relatesto"
    type: REFERENCE
    expression: "DocumentReference.relatesTo.target"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "relation"
    type: TOKEN
    expression: "DocumentReference.relatesTo.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "relationship"
    type: COMPOSITE
    expression: "DocumentReference.relatesTo"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "security-label"
    type: TOKEN
    expression: "DocumentReference.securityLabel"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "setting"
    type: TOKEN
    expression: "DocumentReference.context.practiceSetting"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "DocumentReference.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "DocumentReference.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "type"
    type: TOKEN
    expression: "AllergyIntolerance.type | Composition.type | DocumentManifest.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // DocumentReference.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Master Version Specific Identifier
  core.Identifier master_identifier = 10;

  // Other identifiers for the document
  repeated core.Identifier identifier = 11;

  // current | superseded | entered-in-error
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/document-reference-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.DocumentReferenceStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 12
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // preliminary | final | amended | entered-in-error
  message DocStatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/composition-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.CompositionStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  DocStatusCode doc_status = 13;

  // Kind of document (LOINC if possible)
  core.CodeableConcept type = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Categorization of document
  repeated core.CodeableConcept category = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who/what is the subject of the document
  core.Reference subject = 16 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // When this document reference was created
  core.Instant date = 17;

  // Who and/or what authored the document
  repeated core.Reference author = 18 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Who/what authenticated the document
  core.Reference authenticator = 19 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization"
  ];

  // Organization which maintains the document
  core.Reference custodian = 20
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // Relationships to other documents
  message RelatesTo {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // replaces | transforms | signs | appends
    message CodeType {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/document-relationship-type";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.DocumentRelationshipTypeCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    CodeType code = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Target of the relationship
    core.Reference target = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "DocumentReference"
    ];
  }
  repeated RelatesTo relates_to = 21;

  // Human-readable description
  core.String description = 22;

  // Document security-tags
  repeated core.CodeableConcept security_label = 23;

  // Document referenced
  message Content {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Where to access the document
    core.Attachment attachment = 4 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.fhir_path_constraint) =
          "url.exists() or data.exists()"
    ];

    // Format/content rules for the document
    core.Coding format = 5;
  }
  Content content = 24
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Clinical context of document
  message Context {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Context of the document  content
    core.Reference encounter = 4
        [(.google.fhir.proto.valid_reference_type) = "Encounter"];

    // Main clinical acts documented
    repeated core.CodeableConcept event = 5;

    // Time of service that is being documented
    core.Period period = 6;

    // Kind of facility where patient was seen
    core.CodeableConcept facility_type = 7;

    // Additional details about where the content was created (e.g. clinical
    // specialty)
    core.CodeableConcept practice_setting = 8;

    // Patient demographics from source
    core.Reference source_patient_info = 9
        [(.google.fhir.proto.valid_reference_type) = "Patient"];

    // Related identifiers or resources
    repeated core.Reference related = 10
        [(.google.fhir.proto.valid_reference_type) = "Resource"];
  }
  Context context = 25;
}

// Auto-generated from StructureDefinition for USCoreEncounterProfile.
// An interaction during which services are provided to the patient.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter
message USCoreEncounterProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Encounter";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter";
  option (.google.fhir.proto.search_parameter) = {
    name: "account"
    type: REFERENCE
    expression: "Encounter.account"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "appointment"
    type: REFERENCE
    expression: "Encounter.appointment"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "Encounter.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "class"
    type: TOKEN
    expression: "Encounter.class"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "diagnosis"
    type: REFERENCE
    expression: "Encounter.diagnosis.condition"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "episode-of-care"
    type: REFERENCE
    expression: "Encounter.episodeOfCare"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "length"
    type: QUANTITY
    expression: "Encounter.length"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location"
    type: REFERENCE
    expression: "Encounter.location.location"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location-period"
    type: DATE
    expression: "Encounter.location.period"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "Encounter.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "participant"
    type: REFERENCE
    expression: "Encounter.participant.individual"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "participant-type"
    type: TOKEN
    expression: "Encounter.participant.type"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "practitioner"
    type: REFERENCE
    expression: "Encounter.participant.individual.where(resolve() is Practitioner)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reason-code"
    type: TOKEN
    expression: "Encounter.reasonCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reason-reference"
    type: REFERENCE
    expression: "Encounter.reasonReference"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "service-provider"
    type: REFERENCE
    expression: "Encounter.serviceProvider"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "special-arrangement"
    type: TOKEN
    expression: "Encounter.hospitalization.specialArrangement"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Encounter.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Encounter.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "type"
    type: TOKEN
    expression: "AllergyIntolerance.type | Composition.type | DocumentManifest.type | DocumentReference.type | Encounter.type | EpisodeOfCare.type"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Encounter.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Identifier(s) by which this encounter is known
  repeated core.Identifier identifier = 10;

  // planned | arrived | triaged | in-progress | onleave | finished | cancelled
  // +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/encounter-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.EncounterStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 11
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // List of past encounter statuses
  message StatusHistory {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // planned | arrived | triaged | in-progress | onleave | finished |
    // cancelled +
    message StatusCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/encounter-status";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.EncounterStatusCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    StatusCode status = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // The time that the episode was in the specified status
    core.Period period = 5
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];
  }
  repeated StatusHistory status_history = 12;

  // Classification of patient encounter
  core.Coding class_value = 13 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    json_name = "class"
  ];

  // List of past encounter classes
  message ClassHistory {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // inpatient | outpatient | ambulatory | emergency +
    core.Coding class_value = 4 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      json_name = "class"
    ];

    // The time that the episode was in the specified class
    core.Period period = 5
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];
  }
  repeated ClassHistory class_history = 14;

  // Specific type of encounter
  repeated core.CodeableConcept type = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Specific type of service
  core.CodeableConcept service_type = 16;

  // Indicates the urgency of the encounter
  core.CodeableConcept priority = 17;

  // The patient or group present at the encounter
  core.Reference subject = 18 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Episode(s) of care that this encounter should be recorded against
  repeated core.Reference episode_of_care = 19
      [(.google.fhir.proto.valid_reference_type) = "EpisodeOfCare"];

  // The ServiceRequest that initiated this encounter
  repeated core.Reference based_on = 20
      [(.google.fhir.proto.valid_reference_type) = "ServiceRequest"];

  // List of participants involved in the encounter
  message Participant {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Role of participant in encounter
    repeated core.CodeableConcept type = 4;

    // Period of time during the encounter that the participant participated
    core.Period period = 5;

    // Persons involved in the encounter other than the patient
    core.Reference individual = 6
        [(.google.fhir.proto.valid_reference_type) = "Practitioner"];
  }
  repeated Participant participant = 21;

  // The appointment that scheduled this encounter
  repeated core.Reference appointment = 22
      [(.google.fhir.proto.valid_reference_type) = "Appointment"];

  // The start and end time of the encounter
  core.Period period = 23;

  // Quantity of time the encounter lasted (less time absent)
  core.Duration length = 24;

  // Coded reason the encounter takes place
  repeated core.CodeableConcept reason_code = 25;

  // Reason the encounter takes place (reference)
  repeated core.Reference reason_reference = 26 [
    (.google.fhir.proto.valid_reference_type) = "Condition",
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation"
  ];

  // The list of diagnosis relevant to this encounter
  message Diagnosis {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The diagnosis or procedure relevant to the encounter
    core.Reference condition = 4 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Condition",
      (.google.fhir.proto.valid_reference_type) = "Procedure"
    ];

    // Role that this diagnosis has within the encounter (e.g. admission,
    // billing, discharge …)
    core.CodeableConcept use = 5;

    // Ranking of the diagnosis (for each role type)
    core.PositiveInt rank = 6;
  }
  repeated Diagnosis diagnosis = 27;

  // The set of accounts that may be used for billing for this Encounter
  repeated core.Reference account = 28
      [(.google.fhir.proto.valid_reference_type) = "Account"];

  // Details about the admission to a healthcare service
  message Hospitalization {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Pre-admission identifier
    core.Identifier pre_admission_identifier = 4;

    // The location/organization from which the patient came before admission
    core.Reference origin = 5 [
      (.google.fhir.proto.valid_reference_type) = "Location",
      (.google.fhir.proto.valid_reference_type) = "Organization"
    ];

    // From where patient was admitted (physician referral, transfer)
    core.CodeableConcept admit_source = 6;

    // The type of hospital re-admission that has occurred (if any). If the
    // value is absent, then this is not identified as a readmission
    core.CodeableConcept re_admission = 7;

    // Diet preferences reported by the patient
    repeated core.CodeableConcept diet_preference = 8;

    // Special courtesies (VIP, board member)
    repeated core.CodeableConcept special_courtesy = 9;

    // Wheelchair, translator, stretcher, etc.
    repeated core.CodeableConcept special_arrangement = 10;

    // Location/organization to which the patient is discharged
    core.Reference destination = 11 [
      (.google.fhir.proto.valid_reference_type) = "Location",
      (.google.fhir.proto.valid_reference_type) = "Organization"
    ];

    // Category or kind of location after discharge
    core.CodeableConcept discharge_disposition = 12;
  }
  Hospitalization hospitalization = 29;

  // List of locations where the patient has been
  message Location {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Location the encounter takes place
    core.Reference location = 4 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Location"
    ];

    // planned | active | reserved | completed
    message StatusCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/encounter-location-status";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.EncounterLocationStatusCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    StatusCode status = 5;

    // The physical type of the location (usually the level in the location
    // hierachy - bed room ward etc.)
    core.CodeableConcept physical_type = 6;

    // Time period during which the patient was present at the location
    core.Period period = 7;
  }
  repeated Location location = 30;

  // The organization (facility) responsible for this encounter
  core.Reference service_provider = 31
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // Another Encounter this encounter is part of
  core.Reference part_of = 32
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];
}

// Auto-generated from StructureDefinition for USCoreGoalProfile.
// Describes the intended objective(s) for a patient, group or organization.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal
message USCoreGoalProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Goal";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal";
  option (.google.fhir.proto.search_parameter) = {
    name: "achievement-status"
    type: TOKEN
    expression: "Goal.achievementStatus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Goal.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "lifecycle-status"
    type: TOKEN
    expression: "Goal.lifecycleStatus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "start-date"
    type: DATE
    expression: "(Goal.start as date)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Goal.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "target-date"
    type: DATE
    expression: "(Goal.target.due as date)"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Goal.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // External Ids for this goal
  repeated core.Identifier identifier = 10;

  // proposed | planned | accepted | active | on-hold | completed | cancelled |
  // entered-in-error | rejected
  message LifecycleStatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/goal-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.GoalLifecycleStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  LifecycleStatusCode lifecycle_status = 11
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // in-progress | improving | worsening | no-change | achieved | sustaining |
  // not-achieved | no-progress | not-attainable
  core.CodeableConcept achievement_status = 12;

  // E.g. Treatment, dietary, behavioral, etc.
  repeated core.CodeableConcept category = 13;

  // high-priority | medium-priority | low-priority
  core.CodeableConcept priority = 14;

  // Code or text describing goal
  core.CodeableConcept description = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who this goal is intended for
  core.Reference subject = 16 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // When goal pursuit begins
  message StartX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Date date = 1;
      core.CodeableConcept codeable_concept = 2;
    }
  }
  StartX start = 17;

  // Target outcome for the goal
  message Target {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "(detail.exists() and measure.exists()) or detail.exists().not()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The parameter whose value is being tracked
    core.CodeableConcept measure = 4;

    // The target value to be achieved
    message DetailX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Quantity quantity = 1;
        core.Range range = 2;
        core.CodeableConcept codeable_concept = 3;
        core.String string_value = 4 [json_name = "string"];
        core.Boolean boolean = 5;
        core.Integer integer = 6;
        core.Ratio ratio = 7;
      }
    }
    DetailX detail = 5;

    // Reach goal on or before
    message DueX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Date date = 1;
      }
    }
    DueX due = 6;
  }
  repeated Target target = 18;

  // When goal status took effect
  core.Date status_date = 19;

  // Reason for current status
  core.String status_reason = 20;

  // Who's responsible for creating Goal?
  core.Reference expressed_by = 21 [
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Issues addressed by this goal
  repeated core.Reference addresses = 22 [
    (.google.fhir.proto.valid_reference_type) = "Condition",
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "MedicationStatement",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest",
    (.google.fhir.proto.valid_reference_type) = "RiskAssessment"
  ];

  // Comments about the goal
  repeated core.Annotation note = 23;

  // What result was achieved regarding the goal?
  repeated core.CodeableConcept outcome_code = 24;

  // Observation that resulted from goal
  repeated core.Reference outcome_reference = 25
      [(.google.fhir.proto.valid_reference_type) = "Observation"];
}

// Auto-generated from StructureDefinition for USCoreImmunizationProfile.
// Immunization event information.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization
message USCoreImmunizationProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Immunization";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization";
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location"
    type: REFERENCE
    expression: "Immunization.location"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "lot-number"
    type: STRING
    expression: "Immunization.lotNumber"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "manufacturer"
    type: REFERENCE
    expression: "Immunization.manufacturer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "Immunization.performer.actor"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reaction"
    type: REFERENCE
    expression: "Immunization.reaction.detail"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reaction-date"
    type: DATE
    expression: "Immunization.reaction.date"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reason-code"
    type: TOKEN
    expression: "Immunization.reasonCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reason-reference"
    type: REFERENCE
    expression: "Immunization.reasonReference"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "series"
    type: STRING
    expression: "Immunization.protocolApplied.series"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Immunization.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status-reason"
    type: TOKEN
    expression: "Immunization.statusReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "target-disease"
    type: TOKEN
    expression: "Immunization.protocolApplied.targetDisease"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "vaccine-code"
    type: TOKEN
    expression: "Immunization.vaccineCode"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Immunization.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business identifier
  repeated core.Identifier identifier = 10;

  // completed | entered-in-error | not-done
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/immunization-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.ImmunizationStatusCodesValueSet.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 11
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Reason not done
  core.CodeableConcept status_reason = 12;

  // Vaccine Product Type (bind to CVX)
  core.CodeableConcept vaccine_code = 13 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.fhir_path_warning_constraint) =
        "coding.where(system='http://hl7.org/fhir/sid/ndc').empty()"
  ];

  // Who was immunized
  core.Reference patient = 14 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Encounter immunization was part of
  core.Reference encounter = 15
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Vaccine administration date
  message OccurrenceX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.String string_value = 2 [json_name = "string"];
    }
  }
  OccurrenceX occurrence = 16
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // When the immunization was first captured in the subject's record
  core.DateTime recorded = 17;

  // Indicates context the data was recorded in
  core.Boolean primary_source = 18
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Indicates the source of a secondarily reported record
  core.CodeableConcept report_origin = 19;

  // Where immunization occurred
  core.Reference location = 20
      [(.google.fhir.proto.valid_reference_type) = "Location"];

  // Vaccine manufacturer
  core.Reference manufacturer = 21
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // Vaccine lot number
  core.String lot_number = 22;

  // Vaccine expiration date
  core.Date expiration_date = 23;

  // Body site vaccine  was administered
  core.CodeableConcept site = 24;

  // How vaccine entered body
  core.CodeableConcept route = 25;

  // Amount of vaccine administered
  core.SimpleQuantity dose_quantity = 26;

  // Who performed event
  message Performer {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // What type of performance was done
    core.CodeableConcept function = 4;

    // Individual or organization who was performing
    core.Reference actor = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Practitioner",
      (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
      (.google.fhir.proto.valid_reference_type) = "Organization"
    ];
  }
  repeated Performer performer = 27;

  // Additional immunization notes
  repeated core.Annotation note = 28;

  // Why immunization occurred
  repeated core.CodeableConcept reason_code = 29;

  // Why immunization occurred
  repeated core.Reference reason_reference = 30 [
    (.google.fhir.proto.valid_reference_type) = "Condition",
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "DiagnosticReport"
  ];

  // Dose potency
  core.Boolean is_subpotent = 31;

  // Reason for being subpotent
  repeated core.CodeableConcept subpotent_reason = 32;

  // Educational material presented to patient
  message Education {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "documentType.exists() or reference.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Educational material document identifier
    core.String document_type = 4;

    // Educational material reference pointer
    core.Uri reference = 5;

    // Educational material publication date
    core.DateTime publication_date = 6;

    // Educational material presentation date
    core.DateTime presentation_date = 7;
  }
  repeated Education education = 33;

  // Patient eligibility for a vaccination program
  repeated core.CodeableConcept program_eligibility = 34;

  // Funding source for the vaccine
  core.CodeableConcept funding_source = 35;

  // Details of a reaction that follows immunization
  message Reaction {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // When reaction started
    core.DateTime date = 4;

    // Additional information on reaction
    core.Reference detail = 5
        [(.google.fhir.proto.valid_reference_type) = "Observation"];

    // Indicates self-reported reaction
    core.Boolean reported = 6;
  }
  repeated Reaction reaction = 36;

  // Protocol followed by the provider
  message ProtocolApplied {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Name of vaccine series
    core.String series = 4;

    // Who is responsible for publishing the recommendations
    core.Reference authority = 5
        [(.google.fhir.proto.valid_reference_type) = "Organization"];

    // Vaccine preventatable disease being targetted
    repeated core.CodeableConcept target_disease = 6;

    // Dose number within series
    message DoseNumberX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.PositiveInt positive_int = 1;
        core.String string_value = 2 [json_name = "string"];
      }
    }
    DoseNumberX dose_number = 7
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Recommended number of doses for immunity
    message SeriesDosesX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.PositiveInt positive_int = 1;
        core.String string_value = 2 [json_name = "string"];
      }
    }
    SeriesDosesX series_doses = 8;
  }
  repeated ProtocolApplied protocol_applied = 37;
}

// Auto-generated from StructureDefinition for USCoreImplantableDeviceProfile.
// Item used in healthcare.
// See
// http://hl7.org/fhir/us/core/StructureDefinition/us-core-implantable-device
message USCoreImplantableDeviceProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Device";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-implantable-device";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "udiCarrier.empty() or (udiCarrier.carrierAIDC.exists() or udiCarrier.carrierHRF.exists())";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "udiCarrier.empty() or (manufactureDate.exists() or expirationDate.exists() or lotNumber.exists() or serialNumber.exists() or distinctIdentifier.exists())";
  option (.google.fhir.proto.search_parameter) = {
    name: "device-name"
    type: STRING
    expression: "Device.deviceName.name | Device.type.coding.display | Device.type.text"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "Device.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location"
    type: REFERENCE
    expression: "Device.location"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "manufacturer"
    type: STRING
    expression: "Device.manufacturer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "model"
    type: STRING
    expression: "Device.modelNumber"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "organization"
    type: REFERENCE
    expression: "Device.owner"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "Device.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Device.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "type"
    type: TOKEN
    expression: "Device.type"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "udi-carrier"
    type: STRING
    expression: "Device.udiCarrier.carrierHRF"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "udi-di"
    type: STRING
    expression: "Device.udiCarrier.deviceIdentifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "url"
    type: URI
    expression: "Device.url"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Device.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Instance identifier
  repeated core.Identifier identifier = 10;

  // The reference to the definition for the device
  core.Reference definition = 11
      [(.google.fhir.proto.valid_reference_type) = "DeviceDefinition"];

  // Unique Device Identifier (UDI) Barcode string
  message UdiCarrier {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Mandatory fixed portion of UDI
    core.String device_identifier = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // UDI Issuing Organization
    core.Uri issuer = 5;

    // Regional UDI authority
    core.Uri jurisdiction = 6;

    // UDI Machine Readable Barcode String
    core.Base64Binary carrier_aidc = 7 [json_name = "carrierAIDC"];

    // UDI Human Readable Barcode String
    core.String carrier_hrf = 8 [json_name = "carrierHRF"];

    // barcode | rfid | manual +
    message EntryTypeCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/udi-entry-type";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.UDIEntryTypeCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    EntryTypeCode entry_type = 9;
  }
  UdiCarrier udi_carrier = 12;

  // active | inactive | entered-in-error | unknown
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/device-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.FHIRDeviceStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 13;

  // online | paused | standby | offline | not-ready | transduc-discon |
  // hw-discon | off
  repeated core.CodeableConcept status_reason = 14;

  // The distinct identification string
  core.String distinct_identifier = 15;

  // Name of device manufacturer
  core.String manufacturer = 16;

  // Date when the device was made
  core.DateTime manufacture_date = 17;

  // Date and time of expiry of this device (if applicable)
  core.DateTime expiration_date = 18;

  // Lot number of manufacture
  core.String lot_number = 19;

  // Serial number assigned by the manufacturer
  core.String serial_number = 20;

  // The name of the device as given by the manufacturer
  message DeviceName {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The name of the device
    core.String name = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // udi-label-name | user-friendly-name | patient-reported-name |
    // manufacturer-name | model-name | other
    message TypeCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/device-nametype";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.DeviceNameTypeCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    TypeCode type = 5
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];
  }
  repeated DeviceName device_name = 21;

  // The model number for the device
  core.String model_number = 22;

  // The part number of the device
  core.String part_number = 23;

  // The kind or type of device
  core.CodeableConcept type = 24
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // The capabilities supported on a  device, the standards to which the device
  // conforms for a particular purpose, and used for the communication
  message Specialization {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The standard that is used to operate and communicate
    core.CodeableConcept system_type = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // The version of the standard that is used to operate and communicate
    core.String version = 5;
  }
  repeated Specialization specialization = 25;

  // The actual design of the device or software version running on the device
  message Version {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The type of the device version
    core.CodeableConcept type = 4;

    // A single component of the device version
    core.Identifier component = 5;

    // The version text
    core.String value = 6
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];
  }
  repeated Version version = 26;

  // The actual configuration settings of a device as it actually operates,
  // e.g., regulation status, time properties
  message Property {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Code that specifies the property DeviceDefinitionPropetyCode (Extensible)
    core.CodeableConcept type = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Property value as a quantity
    repeated core.Quantity value_quantity = 5;

    // Property value as a code, e.g., NTP4 (synced to NTP)
    repeated core.CodeableConcept value_code = 6;
  }
  repeated Property property = 27;

  // Patient to whom Device is affixed
  core.Reference patient = 28 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Organization responsible for device
  core.Reference owner = 29
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // Details for human/organization for support
  repeated core.ContactPoint contact = 30;

  // Where the device is found
  core.Reference location = 31
      [(.google.fhir.proto.valid_reference_type) = "Location"];

  // Network address to contact device
  core.Uri url = 32;

  // Device notes and comments
  repeated core.Annotation note = 33;

  // Safety Characteristics of Device
  repeated core.CodeableConcept safety = 34;

  // The parent device
  core.Reference parent = 35
      [(.google.fhir.proto.valid_reference_type) = "Device"];
}

// Auto-generated from StructureDefinition for
// USCoreLaboratoryResultObservationProfile. Measurements and simple assertions.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
message USCoreLaboratoryResultObservationProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Observation";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "dataAbsentReason.empty() or value.empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "(component.empty() and related.empty()) implies (dataAbsentReason or value)";
  option (.google.fhir.proto.search_parameter) = {
    name: "amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "Observation.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Observation.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-concept"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-date"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-quantity"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-string"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code"
    type: TOKEN
    expression: "Observation.code | Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-concept"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-quantity"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason | Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept) | (Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData) | (Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code"
    type: TOKEN
    expression: "Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-concept"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-quantity"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-data-absent-reason"
    type: TOKEN
    expression: "Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-concept"
    type: TOKEN
    expression: "(Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-quantity"
    type: QUANTITY
    expression: "(Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "derived-from"
    type: REFERENCE
    expression: "Observation.derivedFrom"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "device"
    type: REFERENCE
    expression: "Observation.device"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "dna-variant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "focus"
    type: REFERENCE
    expression: "Observation.focus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-dnavariant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-identifier"
    type: TOKEN
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsGene')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "has-member"
    type: REFERENCE
    expression: "Observation.hasMember"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "method"
    type: TOKEN
    expression: "Observation.method"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "Observation.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "Observation.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specimen"
    type: REFERENCE
    expression: "Observation.specimen"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Observation.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Observation.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-date"
    type: DATE
    expression: "(Observation.value as dateTime) | (Observation.value as Period)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-string"
    type: STRING
    expression: "(Observation.value as string) | (Observation.value as CodeableConcept).text"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Observation.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business Identifier for observation
  repeated core.Identifier identifier = 10;

  // Fulfills plan, proposal or order
  repeated core.Reference based_on = 11 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "DeviceRequest",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // Part of referenced event
  repeated core.Reference part_of = 12 [
    (.google.fhir.proto.valid_reference_type) = "MedicationAdministration",
    (.google.fhir.proto.valid_reference_type) = "MedicationDispense",
    (.google.fhir.proto.valid_reference_type) = "MedicationStatement",
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "Immunization",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy"
  ];

  // registered | preliminary | final | amended +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/observation-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.ObservationStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Classification of  type of observation
  repeated core.CodeableConcept category = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Laboratory Test Name
  core.CodeableConcept code = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who and/or what the observation is about
  core.Reference subject = 16 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // What the observation is about, when it is not about the subject of record
  repeated core.Reference focus = 17
      [(.google.fhir.proto.valid_reference_type) = "Resource"];

  // Healthcare event during which this observation is made
  core.Reference encounter = 18
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Clinically relevant time/time-period for observation
  message EffectiveX {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "($this as dateTime).toString().length() >= 8";
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
    }
  }
  EffectiveX effective = 19;

  // Date/Time this version was made available
  core.Instant issued = 20;

  // Who is responsible for the observation
  repeated core.Reference performer = 21 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Result Value
  message ValueX {
    option (.google.fhir.proto.fhir_path_message_warning_constraint) =
        "valueCodeableConcept.coding.system.empty() or valueCodeableConcept.coding.system = 'http://snomed.info/sct'";
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Quantity quantity = 1;
      core.CodeableConcept codeable_concept = 2;
      core.String string_value = 3 [json_name = "string"];
      core.Boolean boolean = 4;
      core.Integer integer = 5;
      core.Range range = 6;
      core.Ratio ratio = 7;
      core.SampledData sampled_data = 8;
      core.Time time = 9;
      core.DateTime date_time = 10;
      core.Period period = 11;
    }
  }
  ValueX value = 22;

  // Why the result is missing
  core.CodeableConcept data_absent_reason = 23;

  // High, low, normal, etc.
  repeated core.CodeableConcept interpretation = 24;

  // Comments about the observation
  repeated core.Annotation note = 25;

  // Observed body part
  core.CodeableConcept body_site = 26;

  // How it was done
  core.CodeableConcept method = 27;

  // Specimen used for this observation
  core.Reference specimen = 28
      [(.google.fhir.proto.valid_reference_type) = "Specimen"];

  // (Measurement) Device
  core.Reference device = 29 [
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "DeviceMetric"
  ];

  // Provides guide for interpretation
  message ReferenceRange {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "low.exists() or high.exists() or text.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Low Range, if relevant
    core.SimpleQuantity low = 4;

    // High Range, if relevant
    core.SimpleQuantity high = 5;

    // Reference range qualifier
    core.CodeableConcept type = 6;

    // Reference range population
    repeated core.CodeableConcept applies_to = 7;

    // Applicable age range, if relevant
    core.Range age = 8;

    // Text based reference range in an observation
    core.String text = 9;
  }
  repeated ReferenceRange reference_range = 30;

  // Related resource that belongs to the Observation group
  repeated core.Reference has_member = 31 [
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence"
  ];

  // Related measurements the observation is made from
  repeated core.Reference derived_from = 32 [
    (.google.fhir.proto.valid_reference_type) = "DocumentReference",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy",
    (.google.fhir.proto.valid_reference_type) = "Media",
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence"
  ];

  // Component results
  message Component {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Type of component observation (code / type)
    core.CodeableConcept code = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Actual component result
    message ValueX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Quantity quantity = 1;
        core.CodeableConcept codeable_concept = 2;
        core.String string_value = 3 [json_name = "string"];
        core.Boolean boolean = 4;
        core.Integer integer = 5;
        core.Range range = 6;
        core.Ratio ratio = 7;
        core.SampledData sampled_data = 8;
        core.Time time = 9;
        core.DateTime date_time = 10;
        core.Period period = 11;
      }
    }
    ValueX value = 5;

    // Why the component result is missing
    core.CodeableConcept data_absent_reason = 6;

    // High, low, normal, etc.
    repeated core.CodeableConcept interpretation = 7;

    // Provides guide for interpretation of component result
    repeated ReferenceRange reference_range = 8;
  }
  repeated Component component = 33;

  // field 34 reserved for Observation.category:Laboratory which uses an
  // unsupported slicing on CodeableConcept
  reserved 34;
}

// Auto-generated from StructureDefinition for USCoreLocation.
// Details and position information for a physical place.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-location
message USCoreLocation {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Location";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-location";
  option (.google.fhir.proto.search_parameter) = {
    name: "address"
    type: STRING
    expression: "Location.address"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-city"
    type: STRING
    expression: "Location.address.city"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-country"
    type: STRING
    expression: "Location.address.country"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-postalcode"
    type: STRING
    expression: "Location.address.postalCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-state"
    type: STRING
    expression: "Location.address.state"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-use"
    type: TOKEN
    expression: "Location.address.use"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "endpoint"
    type: REFERENCE
    expression: "Location.endpoint"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "Location.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "name"
    type: STRING
    expression: "Location.name | Location.alias"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "near"
    type: SPECIAL
    expression: "Location.position"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "operational-status"
    type: TOKEN
    expression: "Location.operationalStatus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "organization"
    type: REFERENCE
    expression: "Location.managingOrganization"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "partof"
    type: REFERENCE
    expression: "Location.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Location.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "type"
    type: TOKEN
    expression: "Location.type"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Location.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Unique code or number identifying the location to its users
  repeated core.Identifier identifier = 10;

  // active | suspended | inactive
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/location-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.LocationStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 11;

  // The operational status of the location (typically only for a bed/room)
  core.Coding operational_status = 12;

  // Name of the location as used by humans
  core.String name = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // A list of alternate names that the location is known as, or was known as,
  // in the past
  repeated core.String alias = 14;

  // Additional details about the location that could be displayed as further
  // information to identify the location beyond its name
  core.String description = 15;

  // instance | kind
  message ModeCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/location-mode";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.LocationModeCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  ModeCode mode = 16;

  // Type of function performed
  repeated core.CodeableConcept type = 17;

  // Contact details of the location
  repeated core.ContactPoint telecom = 18;

  // Physical location
  core.Address address = 19;

  // Physical form of the location
  core.CodeableConcept physical_type = 20;

  // The absolute geographic location
  message Position {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Longitude with WGS84 datum
    core.Decimal longitude = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Latitude with WGS84 datum
    core.Decimal latitude = 5
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Altitude with WGS84 datum
    core.Decimal altitude = 6;
  }
  Position position = 21;

  // Organization responsible for provisioning and upkeep
  core.Reference managing_organization = 22
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // Another Location this one is physically a part of
  core.Reference part_of = 23
      [(.google.fhir.proto.valid_reference_type) = "Location"];

  // What days/times during a week is this location usually open
  message HoursOfOperation {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // mon | tue | wed | thu | fri | sat | sun
    message DaysOfWeekCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/days-of-week";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.DaysOfWeekCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    repeated DaysOfWeekCode days_of_week = 4;

    // The Location is open all day
    core.Boolean all_day = 5;

    // Time that the Location opens
    core.Time opening_time = 6;

    // Time that the Location closes
    core.Time closing_time = 7;
  }
  repeated HoursOfOperation hours_of_operation = 24;

  // Description of availability exceptions
  core.String availability_exceptions = 25;

  // Technical endpoints providing access to services operated for the location
  repeated core.Reference endpoint = 26
      [(.google.fhir.proto.valid_reference_type) = "Endpoint"];
}

// Auto-generated from StructureDefinition for USCoreMedicationProfile.
// Definition of a Medication.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication
message USCoreMedicationProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Medication";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication";
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "expiration-date"
    type: DATE
    expression: "Medication.batch.expirationDate"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "form"
    type: TOKEN
    expression: "Medication.form"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "Medication.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "ingredient"
    type: REFERENCE
    expression: "(Medication.ingredient.item as Reference)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "ingredient-code"
    type: TOKEN
    expression: "(Medication.ingredient.item as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "lot-number"
    type: TOKEN
    expression: "Medication.batch.lotNumber"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "manufacturer"
    type: REFERENCE
    expression: "Medication.manufacturer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Medication.status"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Medication.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business identifier for this medication
  repeated core.Identifier identifier = 10;

  // Codes that identify this medication
  core.CodeableConcept code = 11
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // active | inactive | entered-in-error
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/medication-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.MedicationStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 12;

  // Manufacturer of the item
  core.Reference manufacturer = 13
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // powder | tablets | capsule +
  core.CodeableConcept form = 14;

  // Amount of drug in package
  core.Ratio amount = 15;

  // Active or inactive ingredient
  message Ingredient {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The actual ingredient or content
    message ItemX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.CodeableConcept codeable_concept = 1;
        core.Reference reference = 2 [
          (.google.fhir.proto.valid_reference_type) = "Substance",
          (.google.fhir.proto.valid_reference_type) = "Medication"
        ];
      }
    }
    ItemX item = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Active ingredient indicator
    core.Boolean is_active = 5;

    // Quantity of ingredient present
    core.Ratio strength = 6;
  }
  repeated Ingredient ingredient = 16;

  // Details about packaged medications
  message Batch {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Identifier assigned to batch
    core.String lot_number = 4;

    // When batch will expire
    core.DateTime expiration_date = 5;
  }
  Batch batch = 17;
}

// Auto-generated from StructureDefinition for USCoreMedicationRequestProfile.
// Ordering of medication for patient or group.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest
message USCoreMedicationRequestProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/MedicationRequest";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest";
  option (.google.fhir.proto.search_parameter) = {
    name: "authoredon"
    type: DATE
    expression: "MedicationRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "MedicationRequest.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "MedicationRequest.dosageInstruction.timing.event"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "MedicationRequest.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "intended-dispenser"
    type: REFERENCE
    expression: "MedicationRequest.dispenseRequest.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "intended-performer"
    type: REFERENCE
    expression: "MedicationRequest.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "intended-performertype"
    type: TOKEN
    expression: "MedicationRequest.performerType"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "intent"
    type: TOKEN
    expression: "MedicationRequest.intent"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "medication"
    type: REFERENCE
    expression: "(MedicationAdministration.medication as Reference) | (MedicationDispense.medication as Reference) | (MedicationRequest.medication as Reference) | (MedicationStatement.medication as Reference)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "priority"
    type: TOKEN
    expression: "MedicationRequest.priority"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "requester"
    type: REFERENCE
    expression: "MedicationRequest.requester"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "MedicationAdministration.status | MedicationDispense.status | MedicationRequest.status | MedicationStatement.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "MedicationRequest.subject"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // MedicationRequest.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // External ids for this request
  repeated core.Identifier identifier = 10;

  // active | on-hold | cancelled | completed | entered-in-error | stopped |
  // draft | unknown
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/medicationrequest-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.MedicationrequestStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 11
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Reason for current status
  core.CodeableConcept status_reason = 12;

  // proposal | plan | order | original-order | reflex-order | filler-order |
  // instance-order | option
  message IntentCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/medicationrequest-intent";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.MedicationRequestIntentCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  IntentCode intent = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Type of medication usage
  repeated core.CodeableConcept category = 14;

  // routine | urgent | asap | stat
  message PriorityCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/request-priority";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.RequestPriorityCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  PriorityCode priority = 15;

  // True if request is prohibiting action
  core.Boolean do_not_perform = 16;

  // Reported rather than primary record
  message ReportedX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Boolean boolean = 1;
      core.Reference reference = 2 [
        (.google.fhir.proto.valid_reference_type) = "Patient",
        (.google.fhir.proto.valid_reference_type) = "Practitioner",
        (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
        (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
        (.google.fhir.proto.valid_reference_type) = "Organization"
      ];
    }
  }
  ReportedX reported = 17;

  // Medication to be taken
  message MedicationX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.CodeableConcept codeable_concept = 1;
      core.Reference reference = 2
          [(.google.fhir.proto.valid_reference_type) = "Medication"];
    }
  }
  MedicationX medication = 18
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who or group medication request is for
  core.Reference subject = 19 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Encounter created as part of encounter/admission/stay
  core.Reference encounter = 20
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Information to support ordering of the medication
  repeated core.Reference supporting_information = 21
      [(.google.fhir.proto.valid_reference_type) = "Resource"];

  // When request was initially authored
  core.DateTime authored_on = 22
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who/What requested the Request
  core.Reference requester = 23 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Intended performer of administration
  core.Reference performer = 24 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
    (.google.fhir.proto.valid_reference_type) = "CareTeam"
  ];

  // Desired kind of performer of the medication administration
  core.CodeableConcept performer_type = 25;

  // Person who entered the request
  core.Reference recorder = 26 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole"
  ];

  // Reason or indication for ordering or not ordering the medication
  repeated core.CodeableConcept reason_code = 27;

  // Condition or observation that supports why the prescription is being
  // written
  repeated core.Reference reason_reference = 28 [
    (.google.fhir.proto.valid_reference_type) = "Condition",
    (.google.fhir.proto.valid_reference_type) = "Observation"
  ];

  // Instantiates FHIR protocol or definition
  repeated core.Canonical instantiates_canonical = 29;

  // Instantiates external protocol or definition
  repeated core.Uri instantiates_uri = 30;

  // What request fulfills
  repeated core.Reference based_on = 31 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation"
  ];

  // Composite request this is part of
  core.Identifier group_identifier = 32;

  // Overall pattern of medication administration
  core.CodeableConcept course_of_therapy_type = 33;

  // Associated insurance coverage
  repeated core.Reference insurance = 34 [
    (.google.fhir.proto.valid_reference_type) = "Coverage",
    (.google.fhir.proto.valid_reference_type) = "ClaimResponse"
  ];

  // Information about the prescription
  repeated core.Annotation note = 35;

  // How the medication should be taken
  repeated core.Dosage dosage_instruction = 36;

  // Medication supply authorization
  message DispenseRequest {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // First fill details
    message InitialFill {
      // Unique id for inter-element referencing
      core.String id = 1;

      // Additional content defined by implementations
      repeated core.Extension extension = 2;

      // Extensions that cannot be ignored even if unrecognized
      repeated core.Extension modifier_extension = 3;

      // First fill quantity
      core.SimpleQuantity quantity = 4;

      // First fill duration
      core.Duration duration = 5;
    }
    InitialFill initial_fill = 4;

    // Minimum period of time between dispenses
    core.Duration dispense_interval = 5;

    // Time period supply is authorized for
    core.Period validity_period = 6;

    // Number of refills authorized
    core.UnsignedInt number_of_repeats_allowed = 7;

    // Amount of medication to supply per dispense
    core.SimpleQuantity quantity = 8;

    // Number of days supply per dispense
    core.Duration expected_supply_duration = 9;

    // Intended dispenser
    core.Reference performer = 10
        [(.google.fhir.proto.valid_reference_type) = "Organization"];
  }
  DispenseRequest dispense_request = 37;

  // Any restrictions on medication substitution
  message Substitution {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Whether substitution is allowed or not
    message AllowedX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Boolean boolean = 1;
        core.CodeableConcept codeable_concept = 2;
      }
    }
    AllowedX allowed = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Why should (not) substitution be made
    core.CodeableConcept reason = 5;
  }
  Substitution substitution = 38;

  // An order/prescription that is being replaced
  core.Reference prior_prescription = 39
      [(.google.fhir.proto.valid_reference_type) = "MedicationRequest"];

  // Clinical Issue with action
  repeated core.Reference detected_issue = 40
      [(.google.fhir.proto.valid_reference_type) = "DetectedIssue"];

  // A list of events of interest in the lifecycle
  repeated core.Reference event_history = 41
      [(.google.fhir.proto.valid_reference_type) = "Provenance"];
}

// Auto-generated from StructureDefinition for USCoreOrganizationProfile.
// A grouping of people or organizations with a common purpose.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
message USCoreOrganizationProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Organization";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "(identifier.count() + name.count()) > 0";
  option (.google.fhir.proto.search_parameter) = {
    name: "active"
    type: TOKEN
    expression: "Organization.active"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address"
    type: STRING
    expression: "Organization.address"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-city"
    type: STRING
    expression: "Organization.address.city"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-country"
    type: STRING
    expression: "Organization.address.country"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-postalcode"
    type: STRING
    expression: "Organization.address.postalCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-state"
    type: STRING
    expression: "Organization.address.state"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-use"
    type: TOKEN
    expression: "Organization.address.use"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "endpoint"
    type: REFERENCE
    expression: "Organization.endpoint"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "Organization.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "name"
    type: STRING
    expression: "Organization.name | Organization.alias"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "partof"
    type: REFERENCE
    expression: "Organization.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "phonetic"
    type: STRING
    expression: "Organization.name"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "type"
    type: TOKEN
    expression: "Organization.type"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Organization.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Identifies this organization  across multiple systems
  repeated core.Identifier identifier = 10;

  // Whether the organization's record is still in active use
  core.Boolean active = 11
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Kind of organization
  repeated core.CodeableConcept type = 12;

  // Name used for the organization
  core.String name = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // A list of alternate names that the organization is known as, or was known
  // as in the past
  repeated core.String alias = 14;

  // A contact detail for the organization
  repeated core.ContactPoint telecom = 15
      [(.google.fhir.proto.fhir_path_constraint) =
           "where(use = 'home').empty()"];

  // An address for the organization
  repeated core.Address address = 16
      [(.google.fhir.proto.fhir_path_constraint) =
           "where(use = 'home').empty()"];

  // The organization of which this organization forms a part
  core.Reference part_of = 17
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // Contact for the organization for a certain purpose
  message Contact {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The type of contact
    core.CodeableConcept purpose = 4;

    // A name associated with the contact
    core.HumanName name = 5;

    // Contact details (telephone, email, etc.)  for a contact
    repeated core.ContactPoint telecom = 6;

    // Visiting or postal addresses for the contact
    core.Address address = 7;
  }
  repeated Contact contact = 18;

  // Technical endpoints providing access to services operated for the
  // organization
  repeated core.Reference endpoint = 19
      [(.google.fhir.proto.valid_reference_type) = "Endpoint"];

  // field 20 reserved for Organization.identifier:NPI which uses an unsupported
  // slicing on Identifier
  reserved 20;

  // field 21 reserved for Organization.identifier:CLIA which uses an
  // unsupported slicing on Identifier
  reserved 21;
}

// Auto-generated from StructureDefinition for USCorePatientProfile.
// Information about an individual or animal receiving health care services.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
message USCorePatientProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Patient";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient";
  option (.google.fhir.proto.search_parameter) = {
    name: "Example Search Parameter on an extension"
    type: REFERENCE
    expression: "DocumentReference.extension('http://example.org/fhir/StructureDefinition/participation-agreement')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "active"
    type: TOKEN
    expression: "Patient.active"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address"
    type: STRING
    expression: "Patient.address | Person.address | Practitioner.address | RelatedPerson.address"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-city"
    type: STRING
    expression: "Patient.address.city | Person.address.city | Practitioner.address.city | RelatedPerson.address.city"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-country"
    type: STRING
    expression: "Patient.address.country | Person.address.country | Practitioner.address.country | RelatedPerson.address.country"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-postalcode"
    type: STRING
    expression: "Patient.address.postalCode | Person.address.postalCode | Practitioner.address.postalCode | RelatedPerson.address.postalCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-state"
    type: STRING
    expression: "Patient.address.state | Person.address.state | Practitioner.address.state | RelatedPerson.address.state"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-use"
    type: TOKEN
    expression: "Patient.address.use | Person.address.use | Practitioner.address.use | RelatedPerson.address.use"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "birthdate"
    type: DATE
    expression: "Patient.birthDate | Person.birthDate | RelatedPerson.birthDate"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "death-date"
    type: DATE
    expression: "(Patient.deceased as dateTime)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "deceased"
    type: TOKEN
    expression: "Patient.deceased.exists() and Patient.deceased != false"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "email"
    type: TOKEN
    expression: "Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "family"
    type: STRING
    expression: "Patient.name.family | Practitioner.name.family"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gender"
    type: TOKEN
    expression: "Patient.gender | Person.gender | Practitioner.gender | RelatedPerson.gender"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "general-practitioner"
    type: REFERENCE
    expression: "Patient.generalPractitioner"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "given"
    type: STRING
    expression: "Patient.name.given | Practitioner.name.given"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "Patient.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "language"
    type: TOKEN
    expression: "Patient.communication.language"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "link"
    type: REFERENCE
    expression: "Patient.link.other"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "name"
    type: STRING
    expression: "Patient.name"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "organization"
    type: REFERENCE
    expression: "Patient.managingOrganization"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "phone"
    type: TOKEN
    expression: "Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "phonetic"
    type: STRING
    expression: "Patient.name | Person.name | Practitioner.name | RelatedPerson.name"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "telecom"
    type: TOKEN
    expression: "Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.telecom | RelatedPerson.telecom"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Patient.contained
  reserved 7;

  // Extension
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // An identifier for this patient
  repeated core.Identifier identifier = 10
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Whether this patient's record is in active use
  core.Boolean active = 11;

  // A name associated with the patient
  repeated core.HumanName name = 12 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.fhir_path_constraint) =
        "family.exists() or given.exists()"
  ];

  // A contact detail for the individual
  repeated core.ContactPoint telecom = 13;

  // male | female | other | unknown
  message GenderCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/administrative-gender";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.AdministrativeGenderCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  GenderCode gender = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // The date of birth for the individual
  core.Date birth_date = 15;

  // Indicates if the individual is deceased or not
  message DeceasedX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Boolean boolean = 1;
      core.DateTime date_time = 2;
    }
  }
  DeceasedX deceased = 16;

  // An address for the individual
  repeated core.Address address = 17;

  // Marital (civil) status of a patient
  core.CodeableConcept marital_status = 18;

  // Whether patient is part of a multiple birth
  message MultipleBirthX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Boolean boolean = 1;
      core.Integer integer = 2;
    }
  }
  MultipleBirthX multiple_birth = 19;

  // Image of the patient
  repeated core.Attachment photo = 20;

  // A contact party (e.g. guardian, partner, friend) for the patient
  message Contact {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "name.exists() or telecom.exists() or address.exists() or organization.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The kind of relationship
    repeated core.CodeableConcept relationship = 4;

    // A name associated with the contact person
    core.HumanName name = 5;

    // A contact detail for the person
    repeated core.ContactPoint telecom = 6;

    // Address for the contact person
    core.Address address = 7;

    // male | female | other | unknown
    message GenderCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/administrative-gender";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.AdministrativeGenderCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    GenderCode gender = 8;

    // Organization that is associated with the contact
    core.Reference organization = 9
        [(.google.fhir.proto.valid_reference_type) = "Organization"];

    // The period during which this contact person or organization is valid to
    // be contacted relating to this patient
    core.Period period = 10;
  }
  repeated Contact contact = 21;

  // A language which may be used to communicate with the patient about his or
  // her health
  message Communication {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The language which can be used to communicate with the patient about his
    // or her health
    core.CodeableConcept language = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Language preference indicator
    core.Boolean preferred = 5;
  }
  repeated Communication communication = 22;

  // Patient's nominated primary care provider
  repeated core.Reference general_practitioner = 23 [
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole"
  ];

  // Organization that is the custodian of the patient record
  core.Reference managing_organization = 24
      [(.google.fhir.proto.valid_reference_type) = "Organization"];

  // Link to another patient resource that concerns the same actual person
  message Link {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // The other patient or related person resource that the link refers to
    core.Reference other = 4 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Patient",
      (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
    ];

    // replaced-by | replaces | refer | seealso
    message TypeCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/link-type";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.LinkTypeCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    TypeCode type = 5
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];
  }
  repeated Link link = 25;

  // US Core Race Extension
  PatientUSCoreRaceExtension race = 26
      [(.google.fhir.proto.fhir_inlined_extension_url) =
           "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"];

  // US Core ethnicity Extension
  PatientUSCoreEthnicityExtension ethnicity = 27
      [(.google.fhir.proto.fhir_inlined_extension_url) =
           "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"];

  // Extension
  PatientUSCoreBirthSexExtension.ValueCode birthsex = 28
      [(.google.fhir.proto.fhir_inlined_extension_url) =
           "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"];
}

// Auto-generated from StructureDefinition for
// USCorePediatricBMIforAgeObservationProfile. FHIR Vital Signs Profile. See
// http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age
message USCorePediatricBMIforAgeObservationProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/vitalsigns";
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Observation";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "dataAbsentReason.empty() or value.empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())";
  option (.google.fhir.proto.search_parameter) = {
    name: "amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "Observation.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Observation.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-concept"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-date"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-quantity"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-string"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code"
    type: TOKEN
    expression: "Observation.code | Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-concept"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-quantity"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason | Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept) | (Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData) | (Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code"
    type: TOKEN
    expression: "Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-concept"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-quantity"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-data-absent-reason"
    type: TOKEN
    expression: "Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-concept"
    type: TOKEN
    expression: "(Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-quantity"
    type: QUANTITY
    expression: "(Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "derived-from"
    type: REFERENCE
    expression: "Observation.derivedFrom"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "device"
    type: REFERENCE
    expression: "Observation.device"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "dna-variant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "focus"
    type: REFERENCE
    expression: "Observation.focus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-dnavariant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-identifier"
    type: TOKEN
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsGene')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "has-member"
    type: REFERENCE
    expression: "Observation.hasMember"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "method"
    type: TOKEN
    expression: "Observation.method"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "Observation.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "Observation.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specimen"
    type: REFERENCE
    expression: "Observation.specimen"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Observation.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Observation.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-date"
    type: DATE
    expression: "(Observation.value as dateTime) | (Observation.value as Period)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-string"
    type: STRING
    expression: "(Observation.value as string) | (Observation.value as CodeableConcept).text"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Observation.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business Identifier for observation
  repeated core.Identifier identifier = 10;

  // Fulfills plan, proposal or order
  repeated core.Reference based_on = 11 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "DeviceRequest",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // Part of referenced event
  repeated core.Reference part_of = 12 [
    (.google.fhir.proto.valid_reference_type) = "MedicationAdministration",
    (.google.fhir.proto.valid_reference_type) = "MedicationDispense",
    (.google.fhir.proto.valid_reference_type) = "MedicationStatement",
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "Immunization",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy"
  ];

  // registered | preliminary | final | amended +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/observation-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.ObservationStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Classification of  type of observation
  repeated core.CodeableConcept category = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // BMI percentile per age and sex for youth 2-20
  core.CodeableConcept code = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who and/or what the observation is about
  core.Reference subject = 16 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // What the observation is about, when it is not about the subject of record
  repeated core.Reference focus = 17
      [(.google.fhir.proto.valid_reference_type) = "Resource"];

  // Healthcare event during which this observation is made
  core.Reference encounter = 18
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Often just a dateTime for Vital Signs
  message EffectiveX {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "($this as dateTime).toString().length() >= 8";
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
    }
  }
  EffectiveX effective = 19
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Date/Time this version was made available
  core.Instant issued = 20;

  // Who is responsible for the observation
  repeated core.Reference performer = 21 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Vital Signs value are recorded using the Quantity data type. For supporting
  // observations such as Cuff size could use other datatypes such as
  // CodeableConcept.
  message ValueX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Quantity quantity = 1;
    }
  }
  ValueX value = 22
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Why the result is missing
  core.CodeableConcept data_absent_reason = 23;

  // High, low, normal, etc.
  repeated core.CodeableConcept interpretation = 24;

  // Comments about the observation
  repeated core.Annotation note = 25;

  // Observed body part
  core.CodeableConcept body_site = 26;

  // How it was done
  core.CodeableConcept method = 27;

  // Specimen used for this observation
  core.Reference specimen = 28
      [(.google.fhir.proto.valid_reference_type) = "Specimen"];

  // (Measurement) Device
  core.Reference device = 29 [
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "DeviceMetric"
  ];

  // Provides guide for interpretation
  message ReferenceRange {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "low.exists() or high.exists() or text.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Low Range, if relevant
    core.SimpleQuantity low = 4;

    // High Range, if relevant
    core.SimpleQuantity high = 5;

    // Reference range qualifier
    core.CodeableConcept type = 6;

    // Reference range population
    repeated core.CodeableConcept applies_to = 7;

    // Applicable age range, if relevant
    core.Range age = 8;

    // Text based reference range in an observation
    core.String text = 9;
  }
  repeated ReferenceRange reference_range = 30;

  // Used when reporting vital signs panel components
  repeated core.Reference has_member = 31 [
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence",
    (.google.fhir.proto.valid_reference_type) = "Observation"
  ];

  // Related measurements the observation is made from
  repeated core.Reference derived_from = 32 [
    (.google.fhir.proto.valid_reference_type) = "DocumentReference",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy",
    (.google.fhir.proto.valid_reference_type) = "Media",
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence",
    (.google.fhir.proto.valid_reference_type) = "Observation"
  ];

  // Used when reporting systolic and diastolic blood pressure.
  message Component {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "value.exists() or dataAbsentReason.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Type of component observation (code / type)
    core.CodeableConcept code = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Vital Sign Value recorded with UCUM
    message ValueX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Quantity quantity = 1;
        core.CodeableConcept codeable_concept = 2;
        core.String string_value = 3 [json_name = "string"];
        core.Boolean boolean = 4;
        core.Integer integer = 5;
        core.Range range = 6;
        core.Ratio ratio = 7;
        core.SampledData sampled_data = 8;
        core.Time time = 9;
        core.DateTime date_time = 10;
        core.Period period = 11;
      }
    }
    ValueX value = 5;

    // Why the component result is missing
    core.CodeableConcept data_absent_reason = 6;

    // High, low, normal, etc.
    repeated core.CodeableConcept interpretation = 7;

    // Provides guide for interpretation of component result
    repeated ReferenceRange reference_range = 8;
  }
  repeated Component component = 33;

  // field 34 reserved for Observation.category:VSCat which uses an unsupported
  // slicing on CodeableConcept
  reserved 34;
}

// Auto-generated from StructureDefinition for
// USCorePediatricWeightForHeightObservationProfile. FHIR Vital Signs Profile.
// See
// http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height
message USCorePediatricWeightForHeightObservationProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/vitalsigns";
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Observation";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "dataAbsentReason.empty() or value.empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())";
  option (.google.fhir.proto.search_parameter) = {
    name: "amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "Observation.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Observation.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-concept"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-date"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-quantity"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-string"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code"
    type: TOKEN
    expression: "Observation.code | Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-concept"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-quantity"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason | Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept) | (Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData) | (Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code"
    type: TOKEN
    expression: "Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-concept"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-quantity"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-data-absent-reason"
    type: TOKEN
    expression: "Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-concept"
    type: TOKEN
    expression: "(Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-quantity"
    type: QUANTITY
    expression: "(Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "derived-from"
    type: REFERENCE
    expression: "Observation.derivedFrom"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "device"
    type: REFERENCE
    expression: "Observation.device"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "dna-variant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "focus"
    type: REFERENCE
    expression: "Observation.focus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-dnavariant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-identifier"
    type: TOKEN
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsGene')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "has-member"
    type: REFERENCE
    expression: "Observation.hasMember"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "method"
    type: TOKEN
    expression: "Observation.method"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "Observation.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "Observation.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specimen"
    type: REFERENCE
    expression: "Observation.specimen"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Observation.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Observation.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-date"
    type: DATE
    expression: "(Observation.value as dateTime) | (Observation.value as Period)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-string"
    type: STRING
    expression: "(Observation.value as string) | (Observation.value as CodeableConcept).text"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Observation.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business Identifier for observation
  repeated core.Identifier identifier = 10;

  // Fulfills plan, proposal or order
  repeated core.Reference based_on = 11 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "DeviceRequest",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // Part of referenced event
  repeated core.Reference part_of = 12 [
    (.google.fhir.proto.valid_reference_type) = "MedicationAdministration",
    (.google.fhir.proto.valid_reference_type) = "MedicationDispense",
    (.google.fhir.proto.valid_reference_type) = "MedicationStatement",
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "Immunization",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy"
  ];

  // registered | preliminary | final | amended +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/observation-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.ObservationStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Classification of  type of observation
  repeated core.CodeableConcept category = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Weight-for-length per age and gender
  core.CodeableConcept code = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who and/or what the observation is about
  core.Reference subject = 16 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // What the observation is about, when it is not about the subject of record
  repeated core.Reference focus = 17
      [(.google.fhir.proto.valid_reference_type) = "Resource"];

  // Healthcare event during which this observation is made
  core.Reference encounter = 18
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Often just a dateTime for Vital Signs
  message EffectiveX {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "($this as dateTime).toString().length() >= 8";
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
    }
  }
  EffectiveX effective = 19
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Date/Time this version was made available
  core.Instant issued = 20;

  // Who is responsible for the observation
  repeated core.Reference performer = 21 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Vital Signs value are recorded using the Quantity data type. For supporting
  // observations such as Cuff size could use other datatypes such as
  // CodeableConcept.
  message ValueX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Quantity quantity = 1;
    }
  }
  ValueX value = 22
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Why the result is missing
  core.CodeableConcept data_absent_reason = 23;

  // High, low, normal, etc.
  repeated core.CodeableConcept interpretation = 24;

  // Comments about the observation
  repeated core.Annotation note = 25;

  // Observed body part
  core.CodeableConcept body_site = 26;

  // How it was done
  core.CodeableConcept method = 27;

  // Specimen used for this observation
  core.Reference specimen = 28
      [(.google.fhir.proto.valid_reference_type) = "Specimen"];

  // (Measurement) Device
  core.Reference device = 29 [
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "DeviceMetric"
  ];

  // Provides guide for interpretation
  message ReferenceRange {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "low.exists() or high.exists() or text.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Low Range, if relevant
    core.SimpleQuantity low = 4;

    // High Range, if relevant
    core.SimpleQuantity high = 5;

    // Reference range qualifier
    core.CodeableConcept type = 6;

    // Reference range population
    repeated core.CodeableConcept applies_to = 7;

    // Applicable age range, if relevant
    core.Range age = 8;

    // Text based reference range in an observation
    core.String text = 9;
  }
  repeated ReferenceRange reference_range = 30;

  // Used when reporting vital signs panel components
  repeated core.Reference has_member = 31 [
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence",
    (.google.fhir.proto.valid_reference_type) = "Observation"
  ];

  // Related measurements the observation is made from
  repeated core.Reference derived_from = 32 [
    (.google.fhir.proto.valid_reference_type) = "DocumentReference",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy",
    (.google.fhir.proto.valid_reference_type) = "Media",
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence",
    (.google.fhir.proto.valid_reference_type) = "Observation"
  ];

  // Used when reporting systolic and diastolic blood pressure.
  message Component {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "value.exists() or dataAbsentReason.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Type of component observation (code / type)
    core.CodeableConcept code = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Vital Sign Value recorded with UCUM
    message ValueX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Quantity quantity = 1;
        core.CodeableConcept codeable_concept = 2;
        core.String string_value = 3 [json_name = "string"];
        core.Boolean boolean = 4;
        core.Integer integer = 5;
        core.Range range = 6;
        core.Ratio ratio = 7;
        core.SampledData sampled_data = 8;
        core.Time time = 9;
        core.DateTime date_time = 10;
        core.Period period = 11;
      }
    }
    ValueX value = 5;

    // Why the component result is missing
    core.CodeableConcept data_absent_reason = 6;

    // High, low, normal, etc.
    repeated core.CodeableConcept interpretation = 7;

    // Provides guide for interpretation of component result
    repeated ReferenceRange reference_range = 8;
  }
  repeated Component component = 33;

  // field 34 reserved for Observation.category:VSCat which uses an unsupported
  // slicing on CodeableConcept
  reserved 34;
}

// Auto-generated from StructureDefinition for USCorePractitionerProfile.
// A person with a  formal responsibility in the provisioning of healthcare or
// related services. See
// http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
message USCorePractitionerProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Practitioner";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner";
  option (.google.fhir.proto.search_parameter) = {
    name: "active"
    type: TOKEN
    expression: "Practitioner.active"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address"
    type: STRING
    expression: "Patient.address | Person.address | Practitioner.address | RelatedPerson.address"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-city"
    type: STRING
    expression: "Patient.address.city | Person.address.city | Practitioner.address.city | RelatedPerson.address.city"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-country"
    type: STRING
    expression: "Patient.address.country | Person.address.country | Practitioner.address.country | RelatedPerson.address.country"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-postalcode"
    type: STRING
    expression: "Patient.address.postalCode | Person.address.postalCode | Practitioner.address.postalCode | RelatedPerson.address.postalCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-state"
    type: STRING
    expression: "Patient.address.state | Person.address.state | Practitioner.address.state | RelatedPerson.address.state"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "address-use"
    type: TOKEN
    expression: "Patient.address.use | Person.address.use | Practitioner.address.use | RelatedPerson.address.use"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "communication"
    type: TOKEN
    expression: "Practitioner.communication"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "email"
    type: TOKEN
    expression: "Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "family"
    type: STRING
    expression: "Patient.name.family | Practitioner.name.family"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gender"
    type: TOKEN
    expression: "Patient.gender | Person.gender | Practitioner.gender | RelatedPerson.gender"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "given"
    type: STRING
    expression: "Patient.name.given | Practitioner.name.given"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "Practitioner.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "name"
    type: STRING
    expression: "Practitioner.name"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "phone"
    type: TOKEN
    expression: "Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "phonetic"
    type: STRING
    expression: "Patient.name | Person.name | Practitioner.name | RelatedPerson.name"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "telecom"
    type: TOKEN
    expression: "Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.telecom | RelatedPerson.telecom"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Practitioner.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // An identifier for the person as this agent
  repeated core.Identifier identifier = 10
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Whether this practitioner's record is in active use
  core.Boolean active = 11;

  // The name(s) associated with the practitioner
  repeated core.HumanName name = 12
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // A contact detail for the practitioner (that apply to all roles)
  repeated core.ContactPoint telecom = 13;

  // Address(es) of the practitioner that are not role specific (typically home
  // address)
  repeated core.Address address = 14;

  // male | female | other | unknown
  message GenderCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/administrative-gender";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.AdministrativeGenderCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  GenderCode gender = 15;

  // The date  on which the practitioner was born
  core.Date birth_date = 16;

  // Image of the person
  repeated core.Attachment photo = 17;

  // Certification, licenses, or training pertaining to the provision of care
  message Qualification {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // An identifier for this qualification for the practitioner
    repeated core.Identifier identifier = 4;

    // Coded representation of the qualification
    core.CodeableConcept code = 5
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Period during which the qualification is valid
    core.Period period = 6;

    // Organization that regulates and issues the qualification
    core.Reference issuer = 7
        [(.google.fhir.proto.valid_reference_type) = "Organization"];
  }
  repeated Qualification qualification = 18;

  // A language the practitioner can use in patient communication
  repeated core.CodeableConcept communication = 19;

  // field 20 reserved for Practitioner.identifier:NPI which uses an unsupported
  // slicing on Identifier
  reserved 20;
}

// Auto-generated from StructureDefinition for USCorePractitionerRoleProfile.
// Roles/organizations the practitioner is associated with.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole
message USCorePractitionerRoleProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/PractitionerRole";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole";
  option (.google.fhir.proto.search_parameter) = {
    name: "active"
    type: TOKEN
    expression: "PractitionerRole.active"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "PractitionerRole.period"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "email"
    type: TOKEN
    expression: "Patient.telecom.where(system='email') | Person.telecom.where(system='email') | Practitioner.telecom.where(system='email') | PractitionerRole.telecom.where(system='email') | RelatedPerson.telecom.where(system='email')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "endpoint"
    type: REFERENCE
    expression: "PractitionerRole.endpoint"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "PractitionerRole.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location"
    type: REFERENCE
    expression: "PractitionerRole.location"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "organization"
    type: REFERENCE
    expression: "PractitionerRole.organization"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "phone"
    type: TOKEN
    expression: "Patient.telecom.where(system='phone') | Person.telecom.where(system='phone') | Practitioner.telecom.where(system='phone') | PractitionerRole.telecom.where(system='phone') | RelatedPerson.telecom.where(system='phone')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "practitioner"
    type: REFERENCE
    expression: "PractitionerRole.practitioner"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "role"
    type: TOKEN
    expression: "PractitionerRole.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "service"
    type: REFERENCE
    expression: "PractitionerRole.healthcareService"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specialty"
    type: TOKEN
    expression: "PractitionerRole.specialty"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "telecom"
    type: TOKEN
    expression: "Patient.telecom | Person.telecom | Practitioner.telecom | PractitionerRole.telecom | RelatedPerson.telecom"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // PractitionerRole.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business Identifiers that are specific to a role/location
  repeated core.Identifier identifier = 10;

  // Whether this practitioner role record is in active use
  core.Boolean active = 11;

  // The period during which the practitioner is authorized to perform in these
  // role(s)
  core.Period period = 12;

  // Practitioner that is able to provide the defined services for the
  // organization
  core.Reference practitioner = 13 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Practitioner"
  ];

  // Organization where the roles are available
  core.Reference organization = 14 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Organization"
  ];

  // Roles which this practitioner may perform
  repeated core.CodeableConcept code = 15;

  // Specific specialty of the practitioner
  repeated core.CodeableConcept specialty = 16;

  // The location(s) at which this practitioner provides care
  repeated core.Reference location = 17
      [(.google.fhir.proto.valid_reference_type) = "Location"];

  // The list of healthcare services that this worker provides for this role's
  // Organization/Location(s)
  repeated core.Reference healthcare_service = 18
      [(.google.fhir.proto.valid_reference_type) = "HealthcareService"];

  // Contact details that are specific to the role/location/service
  repeated core.ContactPoint telecom = 19;

  // Times the Service Site is available
  message AvailableTime {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // mon | tue | wed | thu | fri | sat | sun
    message DaysOfWeekCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/days-of-week";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.DaysOfWeekCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    repeated DaysOfWeekCode days_of_week = 4;

    // Always available? e.g. 24 hour service
    core.Boolean all_day = 5;

    // Opening time of day (ignored if allDay = true)
    core.Time available_start_time = 6;

    // Closing time of day (ignored if allDay = true)
    core.Time available_end_time = 7;
  }
  repeated AvailableTime available_time = 20;

  // Not available during this time due to provided reason
  message NotAvailable {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Reason presented to the user explaining why time not available
    core.String description = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Service not available from this date
    core.Period during = 5;
  }
  repeated NotAvailable not_available = 21;

  // Description of availability exceptions
  core.String availability_exceptions = 22;

  // Technical endpoints providing access to services operated for the
  // practitioner with this role
  repeated core.Reference endpoint = 23
      [(.google.fhir.proto.valid_reference_type) = "Endpoint"];
}

// Auto-generated from StructureDefinition for USCoreProcedureProfile.
// An action that is being or was performed on a patient.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure
message USCoreProcedureProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Procedure";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure";
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "Procedure.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Procedure.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "instantiates-canonical"
    type: REFERENCE
    expression: "Procedure.instantiatesCanonical"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "instantiates-uri"
    type: URI
    expression: "Procedure.instantiatesUri"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location"
    type: REFERENCE
    expression: "Procedure.location"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "Procedure.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "Procedure.performer.actor"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reason-code"
    type: TOKEN
    expression: "Procedure.reasonCode"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "reason-reference"
    type: REFERENCE
    expression: "Procedure.reasonReference"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Procedure.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Procedure.subject"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Procedure.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // External Identifiers for this procedure
  repeated core.Identifier identifier = 10;

  // Instantiates FHIR protocol or definition
  repeated core.Canonical instantiates_canonical = 11;

  // Instantiates external protocol or definition
  repeated core.Uri instantiates_uri = 12;

  // A request for this procedure
  repeated core.Reference based_on = 13 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // Part of referenced event
  repeated core.Reference part_of = 14 [
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "MedicationAdministration"
  ];

  // preparation | in-progress | not-done | on-hold | stopped | completed |
  // entered-in-error | unknown
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/event-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.EventStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Reason for current status
  core.CodeableConcept status_reason = 16;

  // Classification of the procedure
  core.CodeableConcept category = 17;

  // Procedure codes from SNOMED CT, CPT, or HCPCS II
  core.CodeableConcept code = 18
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who the procedure was performed on
  core.Reference subject = 19 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Encounter created as part of
  core.Reference encounter = 20
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // When the procedure was performed
  message PerformedX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
    }
  }
  PerformedX performed = 21
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who recorded the procedure
  core.Reference recorder = 22 [
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole"
  ];

  // Person who asserts this procedure
  core.Reference asserter = 23 [
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole"
  ];

  // The people who performed the procedure
  message Performer {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Type of performance
    core.CodeableConcept function = 4;

    // The reference to the practitioner
    core.Reference actor = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Practitioner",
      (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
      (.google.fhir.proto.valid_reference_type) = "Organization",
      (.google.fhir.proto.valid_reference_type) = "Patient",
      (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
      (.google.fhir.proto.valid_reference_type) = "Device"
    ];

    // Organization the device or practitioner was acting for
    core.Reference on_behalf_of = 6
        [(.google.fhir.proto.valid_reference_type) = "Organization"];
  }
  repeated Performer performer = 24;

  // Where the procedure happened
  core.Reference location = 25
      [(.google.fhir.proto.valid_reference_type) = "Location"];

  // Coded reason procedure performed
  repeated core.CodeableConcept reason_code = 26;

  // The justification that the procedure was performed
  repeated core.Reference reason_reference = 27 [
    (.google.fhir.proto.valid_reference_type) = "Condition",
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "DiagnosticReport",
    (.google.fhir.proto.valid_reference_type) = "DocumentReference"
  ];

  // Target body sites
  repeated core.CodeableConcept body_site = 28;

  // The result of procedure
  core.CodeableConcept outcome = 29;

  // Any report resulting from the procedure
  repeated core.Reference report = 30 [
    (.google.fhir.proto.valid_reference_type) = "DiagnosticReport",
    (.google.fhir.proto.valid_reference_type) = "DocumentReference",
    (.google.fhir.proto.valid_reference_type) = "Composition"
  ];

  // Complication following the procedure
  repeated core.CodeableConcept complication = 31;

  // A condition that is a result of the procedure
  repeated core.Reference complication_detail = 32
      [(.google.fhir.proto.valid_reference_type) = "Condition"];

  // Instructions for follow up
  repeated core.CodeableConcept follow_up = 33;

  // Additional information about the procedure
  repeated core.Annotation note = 34;

  // Manipulated, implanted, or removed device
  message FocalDevice {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Kind of change to device
    core.CodeableConcept action = 4;

    // Device that was changed
    core.Reference manipulated = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Device"
    ];
  }
  repeated FocalDevice focal_device = 35;

  // Items used during procedure
  repeated core.Reference used_reference = 36 [
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "Medication",
    (.google.fhir.proto.valid_reference_type) = "Substance"
  ];

  // Coded items used during the procedure
  repeated core.CodeableConcept used_code = 37;
}

// Auto-generated from StructureDefinition for USCoreProvenance.
// US Core Provenance.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-provenance
message USCoreProvenance {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Provenance";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-provenance";
  option (.google.fhir.proto.search_parameter) = {
    name: "agent"
    type: REFERENCE
    expression: "Provenance.agent.who"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "agent-role"
    type: TOKEN
    expression: "Provenance.agent.role"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "agent-type"
    type: TOKEN
    expression: "Provenance.agent.type"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "entity"
    type: REFERENCE
    expression: "Provenance.entity.what"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "location"
    type: REFERENCE
    expression: "Provenance.location"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "Provenance.target.where(resolve() is Patient)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "recorded"
    type: DATE
    expression: "Provenance.recorded"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "signature-type"
    type: TOKEN
    expression: "Provenance.signature.type"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "target"
    type: REFERENCE
    expression: "Provenance.target"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "when"
    type: DATE
    expression: "(Provenance.occurred as dateTime)"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Provenance.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // The Resource this Provenance record supports
  repeated core.Reference target = 10 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Resource"
  ];

  // When the activity occurred
  message OccurredX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Period period = 1;
      core.DateTime date_time = 2;
    }
  }
  OccurredX occurred = 11;

  // Timestamp when the activity was recorded / updated
  core.Instant recorded = 12
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Policy or plan the activity was defined by
  repeated core.Uri policy = 13;

  // Where the activity occurred, if relevant
  core.Reference location = 14
      [(.google.fhir.proto.valid_reference_type) = "Location"];

  // Reason the activity is occurring
  repeated core.CodeableConcept reason = 15;

  // Activity that occurred
  core.CodeableConcept activity = 16;

  // Actor involved
  message Agent {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // How the agent participated
    core.CodeableConcept type = 4;

    // What the agents role was
    repeated core.CodeableConcept role = 5;

    // Who participated
    core.Reference who = 6 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Practitioner",
      (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
      (.google.fhir.proto.valid_reference_type) = "RelatedPerson",
      (.google.fhir.proto.valid_reference_type) = "Patient",
      (.google.fhir.proto.valid_reference_type) = "Device",
      (.google.fhir.proto.valid_reference_type) = "Organization"
    ];

    // Who the agent is representing
    core.Reference on_behalf_of = 7 [
      (.google.fhir.proto.valid_reference_type) = "Organization",
      (.google.fhir.proto.fhir_path_constraint) =
          "($this.agent.who.resolve().is Practitioner or Device) implies exists()"
    ];
  }
  repeated Agent agent = 17
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // An entity used in this activity
  message Entity {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // derivation | revision | quotation | source | removal
    message RoleCode {
      option (.google.fhir.proto.structure_definition_kind) =
          KIND_PRIMITIVE_TYPE;
      option (.google.fhir.proto.fhir_valueset_url) =
          "http://hl7.org/fhir/ValueSet/provenance-entity-role";
      option (.google.fhir.proto.fhir_profile_base) =
          "http://hl7.org/fhir/StructureDefinition/code";

      core.ProvenanceEntityRoleCode.Value value = 1;

      core.String id = 2;

      repeated core.Extension extension = 3;
    }
    RoleCode role = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Identity of entity
    core.Reference what = 5 [
      (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
      (.google.fhir.proto.valid_reference_type) = "Resource"
    ];

    // Entity is attributed to this agent
    repeated Agent agent = 6;
  }
  repeated Entity entity = 18;

  // Signature on target
  repeated core.Signature signature = 19;

  // field 20 reserved for Provenance.agent:ProvenanceAuthor which uses an
  // unsupported slicing on BackboneElement
  reserved 20;

  // field 21 reserved for Provenance.agent:ProvenanceTransmitter which uses an
  // unsupported slicing on BackboneElement
  reserved 21;
}

// Auto-generated from StructureDefinition for USCorePulseOximetryProfile.
// FHIR Oxygen Saturation Profile.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
message USCorePulseOximetryProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/oxygensat";
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/vitalsigns";
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Observation";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "dataAbsentReason.empty() or value.empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "(component.empty() and hasMember.empty()) implies (dataAbsentReason.exists() or value.exists())";
  option (.google.fhir.proto.search_parameter) = {
    name: "amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "Observation.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Observation.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-concept"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-date"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-quantity"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-string"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code"
    type: TOKEN
    expression: "Observation.code | Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-concept"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-quantity"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason | Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept) | (Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData) | (Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code"
    type: TOKEN
    expression: "Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-concept"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-quantity"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-data-absent-reason"
    type: TOKEN
    expression: "Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-concept"
    type: TOKEN
    expression: "(Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-quantity"
    type: QUANTITY
    expression: "(Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "derived-from"
    type: REFERENCE
    expression: "Observation.derivedFrom"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "device"
    type: REFERENCE
    expression: "Observation.device"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "dna-variant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "focus"
    type: REFERENCE
    expression: "Observation.focus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-dnavariant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-identifier"
    type: TOKEN
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsGene')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "has-member"
    type: REFERENCE
    expression: "Observation.hasMember"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "method"
    type: TOKEN
    expression: "Observation.method"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "Observation.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "Observation.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specimen"
    type: REFERENCE
    expression: "Observation.specimen"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Observation.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Observation.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-date"
    type: DATE
    expression: "(Observation.value as dateTime) | (Observation.value as Period)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-string"
    type: STRING
    expression: "(Observation.value as string) | (Observation.value as CodeableConcept).text"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Observation.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business Identifier for observation
  repeated core.Identifier identifier = 10;

  // Fulfills plan, proposal or order
  repeated core.Reference based_on = 11 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "DeviceRequest",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // Part of referenced event
  repeated core.Reference part_of = 12 [
    (.google.fhir.proto.valid_reference_type) = "MedicationAdministration",
    (.google.fhir.proto.valid_reference_type) = "MedicationDispense",
    (.google.fhir.proto.valid_reference_type) = "MedicationStatement",
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "Immunization",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy"
  ];

  // registered | preliminary | final | amended +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/ValueSet/observation-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    core.ObservationStatusCode.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Classification of  type of observation
  repeated core.CodeableConcept category = 14
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Oxygen Saturation by Pulse Oximetry
  message CodeableConceptForCode {
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/CodeableConcept";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Code defined by a terminology system
    repeated core.Coding coding = 3;

    // Plain text representation of the concept
    core.String text = 4;

    core.CodingWithFixedCode oxygen_sat_code = 5 [
      (.google.fhir.proto.fhir_inlined_coding_system) = "http://loinc.org",
      (.google.fhir.proto.fhir_inlined_coding_code) = "2708-6",
      json_name = "OxygenSatCode"
    ];

    core.CodingWithFixedCode pulse_ox = 6 [
      (.google.fhir.proto.fhir_inlined_coding_system) = "http://loinc.org",
      (.google.fhir.proto.fhir_inlined_coding_code) = "59408-5",
      json_name = "PulseOx"
    ];
  }
  CodeableConceptForCode code = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who and/or what the observation is about
  core.Reference subject = 16 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // What the observation is about, when it is not about the subject of record
  repeated core.Reference focus = 17
      [(.google.fhir.proto.valid_reference_type) = "Resource"];

  // Healthcare event during which this observation is made
  core.Reference encounter = 18
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Often just a dateTime for Vital Signs
  message EffectiveX {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "($this as dateTime).toString().length() >= 8";
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
    }
  }
  EffectiveX effective = 19
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Date/Time this version was made available
  core.Instant issued = 20;

  // Who is responsible for the observation
  repeated core.Reference performer = 21 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Vital Signs value are recorded using the Quantity data type. For supporting
  // observations such as Cuff size could use other datatypes such as
  // CodeableConcept.
  message ValueX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.Quantity quantity = 1;
    }
  }
  ValueX value = 22;

  // Why the result is missing
  core.CodeableConcept data_absent_reason = 23;

  // High, low, normal, etc.
  repeated core.CodeableConcept interpretation = 24;

  // Comments about the observation
  repeated core.Annotation note = 25;

  // Observed body part
  core.CodeableConcept body_site = 26;

  // How it was done
  core.CodeableConcept method = 27;

  // Specimen used for this observation
  core.Reference specimen = 28
      [(.google.fhir.proto.valid_reference_type) = "Specimen"];

  // (Measurement) Device
  core.Reference device = 29 [
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "DeviceMetric"
  ];

  // Provides guide for interpretation
  message ReferenceRange {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "low.exists() or high.exists() or text.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Low Range, if relevant
    core.SimpleQuantity low = 4;

    // High Range, if relevant
    core.SimpleQuantity high = 5;

    // Reference range qualifier
    core.CodeableConcept type = 6;

    // Reference range population
    repeated core.CodeableConcept applies_to = 7;

    // Applicable age range, if relevant
    core.Range age = 8;

    // Text based reference range in an observation
    core.String text = 9;
  }
  repeated ReferenceRange reference_range = 30;

  // Used when reporting vital signs panel components
  repeated core.Reference has_member = 31 [
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence",
    (.google.fhir.proto.valid_reference_type) = "Observation"
  ];

  // Related measurements the observation is made from
  repeated core.Reference derived_from = 32 [
    (.google.fhir.proto.valid_reference_type) = "DocumentReference",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy",
    (.google.fhir.proto.valid_reference_type) = "Media",
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence",
    (.google.fhir.proto.valid_reference_type) = "Observation"
  ];

  // Used when reporting systolic and diastolic blood pressure.
  message Component {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "value.exists() or dataAbsentReason.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Type of component observation (code / type)
    core.CodeableConcept code = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Vital Sign Value recorded with UCUM
    message ValueX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Quantity quantity = 1;
        core.CodeableConcept codeable_concept = 2;
        core.String string_value = 3 [json_name = "string"];
        core.Boolean boolean = 4;
        core.Integer integer = 5;
        core.Range range = 6;
        core.Ratio ratio = 7;
        core.SampledData sampled_data = 8;
        core.Time time = 9;
        core.DateTime date_time = 10;
        core.Period period = 11;
      }
    }
    ValueX value = 5;

    // Why the component result is missing
    core.CodeableConcept data_absent_reason = 6;

    // High, low, normal, etc.
    repeated core.CodeableConcept interpretation = 7;

    // Provides guide for interpretation of component result
    repeated ReferenceRange reference_range = 8;
  }
  repeated Component component = 33;

  // field 34 reserved for Observation.category:VSCat which uses an unsupported
  // slicing on CodeableConcept
  reserved 34;

  // field 35 reserved for Observation.component:FlowRate which uses an
  // unsupported slicing on BackboneElement
  reserved 35;

  // field 36 reserved for Observation.component:Concentration which uses an
  // unsupported slicing on BackboneElement
  reserved 36;
}

// Auto-generated from StructureDefinition for USCoreSmokingStatusProfile.
// Measurements and simple assertions.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus
message USCoreSmokingStatusProfile {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Observation";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "dataAbsentReason.empty() or value.empty()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "value.empty() or component.code.where(coding.intersect(%resource.code.coding).exists()).empty()";
  option (.google.fhir.proto.search_parameter) = {
    name: "amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "based-on"
    type: REFERENCE
    expression: "Observation.basedOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Observation.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-concept"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-date"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-quantity"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code-value-string"
    type: COMPOSITE
    expression: "Observation"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code"
    type: TOKEN
    expression: "Observation.code | Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-concept"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-code-value-quantity"
    type: COMPOSITE
    expression: "Observation | Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason | Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept) | (Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "combo-value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData) | (Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code"
    type: TOKEN
    expression: "Observation.component.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-concept"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-code-value-quantity"
    type: COMPOSITE
    expression: "Observation.component"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-data-absent-reason"
    type: TOKEN
    expression: "Observation.component.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-concept"
    type: TOKEN
    expression: "(Observation.component.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "component-value-quantity"
    type: QUANTITY
    expression: "(Observation.component.value as Quantity) | (Observation.component.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "data-absent-reason"
    type: TOKEN
    expression: "Observation.dataAbsentReason"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "date"
    type: DATE
    expression: "AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "derived-from"
    type: REFERENCE
    expression: "Observation.derivedFrom"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "device"
    type: REFERENCE
    expression: "Observation.device"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "dna-variant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "focus"
    type: REFERENCE
    expression: "Observation.focus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-amino-acid-change"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-dnavariant"
    type: STRING
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsDnaVariant')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "gene-identifier"
    type: TOKEN
    expression: "Observation.extension('http://hl7.org/fhir/StructureDefinition/observation-geneticsGene')"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "has-member"
    type: REFERENCE
    expression: "Observation.hasMember"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "method"
    type: TOKEN
    expression: "Observation.method"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "part-of"
    type: REFERENCE
    expression: "Observation.partOf"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "performer"
    type: REFERENCE
    expression: "Observation.performer"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "specimen"
    type: REFERENCE
    expression: "Observation.specimen"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "status"
    type: TOKEN
    expression: "Observation.status"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Observation.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-concept"
    type: TOKEN
    expression: "(Observation.value as CodeableConcept)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-date"
    type: DATE
    expression: "(Observation.value as dateTime) | (Observation.value as Period)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-quantity"
    type: QUANTITY
    expression: "(Observation.value as Quantity) | (Observation.value as SampledData)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "value-string"
    type: STRING
    expression: "(Observation.value as string) | (Observation.value as CodeableConcept).text"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Observation.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // Business Identifier for observation
  repeated core.Identifier identifier = 10;

  // Fulfills plan, proposal or order
  repeated core.Reference based_on = 11 [
    (.google.fhir.proto.valid_reference_type) = "CarePlan",
    (.google.fhir.proto.valid_reference_type) = "DeviceRequest",
    (.google.fhir.proto.valid_reference_type) = "ImmunizationRecommendation",
    (.google.fhir.proto.valid_reference_type) = "MedicationRequest",
    (.google.fhir.proto.valid_reference_type) = "NutritionOrder",
    (.google.fhir.proto.valid_reference_type) = "ServiceRequest"
  ];

  // Part of referenced event
  repeated core.Reference part_of = 12 [
    (.google.fhir.proto.valid_reference_type) = "MedicationAdministration",
    (.google.fhir.proto.valid_reference_type) = "MedicationDispense",
    (.google.fhir.proto.valid_reference_type) = "MedicationStatement",
    (.google.fhir.proto.valid_reference_type) = "Procedure",
    (.google.fhir.proto.valid_reference_type) = "Immunization",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy"
  ];

  // registered | preliminary | final | amended +
  message StatusCode {
    option (.google.fhir.proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE;
    option (.google.fhir.proto.fhir_valueset_url) =
        "http://hl7.org/fhir/us/core/ValueSet/us-core-observation-smoking-status-status";
    option (.google.fhir.proto.fhir_profile_base) =
        "http://hl7.org/fhir/StructureDefinition/code";

    USCoreObservationSmokingStatusStatusValueSet.Value value = 1;

    core.String id = 2;

    repeated core.Extension extension = 3;
  }
  StatusCode status = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Classification of  type of observation
  repeated core.CodeableConcept category = 14;

  // Smoking Status
  core.CodeableConcept code = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who and/or what the observation is about
  core.Reference subject = 16 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // What the observation is about, when it is not about the subject of record
  repeated core.Reference focus = 17
      [(.google.fhir.proto.valid_reference_type) = "Resource"];

  // Healthcare event during which this observation is made
  core.Reference encounter = 18
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Clinically relevant time/time-period for observation
  message EffectiveX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Period period = 2;
      core.Timing timing = 3;
      core.Instant instant = 4;
    }
  }
  EffectiveX effective = 19;

  // Date/Time this version was made available
  core.Instant issued = 20
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Who is responsible for the observation
  repeated core.Reference performer = 21 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Organization",
    (.google.fhir.proto.valid_reference_type) = "CareTeam",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Actual result
  message ValueX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.CodeableConcept codeable_concept = 2;
    }
  }
  ValueX value = 22
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Why the result is missing
  core.CodeableConcept data_absent_reason = 23;

  // High, low, normal, etc.
  repeated core.CodeableConcept interpretation = 24;

  // Comments about the observation
  repeated core.Annotation note = 25;

  // Observed body part
  core.CodeableConcept body_site = 26;

  // How it was done
  core.CodeableConcept method = 27;

  // Specimen used for this observation
  core.Reference specimen = 28
      [(.google.fhir.proto.valid_reference_type) = "Specimen"];

  // (Measurement) Device
  core.Reference device = 29 [
    (.google.fhir.proto.valid_reference_type) = "Device",
    (.google.fhir.proto.valid_reference_type) = "DeviceMetric"
  ];

  // Provides guide for interpretation
  message ReferenceRange {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "low.exists() or high.exists() or text.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Low Range, if relevant
    core.SimpleQuantity low = 4;

    // High Range, if relevant
    core.SimpleQuantity high = 5;

    // Reference range qualifier
    core.CodeableConcept type = 6;

    // Reference range population
    repeated core.CodeableConcept applies_to = 7;

    // Applicable age range, if relevant
    core.Range age = 8;

    // Text based reference range in an observation
    core.String text = 9;
  }
  repeated ReferenceRange reference_range = 30;

  // Related resource that belongs to the Observation group
  repeated core.Reference has_member = 31 [
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence"
  ];

  // Related measurements the observation is made from
  repeated core.Reference derived_from = 32 [
    (.google.fhir.proto.valid_reference_type) = "DocumentReference",
    (.google.fhir.proto.valid_reference_type) = "ImagingStudy",
    (.google.fhir.proto.valid_reference_type) = "Media",
    (.google.fhir.proto.valid_reference_type) = "QuestionnaireResponse",
    (.google.fhir.proto.valid_reference_type) = "Observation",
    (.google.fhir.proto.valid_reference_type) = "MolecularSequence"
  ];

  // Component results
  message Component {
    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Type of component observation (code / type)
    core.CodeableConcept code = 4
        [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

    // Actual component result
    message ValueX {
      option (.google.fhir.proto.is_choice_type) = true;

      oneof choice {
        core.Quantity quantity = 1;
        core.CodeableConcept codeable_concept = 2;
        core.String string_value = 3 [json_name = "string"];
        core.Boolean boolean = 4;
        core.Integer integer = 5;
        core.Range range = 6;
        core.Ratio ratio = 7;
        core.SampledData sampled_data = 8;
        core.Time time = 9;
        core.DateTime date_time = 10;
        core.Period period = 11;
      }
    }
    ValueX value = 5;

    // Why the component result is missing
    core.CodeableConcept data_absent_reason = 6;

    // High, low, normal, etc.
    repeated core.CodeableConcept interpretation = 7;

    // Provides guide for interpretation of component result
    repeated ReferenceRange reference_range = 8;
  }
  repeated Component component = 33;
}

// Auto-generated from StructureDefinition for USCoreCondition.
// Detailed information about conditions, problems or diagnoses.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition
message UsCoreCondition {
  option (.google.fhir.proto.structure_definition_kind) = KIND_RESOURCE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Condition";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "abatement.empty() or clinicalStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-clinical' and (code='resolved' or code='remission' or code='inactive')).exists()";
  option (.google.fhir.proto.fhir_path_message_constraint) =
      "verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code='entered-in-error').empty() or clinicalStatus.empty()";
  option (.google.fhir.proto.fhir_path_message_warning_constraint) =
      "clinicalStatus.exists() or verificationStatus.coding.where(system='http://terminology.hl7.org/CodeSystem/condition-ver-status' and code = 'entered-in-error').exists() or category.select($this='problem-list-item').empty()";
  option (.google.fhir.proto.fhir_path_message_warning_constraint) =
      "where(category in 'http://hl7.org/fhir/us/core/ValueSet/us-core-condition-category').exists()";
  option (.google.fhir.proto.search_parameter) = {
    name: "Example Search Parameter"
    type: REFERENCE
    expression: "Condition.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "abatement-age"
    type: QUANTITY
    expression: "Condition.abatement.as(Age) | Condition.abatement.as(Range)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "abatement-date"
    type: DATE
    expression: "Condition.abatement.as(dateTime) | Condition.abatement.as(Period)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "abatement-string"
    type: STRING
    expression: "Condition.abatement.as(string)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "asserter"
    type: REFERENCE
    expression: "Condition.asserter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "body-site"
    type: TOKEN
    expression: "Condition.bodySite"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "category"
    type: TOKEN
    expression: "Condition.category"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "clinical-status"
    type: TOKEN
    expression: "Condition.clinicalStatus"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "code"
    type: TOKEN
    expression: "AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationStatement.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "encounter"
    type: REFERENCE
    expression: "Condition.encounter"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "evidence"
    type: TOKEN
    expression: "Condition.evidence.code"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "evidence-detail"
    type: REFERENCE
    expression: "Condition.evidence.detail"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "identifier"
    type: TOKEN
    expression: "AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "onset-age"
    type: QUANTITY
    expression: "Condition.onset.as(Age) | Condition.onset.as(Range)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "onset-date"
    type: DATE
    expression: "Condition.onset.as(dateTime) | Condition.onset.as(Period)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "onset-info"
    type: STRING
    expression: "Condition.onset.as(string)"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "patient"
    type: REFERENCE
    expression: "AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "recorded-date"
    type: DATE
    expression: "Condition.recordedDate"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "severity"
    type: TOKEN
    expression: "Condition.severity"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "stage"
    type: TOKEN
    expression: "Condition.stage.summary"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "subject"
    type: REFERENCE
    expression: "Condition.subject"
  };
  option (.google.fhir.proto.search_parameter) = {
    name: "verification-status"
    type: TOKEN
    expression: "Condition.verificationStatus"
  };

  // Logical id of this artifact
  core.Id id = 1;

  // Metadata about the resource
  core.Meta meta = 2;

  // A set of rules under which this content was created
  core.Uri implicit_rules = 3;

  // Language of the resource content
  core.Code language = 4;

  // Text summary of the resource, for human interpretation
  core.Narrative text = 5;

  // Contained, inline Resources
  repeated protobuf.Any contained = 6;

  // Field 7 reserved for strongly-typed ContainedResource for id:
  // Condition.contained
  reserved 7;

  // Additional content defined by implementations
  repeated core.Extension extension = 8;

  // Extensions that cannot be ignored
  repeated core.Extension modifier_extension = 9;

  // External Ids for this condition
  repeated core.Identifier identifier = 10;

  // active | recurrence | relapse | inactive | remission | resolved
  core.CodeableConcept clinical_status = 11;

  // unconfirmed | provisional | differential | confirmed | refuted |
  // entered-in-error
  core.CodeableConcept verification_status = 12;

  // problem-list-item | encounter-diagnosis | health-concern
  repeated core.CodeableConcept category = 13
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Subjective severity of condition
  core.CodeableConcept severity = 14;

  // Identification of the condition, problem or diagnosis
  core.CodeableConcept code = 15
      [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR];

  // Anatomical location, if relevant
  repeated core.CodeableConcept body_site = 16;

  // Who has the condition?
  core.Reference subject = 17 [
    (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR,
    (.google.fhir.proto.valid_reference_type) = "Patient"
  ];

  // Encounter created as part of
  core.Reference encounter = 18
      [(.google.fhir.proto.valid_reference_type) = "Encounter"];

  // Estimated or actual date,  date-time, or age
  message OnsetX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Age age = 2;
      core.Period period = 3;
      core.Range range = 4;
      core.String string_value = 5 [json_name = "string"];
    }
  }
  OnsetX onset = 19;

  // When in resolution/remission
  message AbatementX {
    option (.google.fhir.proto.is_choice_type) = true;

    oneof choice {
      core.DateTime date_time = 1;
      core.Age age = 2;
      core.Period period = 3;
      core.Range range = 4;
      core.String string_value = 5 [json_name = "string"];
    }
  }
  AbatementX abatement = 20;

  // Date record was first recorded
  core.DateTime recorded_date = 21;

  // Who recorded the condition
  core.Reference recorder = 22 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Person who asserts this condition
  core.Reference asserter = 23 [
    (.google.fhir.proto.valid_reference_type) = "Practitioner",
    (.google.fhir.proto.valid_reference_type) = "PractitionerRole",
    (.google.fhir.proto.valid_reference_type) = "Patient",
    (.google.fhir.proto.valid_reference_type) = "RelatedPerson"
  ];

  // Stage/grade, usually assessed formally
  message Stage {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "summary.exists() or assessment.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Simple summary (disease specific)
    core.CodeableConcept summary = 4;

    // Formal record of assessment
    repeated core.Reference assessment = 5 [
      (.google.fhir.proto.valid_reference_type) = "ClinicalImpression",
      (.google.fhir.proto.valid_reference_type) = "DiagnosticReport",
      (.google.fhir.proto.valid_reference_type) = "Observation"
    ];

    // Kind of staging
    core.CodeableConcept type = 6;
  }
  repeated Stage stage = 24;

  // Supporting evidence
  message Evidence {
    option (.google.fhir.proto.fhir_path_message_constraint) =
        "code.exists() or detail.exists()";

    // Unique id for inter-element referencing
    core.String id = 1;

    // Additional content defined by implementations
    repeated core.Extension extension = 2;

    // Extensions that cannot be ignored even if unrecognized
    repeated core.Extension modifier_extension = 3;

    // Manifestation/symptom
    repeated core.CodeableConcept code = 4;

    // Supporting information found elsewhere
    repeated core.Reference detail = 5
        [(.google.fhir.proto.valid_reference_type) = "Resource"];
  }
  repeated Evidence evidence = 25;

  // Additional information about the Condition
  repeated core.Annotation note = 26;
}

// Auto-generated from StructureDefinition for USCoreDirectEmailExtension.
// Email is a "direct" email.
// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct
message UsCoreDirectEmail {
  option (.google.fhir.proto.structure_definition_kind) = KIND_COMPLEX_TYPE;
  option (.google.fhir.proto.fhir_profile_base) =
      "http://hl7.org/fhir/StructureDefinition/Extension";
  option (.google.fhir.proto.fhir_structure_definition_url) =
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct";

  // Unique id for inter-element referencing
  core.String id = 1;

  // Additional content defined by implementations
  repeated core.Extension extension = 2;

  // Value of extension
  core.Boolean value_boolean = 3;
}
