From 800389a21b0fee9f3c5a859fd584284e1499d9a9 Mon Sep 17 00:00:00 2001 From: Nick George Date: Sun, 7 Oct 2018 22:15:55 -0400 Subject: [PATCH] Adds US Core protos in a new package, google.fhir.stu3.uscore, along with prototxt testdata PiperOrigin-RevId: 216122362 --- examples/protogen/common.sh | 14 +- examples/protogen/generate-descriptors.sh | 9 + examples/protogen/generate-proto.sh | 17 +- java/BUILD | 4 + .../com/google/fhir/stu3/ProtoGenerator.java | 142 +- .../google/fhir/stu3/ProtoGeneratorTest.java | 43 +- proto/stu3/BUILD | 27 + proto/stu3/codes.proto | 7 +- proto/stu3/extensions.proto | 2 +- proto/stu3/uscore.proto | 2768 +++++++++++++++++ proto/stu3/uscore_codes.proto | 46 + testdata/stu3/BUILD | 8 + ...ension-goal-acceptance.descriptor.prototxt | 2 +- .../stu3/structure_definitions/uscore.proto | 2768 +++++++++++++++++ ...ore-allergyintolerance.descriptor.prototxt | 392 +++ ...ition-us-core-birthsex.descriptor.prototxt | 37 + ...ition-us-core-careplan.descriptor.prototxt | 624 ++++ ...ition-us-core-careteam.descriptor.prototxt | 285 ++ ...tion-us-core-condition.descriptor.prototxt | 461 +++ ...inition-us-core-device.descriptor.prototxt | 363 +++ ...-core-diagnosticreport.descriptor.prototxt | 394 +++ ...inition-us-core-direct.descriptor.prototxt | 37 + ...tion-us-core-ethnicity.descriptor.prototxt | 58 + ...efinition-us-core-goal.descriptor.prototxt | 380 +++ ...n-us-core-immunization.descriptor.prototxt | 588 ++++ ...ition-us-core-location.descriptor.prototxt | 303 ++ ...ion-us-core-medication.descriptor.prototxt | 459 +++ ...core-medicationrequest.descriptor.prototxt | 547 ++++ ...re-medicationstatement.descriptor.prototxt | 318 ++ ...ore-observationresults.descriptor.prototxt | 739 +++++ ...n-us-core-organization.descriptor.prototxt | 265 ++ ...nition-us-core-patient.descriptor.prototxt | 541 ++++ ...n-us-core-practitioner.descriptor.prototxt | 263 ++ ...tion-us-core-procedure.descriptor.prototxt | 492 +++ ...n-us-core-profile-link.descriptor.prototxt | 37 + ...efinition-us-core-race.descriptor.prototxt | 58 + ...-us-core-smokingstatus.descriptor.prototxt | 659 ++++ 37 files changed, 14100 insertions(+), 57 deletions(-) create mode 100644 proto/stu3/uscore.proto create mode 100644 proto/stu3/uscore_codes.proto create mode 100644 testdata/stu3/structure_definitions/uscore.proto create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-allergyintolerance.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-birthsex.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-careplan.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-careteam.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-condition.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-device.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-diagnosticreport.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-direct.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-ethnicity.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-goal.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-immunization.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-location.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-medication.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-medicationrequest.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-medicationstatement.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-observationresults.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-organization.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-patient.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-practitioner.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-procedure.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-profile-link.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-race.descriptor.prototxt create mode 100644 testdata/stu3/uscore/StructureDefinition-us-core-smokingstatus.descriptor.prototxt diff --git a/examples/protogen/common.sh b/examples/protogen/common.sh index a44b19910..b9e393a4f 100644 --- a/examples/protogen/common.sh +++ b/examples/protogen/common.sh @@ -28,23 +28,31 @@ RESOURCETYPES="Account ActivityDefinition AdverseEvent AllergyIntolerance Appoin PROFILES="Bmi Bodyheight Bodylength Bodytemp Bodyweight Bp Cholesterol Clinicaldocument Devicemetricobservation Diagnosticreport-genetics Elementdefinition-de Familymemberhistory-genetic Hdlcholesterol Headcircum Heartrate Hlaresult Ldlcholesterol Lipidprofile MetadataResource Observation-genetics Oxygensat Procedurerequest-genetics Resprate Shareablecodesystem Shareablevalueset Triglyceride Vitalsigns Vitalspanel" # LANG=C ensures ASCII sorting order EXTENSIONS=$(LANG=C ls $EXTENSION_PATH/extension-*.json) +EXTENSIONS=$(LANG=C ls $EXTENSION_PATH/extension-*.json) GOOGLE_EXTENSIONS=$(LANG=C ls $GOOGLE_EXTENSION_PATH/extension-*.json) +US_CORE_PROFILES=$(LANG=C ls $US_CORE_PATH/*.json) ALL_STU3_STRUCTURE_DEFINITIONS=$EXTENSIONS\ $(ls $INPUT_PATH/*.profile.json) -PROTO_PACKAGE="google.fhir.stu3.proto" +FHIR_PROTO_PACKAGE="google.fhir.stu3.proto" FHIR_JAVA_PROTO_PACKAGE="com.google.fhir.stu3.proto" FHIR_PROTO_ROOT="proto/stu3" GOOGLE_PROTO_PACKAGE="google.fhir.stu3.google" +GOOGLE_JAVA_PROTO_PACKAGE="com.google.fhir.stu3.google" + +US_CORE_PROTO_PACKAGE="google.fhir.stu3.uscore" +US_CORE_JAVA_PROTO_PACKAGE="com.google.fhir.stu3.uscore" -FHIR_KNOWN_TYPES=$PROTO_PACKAGE:$(echo $ALL_STU3_STRUCTURE_DEFINITIONS | tr " " ";") +FHIR_KNOWN_TYPES=$FHIR_PROTO_PACKAGE:$(echo $ALL_STU3_STRUCTURE_DEFINITIONS | tr " " ";") GOOGLE_KNOWN_TYPES=$GOOGLE_PROTO_PACKAGE:$(echo $GOOGLE_EXTENSIONS | tr " " ";") +US_CORE_KNOWN_TYPES=$US_CORE_PROTO_PACKAGE:$(echo $US_CORE_PROFILES | tr " " ";") NO_PACKAGE_FLAGS="\ --add_apache_license \ --known_types $FHIR_KNOWN_TYPES \ --known_types $GOOGLE_KNOWN_TYPES \ + --known_types $US_CORE_KNOWN_TYPES \ --fhir_proto_root "$FHIR_PROTO_ROOT"" COMMON_FLAGS="$NO_PACKAGE_FLAGS \ - --proto_package "$PROTO_PACKAGE" \ + --proto_package "$FHIR_PROTO_PACKAGE" \ --java_proto_package "$FHIR_JAVA_PROTO_PACKAGE"" diff --git a/examples/protogen/generate-descriptors.sh b/examples/protogen/generate-descriptors.sh index 24feb7af8..3238a7610 100755 --- a/examples/protogen/generate-descriptors.sh +++ b/examples/protogen/generate-descriptors.sh @@ -67,4 +67,13 @@ $PROTO_GENERATOR \ --output_directory $GOOGLE_EXTENSION_PATH \ $(for i in $GOOGLE_EXTENSIONS; do echo $i; done) +# Generate descriptors for US Core package. +$PROTO_GENERATOR \ + $NO_PACKAGE_FLAGS \ + --emit_descriptors \ + --proto_package $US_CORE_PROTO_PACKAGE \ + --java_proto_package $US_CORE_JAVA_PROTO_PACKAGE \ + --output_directory $US_CORE_PATH \ + $(for i in $US_CORE_PROFILES; do echo "$i"; done) + diff --git a/examples/protogen/generate-proto.sh b/examples/protogen/generate-proto.sh index ce0b5103d..226b41fe5 100755 --- a/examples/protogen/generate-proto.sh +++ b/examples/protogen/generate-proto.sh @@ -109,8 +109,21 @@ $PROTO_GENERATOR \ $PROTO_GENERATOR \ $NO_PACKAGE_FLAGS \ --emit_proto \ - --proto_package google.fhir.stu3.google \ - --java_proto_package com.google.fhir.stu3.google \ + --proto_package $GOOGLE_PROTO_PACKAGE \ + --java_proto_package $GOOGLE_JAVA_PROTO_PACKAGE \ --output_directory $OUTPUT_PATH \ --output_filename google_extensions.proto \ $(for i in $GOOGLE_EXTENSIONS; do echo "$i"; done) + +# generate US Core package +$PROTO_GENERATOR \ + $NO_PACKAGE_FLAGS \ + --emit_proto \ + --proto_package $US_CORE_PROTO_PACKAGE \ + --java_proto_package $US_CORE_JAVA_PROTO_PACKAGE \ + --include_resources \ + --include_metadatatypes \ + --additional_import "$FHIR_PROTO_ROOT/uscore_codes.proto" \ + --output_directory $OUTPUT_PATH \ + --output_filename uscore.proto \ + $(for i in $US_CORE_PROFILES; do echo "$i"; done) diff --git a/java/BUILD b/java/BUILD index 98ad174ae..38f577088 100644 --- a/java/BUILD +++ b/java/BUILD @@ -5,6 +5,8 @@ package( licenses(["notice"]) +# TODO(nickgeorge): remove dependency on uscore once we have json +# definitions of codes. java_library( name = "stu3", srcs = glob(["src/main/java/com/google/fhir/stu3/*.java"]), @@ -17,6 +19,7 @@ java_library( "//proto/stu3:extensions_java_proto", "//proto/stu3:metadatatypes_java_proto", "//proto/stu3:resources_java_proto", + "//proto/stu3:uscore_codes_java_proto", "@com_google_apis_google_api_services_bigquery//jar", "@com_google_http_client_google_http_client//jar", "@com_google_protobuf//:protobuf_java", @@ -231,6 +234,7 @@ java_test( "//testdata/stu3:extensions", "//testdata/stu3:google", "//testdata/stu3:structure_definitions", + "//testdata/stu3:uscore", ], test_class = "com.google.fhir.stu3.ProtoGeneratorTest", deps = [ diff --git a/java/src/main/java/com/google/fhir/stu3/ProtoGenerator.java b/java/src/main/java/com/google/fhir/stu3/ProtoGenerator.java index 17b6b4864..c462db818 100644 --- a/java/src/main/java/com/google/fhir/stu3/ProtoGenerator.java +++ b/java/src/main/java/com/google/fhir/stu3/ProtoGenerator.java @@ -22,6 +22,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.MoreCollectors; +import com.google.fhir.stu3.proto.AbstractTypeCode; import com.google.fhir.stu3.proto.Annotations; import com.google.fhir.stu3.proto.BindingStrengthCode; import com.google.fhir.stu3.proto.CodeableConcept; @@ -36,6 +37,7 @@ import com.google.fhir.stu3.proto.StructureDefinitionKindCode; import com.google.fhir.stu3.proto.TypeDerivationRuleCode; import com.google.fhir.stu3.proto.Uri; +import com.google.fhir.stu3.uscore.UsCoreBirthSexCode; import com.google.protobuf.DescriptorProtos.DescriptorProto; import com.google.protobuf.DescriptorProtos.EnumDescriptorProto; import com.google.protobuf.DescriptorProtos.EnumValueDescriptorProto; @@ -47,6 +49,7 @@ import com.google.protobuf.DescriptorProtos.OneofDescriptorProto; import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Descriptors.FieldDescriptor; +import com.google.protobuf.Descriptors.FileDescriptor; import com.google.protobuf.Message; import java.io.File; import java.util.ArrayList; @@ -123,6 +126,8 @@ public class ProtoGenerator { private final ImmutableMap structDefDataByUrl; // Mapping from urls for StructureDefinition to data about that StructureDefinition. private final ImmutableMap structDefDataById; + // Mapping from ValueSet url to Descriptor for the message type it should be inlined as. + private final ImmutableMap valueSetTypesByCodeReference; // The package to write new protos to. // When regenerating proto files defined by the fhir spec like Decimal or Patient, this will equal @@ -144,6 +149,16 @@ private static class StructureDefinitionData { } } + private static class QualifiedType { + final String type; + final String packageName; + + QualifiedType(String type, String packageName) { + this.type = type; + this.packageName = packageName; + } + } + // Token in a id string. The sequence of tokens forms a heirarchical relationship, where each // dot-delimited token is of the form pathpart:slicename/reslicename. // See https://www.hl7.org/fhir/elementdefinition.html#id @@ -200,6 +215,13 @@ public ProtoGenerator( this.goPackageName = goPackageName; this.fhirProtoRootPath = fhirProtoRootPath; + // TODO(nickgeorge): Do this with ValueSet resources once we have them + this.valueSetTypesByCodeReference = + new ImmutableMap.Builder() + .putAll(loadCodeTypesFromFile(AbstractTypeCode.getDescriptor().getFile())) + .putAll(loadCodeTypesFromFile(UsCoreBirthSexCode.getDescriptor().getFile())) + .build(); + Map mutableStructDefDataByUrl = new HashMap<>(); Map mutableStructDefDataById = new HashMap<>(); for (Map.Entry knownType : knownTypes.entrySet()) { @@ -210,13 +232,22 @@ public ProtoGenerator( throw new IllegalArgumentException( "Invalid FHIR structure definition: " + def.getId().getValue() + " has no url"); } - String inlineType = + boolean isSimpleInternalExtension = isSimpleInternalExtension( - def.getSnapshot().getElement(0), def.getSnapshot().getElementList()) - ? getSimpleExtensionDefinitionType(def) - : getTypeName(def); + def.getSnapshot().getElement(0), def.getSnapshot().getElementList()); + String inlineType; + String structDefPackage; + if (isSimpleInternalExtension) { + QualifiedType qualifiedType = getSimpleExtensionDefinitionType(def); + inlineType = qualifiedType.type; + structDefPackage = qualifiedType.packageName; + } else { + inlineType = getTypeName(def); + structDefPackage = protoPackage; + } + StructureDefinitionData structDefData = - new StructureDefinitionData(def, inlineType, protoPackage); + new StructureDefinitionData(def, inlineType, structDefPackage); mutableStructDefDataByUrl.put(def.getUrl().getValue(), structDefData); mutableStructDefDataById.put(def.getId().getValue(), structDefData); } @@ -224,6 +255,13 @@ public ProtoGenerator( this.structDefDataById = ImmutableMap.copyOf(mutableStructDefDataById); } + private static Map loadCodeTypesFromFile(FileDescriptor file) { + return file.getMessageTypes().stream() + .collect( + Collectors.toMap( + d -> d.getOptions().getExtension(Annotations.fhirValuesetUrl), d -> d)); + } + private static ImmutableMap getRenamedCodeTypes() { Map renamedCodeTypes = new HashMap<>(); renamedCodeTypes.put("ActivityDefinitionKindCode", "ResourceTypeCode"); @@ -303,7 +341,13 @@ public DescriptorProto generateProto(StructureDefinition def) { // Make sure the package the proto declared in is the same as it will be generated in. StructureDefinitionData structDefData = structDefDataByUrl.get(def.getUrl().getValue()); - if (structDefData != null && !structDefData.protoPackage.equals(packageName)) { + if (structDefData == null) { + throw new IllegalArgumentException( + "No StructureDefinition data found for: " + def.getUrl().getValue()); + } + if (!(structDefData.protoPackage.equals(packageName) + || (isSingleTypedExtensionDefinition(structDefData.structDef) + && structDefData.protoPackage.equals(CORE_FHIR_PACKAGE)))) { throw new IllegalArgumentException( "Inconsistent package name for " + def.getUrl().getValue() @@ -563,11 +607,18 @@ private Optional getChoiceTypeIfRequired( List baseTypes = choiceTypeBase.get().getTypeList(); Map baseTypesToIndex = new HashMap<>(); for (int i = 0; i < baseTypes.size(); i++) { - baseTypesToIndex.put(baseTypes.get(i).getCode().getValue(), i); + String code = baseTypes.get(i).getCode().getValue(); + // Only add each code type once. This is only relevant for references, which can appear + // multiple times. + if (!baseTypesToIndex.containsKey(code)) { + baseTypesToIndex.put(code, i); + } } DescriptorProto baseChoiceType = makeChoiceType(choiceTypeBase.get(), field); + final Set uniqueTypes = new HashSet<>(); List matchingFields = element.getTypeList().stream() + .filter(type -> uniqueTypes.add(type.getCode().getValue())) .map(type -> baseChoiceType.getField(baseTypesToIndex.get(type.getCode().getValue()))) .collect(Collectors.toList()); // TODO(nickgeorge): If a choice type is a slice of another choice type (not a pure @@ -907,6 +958,16 @@ private String getFieldType(ElementDefinition element, List e String typeWithBindingName = toFieldTypeCase(bindingName) + "Code"; return RENAMED_CODE_TYPES.getOrDefault(typeWithBindingName, typeWithBindingName); } + + String valueSetUrl = element.getBinding().getValueSet().getReference().getUri().getValue(); + if (!valueSetUrl.isEmpty()) { + if (valueSetTypesByCodeReference.containsKey(valueSetUrl)) { + return valueSetTypesByCodeReference.get(valueSetUrl).getName(); + } + // TODO(nickgeorge): Throw an error in strict mode. + System.out.println( + "Unhandled ValueSet reference on " + element.getId().getValue() + ": " + valueSetUrl); + } } return normalizedFhirTypeName; } @@ -922,8 +983,7 @@ private String getBindingName(ElementDefinition element) { } if (element.getBinding().getStrength().getValue().equals(BindingStrengthCode.Value.REQUIRED) && bindingName == null) { - System.out.println( - "Required binding found, but category is unknown: " + element.getBinding()); + logDiscrepancies("Required binding found, but category is unknown: " + element.getBinding()); } return bindingName; } @@ -956,13 +1016,12 @@ private FieldDescriptorProto buildField( if (isExternalExtension(element)) { // This is an extension with a type defined by an external profile. // If we know about it, we'll inline a field for it. - // Otherwise, we'll return null here, which means it'll get ignored String profileUrl = element.getType(0).getProfile().getValue(); StructureDefinitionData profileData = structDefDataByUrl.get(profileUrl); if (profileData == null) { - // We don't know about this extension. - // Return null, indicating that we shouldn't generate a proto field for this extension. - return null; + // Unrecognized url. + // TODO(nickgeorge): add a lenient mode that just ignores this extension. + throw new IllegalArgumentException("Encountered unknown extension url: " + profileUrl); } jsonFieldNameString = resolveSliceNameConflicts(jsonFieldNameString, element, elementList); options.setExtension( @@ -1023,14 +1082,16 @@ private FieldDescriptorProto buildField( options.setExtension(Annotations.isChoiceType, true); } - if (isContainer(element) - || isChoiceType(element) - || isChoiceTypeExtension(element, elementList) - || isComplexInternalExtension(element, elementList)) { + if (isLocalType(element, elementList)) { // Field types that require internally-generated submessages are defined in the local package. fieldPackage = packageName; } + String valueSetUrl = element.getBinding().getValueSet().getReference().getUri().getValue(); + if (!valueSetUrl.isEmpty() && valueSetTypesByCodeReference.containsKey(valueSetUrl)) { + fieldPackage = valueSetTypesByCodeReference.get(valueSetUrl).getFile().getPackage(); + } + return buildFieldInternal( jsonFieldNameString, getFieldType(element, elementList), @@ -1051,6 +1112,23 @@ private FieldDescriptorProto.Label getFieldSize(ElementDefinition element) { : FieldDescriptorProto.Label.LABEL_REPEATED; } + private boolean isLocalType(ElementDefinition element, List elementList) { + if (isContainer(element) + || isChoiceType(element) + || isChoiceTypeExtension(element, elementList) + || isComplexInternalExtension(element, elementList)) { + return true; + } + // It could still be a content reference to a local type. + // TODO(nickgeorge): more sophisticated logic. This wouldn't handle references to fields in + // other elements in a non-core package + if (!element.hasContentReference()) { + return false; + } + String rootType = Splitter.on(".").limit(2).splitToList(element.getId().getValue()).get(0); + return element.getContentReference().getValue().startsWith("#" + rootType); + } + /** * Returns the field name that should be used for an element, in jsonCase. If element is a slice, * uses that slice name. Since the id token slice name is all-lowercase, uses the SliceName field. @@ -1066,7 +1144,7 @@ private String getJsonNameForElement(ElementDefinition element) { String sliceName = element.getSliceName().getValue(); if (!lastToken.slicename.equals(sliceName.toLowerCase())) { // TODO(nickgeorge): pull this into a common validator that runs ealier. - System.out.println( + logDiscrepancies( "Warning: Inconsistent slice name for element with id " + element.getId().getValue() + " and slicename " @@ -1197,7 +1275,7 @@ private FieldDescriptorProto.Builder buildFieldInternal( List fieldTypeParts = new ArrayList<>(); for (String part : Splitter.on('.').split(fieldType)) { - fieldTypeParts.add(toFieldTypeCase(part)); + fieldTypeParts.add(part); } builder.setTypeName("." + fieldPackage + "." + Joiner.on('.').join(fieldTypeParts)); @@ -1309,8 +1387,8 @@ && lastIdToken(element.getId().getValue()).slicename != null && !element.getType(0).hasProfile()); } - // Returns the value type of a simple extension as a string. - private String getSimpleExtensionDefinitionType(StructureDefinition def) { + // Returns the QualifiedType (type + package) of a simple extension as a string. + private QualifiedType getSimpleExtensionDefinitionType(StructureDefinition def) { if (!isExtensionProfile(def)) { throw new IllegalArgumentException( "StructureDefinition is not an extension profile: " + def.getId().getValue()); @@ -1321,7 +1399,7 @@ private String getSimpleExtensionDefinitionType(StructureDefinition def) { return getSimpleInternalExtensionType(element, elementList); } if (isChoiceTypeExtension(element, elementList)) { - return getTypeName(def) + ".Value"; + return new QualifiedType(getTypeName(def) + ".Value", packageName); } throw new IllegalArgumentException( "StructureDefinition is not a simple extension: " + def.getId().getValue()); @@ -1338,7 +1416,7 @@ private static ElementDefinition getExtensionValueElement( "Element " + element.getId().getValue() + " has no value element"); } - private String getSimpleInternalExtensionType( + private QualifiedType getSimpleInternalExtensionType( ElementDefinition element, List elementList) { ElementDefinition valueElement = getExtensionValueElement(element, elementList); @@ -1348,10 +1426,20 @@ private String getSimpleInternalExtensionType( } if (getDistinctTypeCount(valueElement) == 1) { // This is a primitive extension with a single type - return toFieldTypeCase(valueElement.getType(0).getCode().getValue()); + String rawType = valueElement.getType(0).getCode().getValue(); + + if (rawType.equals("code") && valueElement.getBinding().getValueSet().hasReference()) { + String valueSetUrl = + valueElement.getBinding().getValueSet().getReference().getUri().getValue(); + Descriptor valueSetType = valueSetTypesByCodeReference.get(valueSetUrl); + if (valueSetType != null) { + return new QualifiedType(valueSetType.getName(), valueSetType.getFile().getPackage()); + } + } + return new QualifiedType(toFieldTypeCase(rawType), CORE_FHIR_PACKAGE); } // This is a choice-type extension that will be inlined as a message. - return getContainerType(element, elementList); + return new QualifiedType(getContainerType(element, elementList), packageName); } private static long getDistinctTypeCount(ElementDefinition element) { @@ -1392,13 +1480,13 @@ private boolean isSingleTypedExtensionDefinition(StructureDefinition def) { /** * Returns the type that should be used for an internal extension. If this is a simple internal - * extension, uses the appropriate primitive type. If this is a complex interanl extension, treats + * extension, uses the appropriate primitive type. If this is a complex internal extension, treats * the element like a backbone container. */ private String getInternalExtensionType( ElementDefinition element, List elementList) { return isSimpleInternalExtension(element, elementList) - ? getSimpleInternalExtensionType(element, elementList) + ? getSimpleInternalExtensionType(element, elementList).type : getContainerType(element, elementList); } diff --git a/java/src/test/java/com/google/fhir/stu3/ProtoGeneratorTest.java b/java/src/test/java/com/google/fhir/stu3/ProtoGeneratorTest.java index 7ba03a367..74c7a5547 100644 --- a/java/src/test/java/com/google/fhir/stu3/ProtoGeneratorTest.java +++ b/java/src/test/java/com/google/fhir/stu3/ProtoGeneratorTest.java @@ -25,13 +25,9 @@ import com.google.protobuf.ExtensionRegistry; import com.google.protobuf.TextFormat; import java.io.File; -import java.io.FilenameFilter; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Optional; import org.junit.Before; @@ -104,29 +100,32 @@ private void verifyCompiledDescriptor(Descriptor descriptor) throws IOException assertThat(descriptor.toProto()).isEqualTo(golden); } + private void addPackage( + Map knownStructDefs, String dir, String protoPackage) + throws IOException { + // NOTE: consentdirective is omitted because it is malformed. See: + // https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=19263 + for (File file : + new File(runfiles.rlocation("com_google_fhir/testdata/stu3/" + dir)) + .listFiles( + (listDir, name) -> + name.endsWith(".json") && !name.endsWith("consentdirective.profile.json"))) { + String json = Files.asCharSource(file, StandardCharsets.UTF_8).read(); + StructureDefinition.Builder builder = StructureDefinition.newBuilder(); + jsonParser.merge(json, builder); + knownStructDefs.put(builder.build(), protoPackage); + } + } + public Map getKnownStructDefs() throws IOException { if (knownStructDefs != null) { return knownStructDefs; } - // Note: consentdirective is malformed. - FilenameFilter jsonFilter = - (dir, name) -> name.endsWith(".json") && !name.endsWith("consentdirective.profile.json"); - List structDefs = new ArrayList<>(); - Collections.addAll( - structDefs, - new File(runfiles.rlocation("com_google_fhir/testdata/stu3/structure_definitions")) - .listFiles(jsonFilter)); - Collections.addAll( - structDefs, - new File(runfiles.rlocation("com_google_fhir/testdata/stu3/extensions")) - .listFiles(jsonFilter)); knownStructDefs = new HashMap<>(); - for (File file : structDefs) { - String json = Files.asCharSource(file, StandardCharsets.UTF_8).read(); - StructureDefinition.Builder builder = StructureDefinition.newBuilder(); - jsonParser.merge(json, builder); - knownStructDefs.put(builder.build(), "google.fhir.stu3.proto"); - } + addPackage(knownStructDefs, "structure_definitions", "google.fhir.stu3.proto"); + addPackage(knownStructDefs, "extensions", "google.fhir.stu3.proto"); + addPackage(knownStructDefs, "google", "google.fhir.stu3.google"); + addPackage(knownStructDefs, "uscore", "google.fhir.stu3.uscore"); return knownStructDefs; } diff --git a/proto/stu3/BUILD b/proto/stu3/BUILD index 3c872addf..25401e493 100644 --- a/proto/stu3/BUILD +++ b/proto/stu3/BUILD @@ -82,6 +82,33 @@ fhir_proto_library( proto_library_prefix = "profiles", ) +fhir_proto_library( + srcs = [ + "uscore.proto", + ], + proto_deps = [ + ":annotations_proto", + ":codes_proto", + ":datatypes_proto", + ":extensions_proto", + ":metadatatypes_proto", + ":resources_proto", + ":uscore_codes_proto", + ], + proto_library_prefix = "uscore", +) + +fhir_proto_library( + srcs = [ + "uscore_codes.proto", + ], + proto_deps = [ + ":annotations_proto", + ":datatypes_proto", + ], + proto_library_prefix = "uscore_codes", +) + fhir_proto_library( srcs = [ "version_config.proto", diff --git a/proto/stu3/codes.proto b/proto/stu3/codes.proto index 25b6a6514..5edf40bac 100644 --- a/proto/stu3/codes.proto +++ b/proto/stu3/codes.proto @@ -2578,9 +2578,14 @@ message FHIRDefinedTypeCode { // Either a resource or a data type, extended to allow arbitrary other codes // representing FHIR resources. See http://hl7.org/fhir/ValueSet/defined-types +// Due to +// https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=15559 +// there are two value sets with valueset url: +// http://hl7.org/fhir/ValueSet/defined-types. +// Fragment added here to disambiguate. message FHIRDefinedTypeExtCode { option (structure_definition_kind) = KIND_PRIMITIVE_TYPE; - option (fhir_valueset_url) = "http://hl7.org/fhir/ValueSet/defined-types"; + option (fhir_valueset_url) = "http://hl7.org/fhir/ValueSet/defined-types#ext"; // Primitive value for code string value = 1; diff --git a/proto/stu3/extensions.proto b/proto/stu3/extensions.proto index d8e6014ae..88a35f540 100644 --- a/proto/stu3/extensions.proto +++ b/proto/stu3/extensions.proto @@ -2388,7 +2388,7 @@ message GoalAcceptance { Reference individual = 4 [(validation_requirement) = REQUIRED_BY_FHIR]; // agree | disagree | pending - Code status = 5; + GoalAcceptanceStatusCode status = 5; // Priority of goal for individual CodeableConcept priority = 6; diff --git a/proto/stu3/uscore.proto b/proto/stu3/uscore.proto new file mode 100644 index 000000000..15d0ca524 --- /dev/null +++ b/proto/stu3/uscore.proto @@ -0,0 +1,2768 @@ +// Copyright 2018 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.stu3.uscore; + +import "proto/stu3/annotations.proto"; +import "proto/stu3/codes.proto"; +import "proto/stu3/datatypes.proto"; +import "proto/stu3/resources.proto"; +import "proto/stu3/metadatatypes.proto"; +import "proto/stu3/uscore_codes.proto"; + +option java_multiple_files = true; +option java_package = "com.google.fhir.stu3.uscore"; + +// Auto-generated from StructureDefinition for US Core AllergyIntolerance +// Profile. US Core Allergies Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance +message UsCoreAllergyintolerance { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External ids for this item + repeated proto.Identifier identifier = 9; + + // active | inactive | resolved + proto.AllergyIntoleranceClinicalStatusCode clinical_status = 10; + + // unconfirmed | confirmed | refuted | entered-in-error + proto.AllergyIntoleranceVerificationStatusCode verification_status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // allergy | intolerance - Underlying mechanism (if known) + proto.AllergyIntoleranceTypeCode type = 12; + + // food | medication | environment | biologic + repeated proto.AllergyIntoleranceCategoryCode category = 13; + + // low | high | unable-to-assess + proto.AllergyIntoleranceCriticalityCode criticality = 14; + + // Code that identifies the allergy or intolerance + proto.CodeableConcept code = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who the sensitivity is for + proto.Reference patient = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // When allergy or intolerance was identified + message Onset { + oneof onset { + proto.DateTime date_time = 1; + proto.Age age = 2; + proto.Period period = 3; + proto.Range range = 4; + proto.String string_value = 5 [json_name = "string"]; + } + } + Onset onset = 17 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date record was believed accurate + proto.DateTime asserted_date = 18; + + // Who recorded the sensitivity + proto.Reference recorder = 19; + + // Source of the information about the allergy + proto.Reference asserter = 20; + + // Date(/time) of last known occurrence of a reaction + proto.DateTime last_occurrence = 21; + + // Additional text not captured in other fields + repeated proto.Annotation note = 22; + + // Adverse Reaction Events linked to exposure to substance + message Reaction { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Specific substance or pharmaceutical product considered to be responsible + // for event + proto.CodeableConcept substance = 4; + + // Clinical symptoms/signs associated with the Event + repeated proto.CodeableConcept manifestation = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Description of the event as a whole + proto.String description = 6; + + // Date(/time) when manifestations showed + proto.DateTime onset = 7; + + // mild | moderate | severe (of event as a whole) + proto.AllergyIntoleranceSeverityCode severity = 8; + + // How the subject was exposed to the substance + proto.CodeableConcept exposure_route = 9; + + // Text about event not captured in other fields + repeated proto.Annotation note = 10; + } + repeated Reaction reaction = 23; +} + +// Auto-generated from StructureDefinition for US Core Birth Sex Extension. +// Extension. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex +message PatientUSCoreBirthSexExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Value of extension + UsCoreBirthSexCode value_code = 3; +} + +// Auto-generated from StructureDefinition for US Core CarePlan Profile. +// US Core CarePlan Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan +message UsCoreCareplan { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/CarePlan"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this plan + repeated proto.Identifier identifier = 9; + + // Protocol or definition + repeated proto.Reference definition = 10; + + // Fulfills care plan + repeated proto.Reference based_on = 11; + + // CarePlan replaced by this CarePlan + repeated proto.Reference replaces = 12; + + // Part of referenced CarePlan + repeated proto.Reference part_of = 13; + + // draft | active | suspended | completed | entered-in-error | cancelled | + // unknown + proto.CarePlanStatusCode status = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // proposal | plan | order | option + proto.CarePlanIntentCode intent = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of plan + repeated proto.CodeableConcept category = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Human-friendly name for the CarePlan + proto.String title = 17; + + // Summary of nature of plan + proto.String description = 18; + + // Who care plan is for + proto.Reference subject = 19 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Created in context of + proto.Reference context = 20; + + // Time period plan covers + proto.Period period = 21; + + // Who is responsible for contents of the plan + repeated proto.Reference author = 22; + + // Who's involved in plan? + repeated proto.Reference care_team = 23; + + // Health issues this plan addresses + repeated proto.Reference addresses = 24; + + // Information considered as part of plan + repeated proto.Reference supporting_info = 25; + + // Desired outcome of plan + repeated proto.Reference goal = 26; + + // Action to occur as part of plan + message Activity { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Results of the activity + repeated proto.CodeableConcept outcome_codeable_concept = 4; + + // Appointment, Encounter, Procedure, etc. + repeated proto.Reference outcome_reference = 5; + + // Comments about the activity status/progress + repeated proto.Annotation progress = 6; + + // Activity details defined in specific resource + proto.Reference reference = 7; + + // In-line definition of activity + message Detail { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // diet | drug | encounter | observation | procedure | supply | other + proto.CodeableConcept category = 4; + + // Protocol or definition + proto.Reference definition = 5; + + // Detail type of activity + proto.CodeableConcept code = 6; + + // Why activity should be done or why activity was prohibited + repeated proto.CodeableConcept reason_code = 7; + + // Condition triggering need for activity + repeated proto.Reference reason_reference = 8; + + // Goals this activity relates to + repeated proto.Reference goal = 9; + + // not-started | scheduled | in-progress | on-hold | completed | cancelled + // | unknown + proto.CarePlanActivityStatusCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Reason for current status + proto.String status_reason = 11; + + // Do NOT do + proto.Boolean prohibited = 12; + + // When activity is to occur + message Scheduled { + oneof scheduled { + proto.Timing timing = 1; + proto.Period period = 2; + proto.String string_value = 3 [json_name = "string"]; + } + } + Scheduled scheduled = 13 + [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Where it should happen + proto.Reference location = 14; + + // Who will be responsible? + repeated proto.Reference performer = 15; + + // What is to be administered/supplied + message Product { + oneof product { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Product product = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // How to consume/day? + proto.SimpleQuantity daily_amount = 17; + + // How much to administer/supply/consume + proto.SimpleQuantity quantity = 18; + + // Extra info describing activity to perform + proto.String description = 19; + } + Detail detail = 8; + } + repeated Activity activity = 27; + + // Comments about the plan + repeated proto.Annotation note = 28; +} + +// Auto-generated from StructureDefinition for US Core CareTeam Profile. +// US Core CareTeam Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam +message UsCoreCareteam { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/CareTeam"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this team + repeated proto.Identifier identifier = 9; + + // proposed | active | suspended | inactive | entered-in-error + proto.CareTeamStatusCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of team + repeated proto.CodeableConcept category = 11; + + // Name of the team, such as crisis assessment team + proto.String name = 12; + + // Who care team is for + proto.Reference subject = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter or episode associated with CareTeam + proto.Reference context = 14; + + // Time period team covers + proto.Period period = 15; + + // Members of the team + message Participant { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of involvement + proto.CodeableConcept role = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who is involved + proto.Reference member = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization of the practitioner + proto.Reference on_behalf_of = 6; + + // Time period of participant + proto.Period period = 7; + } + repeated Participant participant = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Why the care team exists + repeated proto.CodeableConcept reason_code = 17; + + // Why the care team exists + repeated proto.Reference reason_reference = 18; + + // Organization responsible for the care team + repeated proto.Reference managing_organization = 19; + + // Comments made about the CareTeam + repeated proto.Annotation note = 20; +} + +// Auto-generated from StructureDefinition for US Core Condition (a.k.a +// Problem) Profile. US Core Condition Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition +message UsCoreCondition { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Condition"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this condition + repeated proto.Identifier identifier = 9; + + // active | recurrence | inactive | remission | resolved + proto.ConditionClinicalStatusCodesCode clinical_status = 10; + + // provisional | differential | confirmed | refuted | entered-in-error | + // unknown + proto.ConditionVerificationStatusCode verification_status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // problem-list-item | encounter-diagnosis + repeated proto.CodeableConcept category = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Subjective severity of condition + proto.CodeableConcept severity = 13; + + // Identification of the condition, problem or diagnosis + proto.CodeableConcept code = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Anatomical location, if relevant + repeated proto.CodeableConcept body_site = 15; + + // Who has the condition? + proto.Reference subject = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter or episode when condition first asserted + proto.Reference context = 17; + + // Estimated or actual date, date-time, or age + message Onset { + oneof onset { + proto.DateTime date_time = 1; + proto.Age age = 2; + proto.Period period = 3; + proto.Range range = 4; + proto.String string_value = 5 [json_name = "string"]; + } + } + Onset onset = 18 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // If/when in resolution/remission + message Abatement { + oneof abatement { + proto.DateTime date_time = 1; + proto.Age age = 2; + proto.Boolean boolean = 3; + proto.Period period = 4; + proto.Range range = 5; + proto.String string_value = 6 [json_name = "string"]; + } + } + Abatement abatement = 19 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date record was believed accurate + proto.DateTime asserted_date = 20; + + // Person who asserts this condition + proto.Reference asserter = 21; + + // Stage/grade, usually assessed formally + message Stage { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Simple summary (disease specific) + proto.CodeableConcept summary = 4; + + // Formal record of assessment + repeated proto.Reference assessment = 5; + } + Stage stage = 22; + + // Supporting evidence + message Evidence { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Manifestation/symptom + repeated proto.CodeableConcept code = 4; + + // Supporting information found elsewhere + repeated proto.Reference detail = 5; + } + repeated Evidence evidence = 23; + + // Additional information about the Condition + repeated proto.Annotation note = 24; +} + +// Auto-generated from StructureDefinition for US Core Device Profile. +// US Core Implanted Device Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-device +message UsCoreDevice { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Device"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-device"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Instance identifier + repeated proto.Identifier identifier = 9; + + // Unique Device Identifier (UDI) Barcode string + message Udi { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Mandatory fixed portion of UDI + proto.String device_identifier = 4; + + // Device Name as appears on UDI label + proto.String name = 5; + + // Regional UDI authority + proto.Uri jurisdiction = 6; + + // UDI Human Readable Barcode String + proto.String carrier_h_r_f = 7; + + // UDI Machine Readable Barcode String + proto.Base64Binary carrier_a_i_d_c = 8; + + // UDI Issuing Organization + proto.Uri issuer = 9; + + // barcode | rfid | manual + + proto.UDIEntryTypeCode entry_type = 10; + } + Udi udi = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // active | inactive | entered-in-error | unknown + proto.FHIRDeviceStatusCode status = 11; + + // What kind of device this is + proto.CodeableConcept type = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Lot number of manufacture + proto.String lot_number = 13; + + // Name of device manufacturer + proto.String manufacturer = 14; + + // Date when the device was made + proto.DateTime manufacture_date = 15; + + // Date and time of expiry of this device (if applicable) + proto.DateTime expiration_date = 16; + + // Model id assigned by the manufacturer + proto.String model = 17; + + // Version number (i.e. software) + proto.String version = 18; + + // Patient to whom Device is affixed + proto.Reference patient = 19 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization responsible for device + proto.Reference owner = 20; + + // Details for human/organization for support + repeated proto.ContactPoint contact = 21; + + // Where the resource is found + proto.Reference location = 22; + + // Network address to contact device + proto.Uri url = 23; + + // Device notes and comments + repeated proto.Annotation note = 24; + + // Safety Characteristics of Device + repeated proto.CodeableConcept safety = 25; +} + +// Auto-generated from StructureDefinition for US Core DiagnosticReport +// Profile. US Core Diagnostic Report Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport +message UsCoreDiagnosticreport { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/DiagnosticReport"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business identifier for report + repeated proto.Identifier identifier = 9; + + // What was requested + repeated proto.Reference based_on = 10; + + // registered | partial | preliminary | final + + proto.DiagnosticReportStatusCode status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Service category + proto.CodeableConcept category = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // US Core Laboratory Report Order Code + proto.CodeableConcept code = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // The subject of the report - usually, but not always, the patient + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Health care event when test ordered + proto.Reference context = 15; + + // Specimen Collection Datetime or Period + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // DateTime this version was released + proto.Instant issued = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Participants in producing the report + message Performer { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of performer + proto.CodeableConcept role = 4; + + // Practitioner or Organization participant + proto.Reference actor = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Performer performer = 18; + + // Specimens this report is based on + repeated proto.Reference specimen = 19; + + // Observations - simple, or complex nested groups + repeated proto.Reference result = 20; + + // Reference to full details of imaging associated with the diagnostic report + repeated proto.Reference imaging_study = 21; + + // Key images associated with this report + message Image { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Comment about the image (e.g. explanation) + proto.String comment = 4; + + // Reference to the image source + proto.Reference link = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Image image = 22; + + // Clinical Interpretation of test results + proto.String conclusion = 23; + + // Codes for the conclusion + repeated proto.CodeableConcept coded_diagnosis = 24; + + // Entire report as issued + repeated proto.Attachment presented_form = 25; +} + +// Auto-generated from StructureDefinition for UsCoreDirect. +// Email is a "direct" email. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct +message ContactPointUsCoreDirect { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Value of extension + proto.Boolean value_boolean = 3; +} + +// Auto-generated from StructureDefinition for US Core ethnicity Extension. +// US Core ethnicity Extension. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity +message PatientUSCoreEthnicityExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Extension + repeated proto.Extension extension = 2; + + // Hispanic or Latino|Not Hispanic or Latino + proto.Coding omb_category = 4; + + // Extended ethnicity codes + repeated proto.Coding detailed = 5; + + // ethnicity Text + proto.String text = 6 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; +} + +// Auto-generated from StructureDefinition for US Core Goal Profile. +// US Core Goal Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal +message UsCoreGoal { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Goal"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this goal + repeated proto.Identifier identifier = 9; + + // proposed | accepted | planned | in-progress | on-target | ahead-of-target | + // behind-target | sustaining | achieved | on-hold | cancelled | + // entered-in-error | rejected + proto.GoalStatusCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // E.g. Treatment, dietary, behavioral, etc. + repeated proto.CodeableConcept category = 11; + + // high-priority | medium-priority | low-priority + proto.CodeableConcept priority = 12; + + // Code or text describing goal + proto.CodeableConcept description = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who this goal is intended for + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // When goal pursuit begins + message Start { + oneof start { + proto.Date date = 1; + proto.CodeableConcept codeable_concept = 2; + } + } + Start start = 15 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Target outcome for the goal + message Target { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The parameter whose value is being tracked + proto.CodeableConcept measure = 4; + + // The target value to be achieved + message Detail { + oneof detail { + proto.Quantity quantity = 1; + proto.Range range = 2; + proto.CodeableConcept codeable_concept = 3; + } + } + Detail detail = 5 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Reach goal on or before + message Due { + oneof due { + proto.Date date = 1; + proto.Duration duration = 2; + } + } + Due due = 6 [(.google.fhir.stu3.proto.is_choice_type) = true]; + } + Target target = 16; + + // When goal status took effect + proto.Date status_date = 17; + + // Reason for current status + proto.String status_reason = 18; + + // Who's responsible for creating Goal? + proto.Reference expressed_by = 19; + + // Issues addressed by this goal + repeated proto.Reference addresses = 20; + + // Comments about the goal + repeated proto.Annotation note = 21; + + // What result was achieved regarding the goal? + repeated proto.CodeableConcept outcome_code = 22; + + // Observation that resulted from goal + repeated proto.Reference outcome_reference = 23; +} + +// Auto-generated from StructureDefinition for US Core Immunization Profile. +// US Core Immunization Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization +message UsCoreImmunization { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Immunization"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business identifier + repeated proto.Identifier identifier = 9; + + // completed | entered-in-error + proto.ImmunizationStatusCodesCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Flag for whether immunization was given + proto.Boolean not_given = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Vaccine Product Type (bind to CVX) + proto.CodeableConcept vaccine_code = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who was immunized + proto.Reference patient = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter administered as part of + proto.Reference encounter = 14; + + // Vaccination administration date + proto.DateTime date = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Indicates context the data was recorded in + proto.Boolean primary_source = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Indicates the source of a secondarily reported record + proto.CodeableConcept report_origin = 17; + + // Where vaccination occurred + proto.Reference location = 18; + + // Vaccine manufacturer + proto.Reference manufacturer = 19; + + // Vaccine lot number + proto.String lot_number = 20; + + // Vaccine expiration date + proto.Date expiration_date = 21; + + // Body site vaccine was administered + proto.CodeableConcept site = 22; + + // How vaccine entered body + proto.CodeableConcept route = 23; + + // Amount of vaccine administered + proto.SimpleQuantity dose_quantity = 24; + + // Who performed event + message Practitioner { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // What type of performance was done + proto.CodeableConcept role = 4; + + // Individual who was performing + proto.Reference actor = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Practitioner practitioner = 25; + + // Vaccination notes + repeated proto.Annotation note = 26; + + // Administration/non-administration reasons + message Explanation { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Why immunization occurred + repeated proto.CodeableConcept reason = 4; + + // Why immunization did not occur + repeated proto.CodeableConcept reason_not_given = 5; + } + Explanation explanation = 27; + + // Details of a reaction that follows immunization + message Reaction { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // When reaction started + proto.DateTime date = 4; + + // Additional information on reaction + proto.Reference detail = 5; + + // Indicates self-reported reaction + proto.Boolean reported = 6; + } + repeated Reaction reaction = 28; + + // What protocol was followed + message VaccinationProtocol { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Dose number within series + proto.PositiveInt dose_sequence = 4; + + // Details of vaccine protocol + proto.String description = 5; + + // Who is responsible for protocol + proto.Reference authority = 6; + + // Name of vaccine series + proto.String series = 7; + + // Recommended number of doses for immunity + proto.PositiveInt series_doses = 8; + + // Disease immunized against + repeated proto.CodeableConcept target_disease = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Indicates if dose counts towards immunity + proto.CodeableConcept dose_status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Why dose does (not) count + proto.CodeableConcept dose_status_reason = 11; + } + repeated VaccinationProtocol vaccination_protocol = 29; +} + +// Auto-generated from StructureDefinition for US Core Location Profile. +// US Core Location Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-location +message UsCoreLocation { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Location"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-location"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Unique code or number identifying the location to its users + repeated proto.Identifier identifier = 9; + + // active | suspended | inactive + proto.LocationStatusCode status = 10; + + // The Operational status of the location (typically only for a bed/room) + proto.Coding operational_status = 11; + + // Name of the location as used by humans + proto.String name = 12 + [(.google.fhir.stu3.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 proto.String alias = 13; + + // Additional details about the location that could be displayed as further + // information to identify the location beyond its name + proto.String description = 14; + + // instance | kind + proto.LocationModeCode mode = 15; + + // Type of function performed + proto.CodeableConcept type = 16; + + // Contact details of the location + repeated proto.ContactPoint telecom = 17; + + // Physical location + proto.Address address = 18; + + // Physical form of the location + proto.CodeableConcept physical_type = 19; + + // The absolute geographic location + message Position { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Longitude with WGS84 datum + proto.Decimal longitude = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Latitude with WGS84 datum + proto.Decimal latitude = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Altitude with WGS84 datum + proto.Decimal altitude = 6; + } + Position position = 20; + + // Organization responsible for provisioning and upkeep + proto.Reference managing_organization = 21; + + // Another Location this one is physically part of + proto.Reference part_of = 22; + + // Technical endpoints providing access to services operated for the location + repeated proto.Reference endpoint = 23; +} + +// Auto-generated from StructureDefinition for US Core Medication Profile. +// US Core Medication Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication +message UsCoreMedication { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Medication"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Codes that identify this medication + proto.CodeableConcept code = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // active | inactive | entered-in-error + proto.MedicationStatusCode status = 10; + + // True if a brand + proto.Boolean is_brand = 11; + + // True if medication does not require a prescription + proto.Boolean is_over_the_counter = 12; + + // Manufacturer of the item + proto.Reference manufacturer = 13; + + // powder | tablets | capsule + + proto.CodeableConcept form = 14; + + // Active or inactive ingredient + message Ingredient { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The product contained + message Item { + oneof item { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Item item = 4 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Active ingredient indicator + proto.Boolean is_active = 5; + + // Quantity of ingredient present + proto.Ratio amount = 6; + } + repeated Ingredient ingredient = 15; + + // Details about packaged medications + message Package { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // E.g. box, vial, blister-pack + proto.CodeableConcept container = 4; + + // What is in the package + message Content { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The item in the package + message Item { + oneof item { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Item item = 4 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Quantity present in the package + proto.SimpleQuantity amount = 5; + } + repeated Content content = 5; + + // Identifies a single production run + message Batch { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Identifier assigned to batch + proto.String lot_number = 4; + + // When batch will expire + proto.DateTime expiration_date = 5; + } + repeated Batch batch = 6; + } + Package package_value = 16 [json_name = "package"]; + + // Picture of the medication + repeated proto.Attachment image = 17; +} + +// Auto-generated from StructureDefinition for US Core MedicationRequest +// Profile. US Core Medication Request Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest +message UsCoreMedicationrequest { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/MedicationRequest"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External ids for this request + repeated proto.Identifier identifier = 9; + + // Protocol or definition + repeated proto.Reference definition = 10; + + // What request fulfills + repeated proto.Reference based_on = 11; + + // Composite request this is part of + proto.Identifier group_identifier = 12; + + // active | on-hold | cancelled | completed | entered-in-error | stopped | + // draft | unknown + proto.MedicationRequestStatusCode status = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // proposal | plan | order | instance-order + proto.MedicationRequestIntentCode intent = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of medication usage + proto.CodeableConcept category = 15; + + // routine | urgent | stat | asap + proto.MedicationRequestPriorityCode priority = 16; + + // Medication to be taken + message Medication { + oneof medication { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Medication medication = 17 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Who or group medication request is for + proto.Reference subject = 18 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Created during encounter/admission/stay + proto.Reference context = 19; + + // Information to support ordering of the medication + repeated proto.Reference supporting_information = 20; + + // When request was initially authored + proto.DateTime authored_on = 21 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who/What requested the Request + message Requester { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Who ordered the initial medication(s) + proto.Reference agent = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization agent is acting for + proto.Reference on_behalf_of = 5; + } + Requester requester = 22 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Person who entered the request + proto.Reference recorder = 23; + + // Reason or indication for writing the prescription + repeated proto.CodeableConcept reason_code = 24; + + // Condition or Observation that supports why the prescription is being + // written + repeated proto.Reference reason_reference = 25; + + // Information about the prescription + repeated proto.Annotation note = 26; + + // How the medication should be taken + repeated proto.Dosage dosage_instruction = 27; + + // Medication supply authorization + message DispenseRequest { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Time period supply is authorized for + proto.Period validity_period = 4; + + // Number of refills authorized + proto.PositiveInt number_of_repeats_allowed = 5; + + // Amount of medication to supply per dispense + proto.SimpleQuantity quantity = 6; + + // Number of days supply per dispense + proto.Duration expected_supply_duration = 7; + + // Intended dispenser + proto.Reference performer = 8; + } + DispenseRequest dispense_request = 28; + + // Any restrictions on medication substitution + message Substitution { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Whether substitution is allowed or not + proto.Boolean allowed = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Why should (not) substitution be made + proto.CodeableConcept reason = 5; + } + Substitution substitution = 29; + + // An order/prescription that is being replaced + proto.Reference prior_prescription = 30; + + // Clinical Issue with action + repeated proto.Reference detected_issue = 31; + + // A list of events of interest in the lifecycle + repeated proto.Reference event_history = 32; +} + +// Auto-generated from StructureDefinition for US Core MedicationStatement +// Profile. US Core Medication Statement Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement +message UsCoreMedicationstatement { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/MedicationStatement"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External identifier + repeated proto.Identifier identifier = 9; + + // Fulfils plan, proposal or order + repeated proto.Reference based_on = 10; + + // Part of referenced event + repeated proto.Reference part_of = 11; + + // Encounter / Episode associated with MedicationStatement + proto.Reference context = 12; + + // active | completed | entered-in-error | intended | stopped | on-hold + proto.MedicationStatementStatusCode status = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of medication usage + proto.CodeableConcept category = 14; + + // What medication was taken + message Medication { + oneof medication { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Medication medication = 15 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // The date/time or interval when the medication was taken + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // When the statement was asserted? + proto.DateTime date_asserted = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Person or organization that provided the information about the taking of + // this medication + proto.Reference information_source = 18; + + // Who is/was taking the medication + proto.Reference subject = 19 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Additional supporting information + repeated proto.Reference derived_from = 20; + + // y | n | unk | na + proto.MedicationStatementTakenCode taken = 21 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // True if asserting medication was not given + repeated proto.CodeableConcept reason_not_taken = 22; + + // Reason for why the medication is being/was taken + repeated proto.CodeableConcept reason_code = 23; + + // Condition or observation that supports why the medication is being/was + // taken + repeated proto.Reference reason_reference = 24; + + // Further information about the statement + repeated proto.Annotation note = 25; + + // Details of how medication is/was taken or should be taken + repeated proto.Dosage dosage = 26; +} + +// Auto-generated from StructureDefinition for US Core Results Profile. +// US Core Result Observation. +// See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults +message UsCoreObservationresults { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Observation"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business Identifier for observation + repeated proto.Identifier identifier = 9; + + // Fulfills plan, proposal or order + repeated proto.Reference based_on = 10; + + // registered | preliminary | final | amended + + proto.ObservationStatusCode status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Classification of type of observation + repeated proto.CodeableConcept category = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Laboratory Test Name + proto.CodeableConcept code = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who and/or what this is about + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Healthcare event during which this observation is made + proto.Reference context = 15; + + // Clinically relevant time/time-period for observation + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date/Time this was made available + proto.Instant issued = 17; + + // Who is responsible for the observation + repeated proto.Reference performer = 18; + + // Result Value + message Value { + oneof value { + proto.Quantity quantity = 1; + proto.CodeableConcept codeable_concept = 2; + proto.String string_value = 3 [json_name = "string"]; + proto.Boolean boolean = 4; + proto.Range range = 5; + proto.Ratio ratio = 6; + proto.SampledData sampled_data = 7; + proto.Attachment attachment = 8; + proto.Time time = 9; + proto.DateTime date_time = 10; + proto.Period period = 11; + } + } + Value value = 19 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Why the result is missing + proto.CodeableConcept data_absent_reason = 20; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 21; + + // Comments about result + proto.String comment = 22; + + // Observed body part + proto.CodeableConcept body_site = 23; + + // How it was done + proto.CodeableConcept method = 24; + + // Specimen used for this observation + proto.Reference specimen = 25; + + // (Measurement) Device + proto.Reference device = 26; + + // Provides guide for interpretation + message ReferenceRange { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Low Range, if relevant + proto.SimpleQuantity low = 4; + + // High Range, if relevant + proto.SimpleQuantity high = 5; + + // Reference range qualifier + proto.CodeableConcept type = 6; + + // Reference range population + repeated proto.CodeableConcept applies_to = 7; + + // Applicable age range, if relevant + proto.Range age = 8; + + // Text based reference range in an observation + proto.String text = 9; + } + repeated ReferenceRange reference_range = 27; + + // Resource related to this observation + message Related { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // has-member | derived-from | sequel-to | replaces | qualified-by | + // interfered-by + proto.ObservationRelationshipTypeCode type = 4; + + // Resource that is related to this one + proto.Reference target = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Related related = 28; + + // Component results + message Component { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of component observation (code / type) + proto.CodeableConcept code = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Actual component result + message Value { + oneof value { + proto.Quantity quantity = 1; + proto.CodeableConcept codeable_concept = 2; + proto.String string_value = 3 [json_name = "string"]; + proto.Range range = 4; + proto.Ratio ratio = 5; + proto.SampledData sampled_data = 6; + proto.Attachment attachment = 7; + proto.Time time = 8; + proto.DateTime date_time = 9; + proto.Period period = 10; + } + } + Value value = 5 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Why the component result is missing + proto.CodeableConcept data_absent_reason = 6; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 7; + + // Provides guide for interpretation of component result + repeated ReferenceRange reference_range = 8; + } + repeated Component component = 29; +} + +// Auto-generated from StructureDefinition for US Core Organization Profile. +// US Core Organization Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization +message UsCoreOrganization { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Organization"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Identifies this organization across multiple systems + repeated proto.Identifier identifier = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Whether the organization's record is still in active use + proto.Boolean active = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Kind of organization + repeated proto.CodeableConcept type = 11; + + // Name used for the organization + proto.String name = 12 + [(.google.fhir.stu3.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 proto.String alias = 13; + + // A contact detail for the organization + repeated proto.ContactPoint telecom = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // An address for the organization + repeated proto.Address address = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // The organization of which this organization forms a part + proto.Reference part_of = 16; + + // Contact for the organization for a certain purpose + message Contact { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The type of contact + proto.CodeableConcept purpose = 4; + + // A name associated with the contact + proto.HumanName name = 5; + + // Contact details (telephone, email, etc.) for a contact + repeated proto.ContactPoint telecom = 6; + + // Visiting or postal addresses for the contact + proto.Address address = 7; + } + repeated Contact contact = 17; + + // Technical endpoints providing access to services operated for the + // organization + repeated proto.Reference endpoint = 18; +} + +// Auto-generated from StructureDefinition for US Core Patient Profile. +// US Core Patient Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient +message UsCorePatient { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Patient"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Extension + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // An identifier for this patient + repeated proto.Identifier identifier = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Whether this patient's record is in active use + proto.Boolean active = 10; + + // A name associated with the patient + repeated proto.HumanName name = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // A contact detail for the individual + repeated proto.ContactPoint telecom = 12; + + // male | female | other | unknown + proto.AdministrativeGenderCode gender = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // The date of birth for the individual + proto.Date birth_date = 14; + + // Indicates if the individual is deceased or not + message Deceased { + oneof deceased { + proto.Boolean boolean = 1; + proto.DateTime date_time = 2; + } + } + Deceased deceased = 15 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Addresses for the individual + repeated proto.Address address = 16; + + // Marital (civil) status of a patient + proto.CodeableConcept marital_status = 17; + + // Whether patient is part of a multiple birth + message MultipleBirth { + oneof multiple_birth { + proto.Boolean boolean = 1; + proto.Integer integer = 2; + } + } + MultipleBirth multiple_birth = 18 + [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Image of the patient + repeated proto.Attachment photo = 19; + + // A contact party (e.g. guardian, partner, friend) for the patient + message Contact { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The kind of relationship + repeated proto.CodeableConcept relationship = 4; + + // A name associated with the contact person + proto.HumanName name = 5; + + // A contact detail for the person + repeated proto.ContactPoint telecom = 6; + + // Address for the contact person + proto.Address address = 7; + + // male | female | other | unknown + proto.AdministrativeGenderCode gender = 8; + + // Organization that is associated with the contact + proto.Reference organization = 9; + + // The period during which this contact person or organization is valid to + // be contacted relating to this patient + proto.Period period = 10; + } + repeated Contact contact = 20; + + // A list of Languages which may be used to communicate with the patient about + // his or her health + message Communication { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The language which can be used to communicate with the patient about his + // or her health + proto.CodeableConcept language = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Language preference indicator + proto.Boolean preferred = 5; + } + repeated Communication communication = 22; + + // Patient's nominated primary care provider + repeated proto.Reference general_practitioner = 23; + + // Organization that is the custodian of the patient record + proto.Reference managing_organization = 24; + + // Link to another patient resource that concerns the same actual person + message Link { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The other patient or related person resource that the link refers to + proto.Reference other = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // replaced-by | replaces | refer | seealso - type of link + proto.LinkTypeCode type = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Link link = 25; + + // Extension + PatientUSCoreRaceExtension race = 26 + [(.google.fhir.stu3.proto.fhir_inlined_extension_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"]; + + // Extension + PatientUSCoreEthnicityExtension ethnicity = 27 + [(.google.fhir.stu3.proto.fhir_inlined_extension_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"]; + + // Extension + UsCoreBirthSexCode birthsex = 28 + [(.google.fhir.stu3.proto.fhir_inlined_extension_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"]; +} + +// Auto-generated from StructureDefinition for US Core Practitioner Profile. +// US Core Practitioner. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner +message UsCorePractitioner { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Practitioner"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // A identifier for the person as this agent + repeated proto.Identifier identifier = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Whether this practitioner's record is in active use + proto.Boolean active = 10; + + // The name(s) associated with the practitioner + proto.HumanName name = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // A contact detail for the practitioner (that apply to all roles) + repeated proto.ContactPoint telecom = 12; + + // Address(es) of the practitioner that are not role specific (typically home + // address) + repeated proto.Address address = 13; + + // male | female | other | unknown + proto.AdministrativeGenderCode gender = 14; + + // The date on which the practitioner was born + proto.Date birth_date = 15; + + // Image of the person + repeated proto.Attachment photo = 16; + + // Qualifications obtained by training and certification + message Qualification { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // An identifier for this qualification for the practitioner + repeated proto.Identifier identifier = 4; + + // Coded representation of the qualification + proto.CodeableConcept code = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Period during which the qualification is valid + proto.Period period = 6; + + // Organization that regulates and issues the qualification + proto.Reference issuer = 7; + } + repeated Qualification qualification = 17; + + // A language the practitioner is able to use in patient communication + repeated proto.CodeableConcept communication = 18; +} + +// Auto-generated from StructureDefinition for US Core Procedure Profile. +// US Core Procedure Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure +message UsCoreProcedure { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Procedure"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Identifiers for this procedure + repeated proto.Identifier identifier = 9; + + // Instantiates protocol or definition + repeated proto.Reference definition = 10; + + // A request for this procedure + repeated proto.Reference based_on = 11; + + // Part of referenced event + repeated proto.Reference part_of = 12; + + // preparation | in-progress | suspended | aborted | completed | + // entered-in-error | unknown + proto.EventStatusCode status = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // True if procedure was not performed as scheduled + proto.Boolean not_done = 14; + + // Reason procedure was not performed + proto.CodeableConcept not_done_reason = 15; + + // Classification of the procedure + proto.CodeableConcept category = 16; + + // SNOMED-CT | ICD-10 | CPT-4 + proto.CodeableConcept code = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who the procedure was performed on + proto.Reference subject = 18 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter or episode associated with the procedure + proto.Reference context = 19; + + // Date/Period the procedure was performed + message Performed { + oneof performed { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Performed performed = 20 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // The people who performed the procedure + message Performer { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The role the actor was in + proto.CodeableConcept role = 4; + + // The reference to the practitioner + proto.Reference actor = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization the device or practitioner was acting for + proto.Reference on_behalf_of = 6; + } + repeated Performer performer = 21; + + // Where the procedure happened + proto.Reference location = 22; + + // Coded reason procedure performed + repeated proto.CodeableConcept reason_code = 23; + + // Condition that is the reason the procedure performed + repeated proto.Reference reason_reference = 24; + + // Target body sites + repeated proto.CodeableConcept body_site = 25; + + // The result of procedure + proto.CodeableConcept outcome = 26; + + // Any report resulting from the procedure + repeated proto.Reference report = 27; + + // Complication following the procedure + repeated proto.CodeableConcept complication = 28; + + // A condition that is a result of the procedure + repeated proto.Reference complication_detail = 29; + + // Instructions for follow up + repeated proto.CodeableConcept follow_up = 30; + + // Additional information about the procedure + repeated proto.Annotation note = 31; + + // Device changed in procedure + message FocalDevice { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Kind of change to device + proto.CodeableConcept action = 4; + + // Device that was changed + proto.Reference manipulated = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated FocalDevice focal_device = 32; + + // Items used during procedure + repeated proto.Reference used_reference = 33; + + // Coded items used during the procedure + repeated proto.CodeableConcept used_code = 34; +} + +// Auto-generated from StructureDefinition for Profile-resource association +// extension. Resource that this profile is based on. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-profile-link +message CapabilityStatementProfileResourceAssociationExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-profile-link"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Value of extension + proto.ResourceTypeCode value_code = 3; +} + +// Auto-generated from StructureDefinition for US Core Race Extension. +// US Core Race Extension. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-race +message PatientUSCoreRaceExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Extension + repeated proto.Extension extension = 2; + + // American Indian or Alaska Native|Asian|Black or African American|Native + // Hawaiian or Other Pacific Islander|White + repeated proto.Coding omb_category = 4; + + // Extended race codes + repeated proto.Coding detailed = 5; + + // Race Text + proto.String text = 6 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; +} + +// Auto-generated from StructureDefinition for US Core Smoking Status Profile. +// US Core Smoking Status Observation Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus +message UsCoreSmokingstatus { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Observation"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business Identifier for observation + repeated proto.Identifier identifier = 9; + + // Fulfills plan, proposal or order + repeated proto.Reference based_on = 10; + + // registered | preliminary | final | amended + + proto.ObservationStatusCode status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Classification of type of observation + repeated proto.CodeableConcept category = 12; + + // Smoking Status: LOINC 72166-2 = Tobacco smoking status NHIS + proto.CodeableConcept code = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who and/or what this is about + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Healthcare event during which this observation is made + proto.Reference context = 15; + + // Clinically relevant time/time-period for observation + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date/Time this was made available + proto.Instant issued = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who is responsible for the observation + repeated proto.Reference performer = 18; + + // Coded Responses from Smoking Status Value Set + message Value { + oneof value { + proto.CodeableConcept codeable_concept = 2; + } + } + Value value = 19 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Why the result is missing + proto.CodeableConcept data_absent_reason = 20; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 21; + + // Comments about result + proto.String comment = 22; + + // Observed body part + proto.CodeableConcept body_site = 23; + + // How it was done + proto.CodeableConcept method = 24; + + // Specimen used for this observation + proto.Reference specimen = 25; + + // (Measurement) Device + proto.Reference device = 26; + + // Provides guide for interpretation + message ReferenceRange { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Low Range, if relevant + proto.SimpleQuantity low = 4; + + // High Range, if relevant + proto.SimpleQuantity high = 5; + + // Reference range qualifier + proto.CodeableConcept type = 6; + + // Reference range population + repeated proto.CodeableConcept applies_to = 7; + + // Applicable age range, if relevant + proto.Range age = 8; + + // Text based reference range in an observation + proto.String text = 9; + } + repeated ReferenceRange reference_range = 27; + + // Resource related to this observation + message Related { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // has-member | derived-from | sequel-to | replaces | qualified-by | + // interfered-by + proto.ObservationRelationshipTypeCode type = 4; + + // Resource that is related to this one + proto.Reference target = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Related related = 28; + + // Component results + message Component { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of component observation (code / type) + proto.CodeableConcept code = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Actual component result + message Value { + oneof value { + proto.Quantity quantity = 1; + proto.CodeableConcept codeable_concept = 2; + proto.String string_value = 3 [json_name = "string"]; + proto.Range range = 4; + proto.Ratio ratio = 5; + proto.SampledData sampled_data = 6; + proto.Attachment attachment = 7; + proto.Time time = 8; + proto.DateTime date_time = 9; + proto.Period period = 10; + } + } + Value value = 5 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Why the component result is missing + proto.CodeableConcept data_absent_reason = 6; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 7; + + // Provides guide for interpretation of component result + repeated ReferenceRange reference_range = 8; + } + repeated Component component = 29; +} diff --git a/proto/stu3/uscore_codes.proto b/proto/stu3/uscore_codes.proto new file mode 100644 index 000000000..7b5bcf8f5 --- /dev/null +++ b/proto/stu3/uscore_codes.proto @@ -0,0 +1,46 @@ +// Copyright 2018 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.stu3.uscore; + +import "proto/stu3/annotations.proto"; +import "proto/stu3/datatypes.proto"; + +option java_multiple_files = true; +option java_package = "com.google.fhir.stu3.uscore"; + +// A type defined by US Core for Birthsex +// http://hl7.org/fhir/us/core/ValueSet/us-core-birthsex +message UsCoreBirthSexCode { + option (proto.structure_definition_kind) = KIND_PRIMITIVE_TYPE; + option (proto.fhir_valueset_url) = + "http://hl7.org/fhir/us/core/ValueSet/us-core-birthsex"; + + // Primitive value for code + enum Value { + INVALID_UNINITIALIZED = 0; + FEMALE = 1 [(proto.fhir_original_code) = "F"]; + MALE = 2 [(proto.fhir_original_code) = "M"]; + UNKNOWN = 3 [(proto.fhir_original_code) = "UNK"]; + } + Value value = 1; + + // xml:id (or equivalent in JSON) + proto.String id = 2; + + // Additional Content defined by implementations + repeated proto.Extension extension = 3; +} diff --git a/testdata/stu3/BUILD b/testdata/stu3/BUILD index 2baf672bb..f80fa891a 100644 --- a/testdata/stu3/BUILD +++ b/testdata/stu3/BUILD @@ -41,6 +41,14 @@ filegroup( ]), ) +# These files contain us core codes. +filegroup( + name = "uscore", + srcs = glob([ + "uscore/*.json", + ]), +) + # These files contain StructureDefinitions used to generate the protos. filegroup( name = "structure_definitions", diff --git a/testdata/stu3/extensions/extension-goal-acceptance.descriptor.prototxt b/testdata/stu3/extensions/extension-goal-acceptance.descriptor.prototxt index 18235e8ff..b95e0ce01 100644 --- a/testdata/stu3/extensions/extension-goal-acceptance.descriptor.prototxt +++ b/testdata/stu3/extensions/extension-goal-acceptance.descriptor.prototxt @@ -35,7 +35,7 @@ field { number: 5 label: LABEL_OPTIONAL type: TYPE_MESSAGE - type_name: ".google.fhir.stu3.proto.Code" + type_name: ".google.fhir.stu3.proto.GoalAcceptanceStatusCode" options { [google.fhir.stu3.proto.field_description]: "agree | disagree | pending" } diff --git a/testdata/stu3/structure_definitions/uscore.proto b/testdata/stu3/structure_definitions/uscore.proto new file mode 100644 index 000000000..1fd5952de --- /dev/null +++ b/testdata/stu3/structure_definitions/uscore.proto @@ -0,0 +1,2768 @@ +// Copyright 2018 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.stu3.uscore; + +import "proto/stu3/annotations.proto"; +import "proto/stu3/codes.proto"; +import "proto/stu3/datatypes.proto"; +import "proto/stu3/resources.proto"; +import "proto/stu3/metadatatypes.proto"; +import "proto/stu3/uscore_codes.proto"; + +option java_multiple_files = true; +option java_package = "com.google.fhir.stu3.uscore"; + +// Auto-generated from StructureDefinition for US Core AllergyIntolerance +// Profile. US Core Allergies Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance +message UsCoreAllergyintolerance { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External ids for this item + repeated proto.Identifier identifier = 9; + + // active | inactive | resolved + proto.AllergyIntoleranceClinicalStatusCode clinical_status = 10; + + // unconfirmed | confirmed | refuted | entered-in-error + proto.AllergyIntoleranceVerificationStatusCode verification_status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // allergy | intolerance - Underlying mechanism (if known) + proto.AllergyIntoleranceTypeCode type = 12; + + // food | medication | environment | biologic + repeated proto.AllergyIntoleranceCategoryCode category = 13; + + // low | high | unable-to-assess + proto.AllergyIntoleranceCriticalityCode criticality = 14; + + // Code that identifies the allergy or intolerance + proto.CodeableConcept code = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who the sensitivity is for + proto.Reference patient = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // When allergy or intolerance was identified + message Onset { + oneof onset { + proto.DateTime date_time = 1; + proto.Age age = 2; + proto.Period period = 3; + proto.Range range = 4; + proto.String string_value = 5 [json_name = "string"]; + } + } + Onset onset = 17 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date record was believed accurate + proto.DateTime asserted_date = 18; + + // Who recorded the sensitivity + proto.Reference recorder = 19; + + // Source of the information about the allergy + proto.Reference asserter = 20; + + // Date(/time) of last known occurrence of a reaction + proto.DateTime last_occurrence = 21; + + // Additional text not captured in other fields + repeated proto.Annotation note = 22; + + // Adverse Reaction Events linked to exposure to substance + message Reaction { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Specific substance or pharmaceutical product considered to be responsible + // for event + proto.CodeableConcept substance = 4; + + // Clinical symptoms/signs associated with the Event + repeated proto.CodeableConcept manifestation = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Description of the event as a whole + proto.String description = 6; + + // Date(/time) when manifestations showed + proto.DateTime onset = 7; + + // mild | moderate | severe (of event as a whole) + proto.AllergyIntoleranceSeverityCode severity = 8; + + // How the subject was exposed to the substance + proto.CodeableConcept exposure_route = 9; + + // Text about event not captured in other fields + repeated proto.Annotation note = 10; + } + repeated Reaction reaction = 23; +} + +// Auto-generated from StructureDefinition for US Core Birth Sex Extension. +// Extension. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex +message PatientUSCoreBirthSexExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Value of extension + UsCoreBirthSexCode value_code = 3; +} + +// Auto-generated from StructureDefinition for US Core CarePlan Profile. +// US Core CarePlan Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan +message UsCoreCareplan { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/CarePlan"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this plan + repeated proto.Identifier identifier = 9; + + // Protocol or definition + repeated proto.Reference definition = 10; + + // Fulfills care plan + repeated proto.Reference based_on = 11; + + // CarePlan replaced by this CarePlan + repeated proto.Reference replaces = 12; + + // Part of referenced CarePlan + repeated proto.Reference part_of = 13; + + // draft | active | suspended | completed | entered-in-error | cancelled | + // unknown + proto.CarePlanStatusCode status = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // proposal | plan | order | option + proto.CarePlanIntentCode intent = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of plan + repeated proto.CodeableConcept category = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Human-friendly name for the CarePlan + proto.String title = 17; + + // Summary of nature of plan + proto.String description = 18; + + // Who care plan is for + proto.Reference subject = 19 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Created in context of + proto.Reference context = 20; + + // Time period plan covers + proto.Period period = 21; + + // Who is responsible for contents of the plan + repeated proto.Reference author = 22; + + // Who's involved in plan? + repeated proto.Reference care_team = 23; + + // Health issues this plan addresses + repeated proto.Reference addresses = 24; + + // Information considered as part of plan + repeated proto.Reference supporting_info = 25; + + // Desired outcome of plan + repeated proto.Reference goal = 26; + + // Action to occur as part of plan + message Activity { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Results of the activity + repeated proto.CodeableConcept outcome_codeable_concept = 4; + + // Appointment, Encounter, Procedure, etc. + repeated proto.Reference outcome_reference = 5; + + // Comments about the activity status/progress + repeated proto.Annotation progress = 6; + + // Activity details defined in specific resource + proto.Reference reference = 7; + + // In-line definition of activity + message Detail { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // diet | drug | encounter | observation | procedure | supply | other + proto.CodeableConcept category = 4; + + // Protocol or definition + proto.Reference definition = 5; + + // Detail type of activity + proto.CodeableConcept code = 6; + + // Why activity should be done or why activity was prohibited + repeated proto.CodeableConcept reason_code = 7; + + // Condition triggering need for activity + repeated proto.Reference reason_reference = 8; + + // Goals this activity relates to + repeated proto.Reference goal = 9; + + // not-started | scheduled | in-progress | on-hold | completed | cancelled + // | unknown + proto.CarePlanActivityStatusCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Reason for current status + proto.String status_reason = 11; + + // Do NOT do + proto.Boolean prohibited = 12; + + // When activity is to occur + message Scheduled { + oneof scheduled { + proto.Timing timing = 1; + proto.Period period = 2; + proto.String string_value = 3 [json_name = "string"]; + } + } + Scheduled scheduled = 13 + [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Where it should happen + proto.Reference location = 14; + + // Who will be responsible? + repeated proto.Reference performer = 15; + + // What is to be administered/supplied + message Product { + oneof product { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Product product = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // How to consume/day? + proto.SimpleQuantity daily_amount = 17; + + // How much to administer/supply/consume + proto.SimpleQuantity quantity = 18; + + // Extra info describing activity to perform + proto.String description = 19; + } + Detail detail = 8; + } + repeated Activity activity = 27; + + // Comments about the plan + repeated proto.Annotation note = 28; +} + +// Auto-generated from StructureDefinition for US Core CareTeam Profile. +// US Core CareTeam Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam +message UsCoreCareteam { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/CareTeam"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this team + repeated proto.Identifier identifier = 9; + + // proposed | active | suspended | inactive | entered-in-error + proto.CareTeamStatusCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of team + repeated proto.CodeableConcept category = 11; + + // Name of the team, such as crisis assessment team + proto.String name = 12; + + // Who care team is for + proto.Reference subject = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter or episode associated with CareTeam + proto.Reference context = 14; + + // Time period team covers + proto.Period period = 15; + + // Members of the team + message Participant { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of involvement + proto.CodeableConcept role = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who is involved + proto.Reference member = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization of the practitioner + proto.Reference on_behalf_of = 6; + + // Time period of participant + proto.Period period = 7; + } + repeated Participant participant = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Why the care team exists + repeated proto.CodeableConcept reason_code = 17; + + // Why the care team exists + repeated proto.Reference reason_reference = 18; + + // Organization responsible for the care team + repeated proto.Reference managing_organization = 19; + + // Comments made about the CareTeam + repeated proto.Annotation note = 20; +} + +// Auto-generated from StructureDefinition for US Core Condition (a.k.a +// Problem) Profile. US Core Condition Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition +message UsCoreCondition { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Condition"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this condition + repeated proto.Identifier identifier = 9; + + // active | recurrence | inactive | remission | resolved + proto.ConditionClinicalStatusCodesCode clinical_status = 10; + + // provisional | differential | confirmed | refuted | entered-in-error | + // unknown + proto.ConditionVerificationStatusCode verification_status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // problem-list-item | encounter-diagnosis + repeated proto.CodeableConcept category = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Subjective severity of condition + proto.CodeableConcept severity = 13; + + // Identification of the condition, problem or diagnosis + proto.CodeableConcept code = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Anatomical location, if relevant + repeated proto.CodeableConcept body_site = 15; + + // Who has the condition? + proto.Reference subject = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter or episode when condition first asserted + proto.Reference context = 17; + + // Estimated or actual date, date-time, or age + message Onset { + oneof onset { + proto.DateTime date_time = 1; + proto.Age age = 2; + proto.Period period = 3; + proto.Range range = 4; + proto.String string_value = 5 [json_name = "string"]; + } + } + Onset onset = 18 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // If/when in resolution/remission + message Abatement { + oneof abatement { + proto.DateTime date_time = 1; + proto.Age age = 2; + proto.Boolean boolean = 3; + proto.Period period = 4; + proto.Range range = 5; + proto.String string_value = 6 [json_name = "string"]; + } + } + Abatement abatement = 19 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date record was believed accurate + proto.DateTime asserted_date = 20; + + // Person who asserts this condition + proto.Reference asserter = 21; + + // Stage/grade, usually assessed formally + message Stage { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Simple summary (disease specific) + proto.CodeableConcept summary = 4; + + // Formal record of assessment + repeated proto.Reference assessment = 5; + } + Stage stage = 22; + + // Supporting evidence + message Evidence { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Manifestation/symptom + repeated proto.CodeableConcept code = 4; + + // Supporting information found elsewhere + repeated proto.Reference detail = 5; + } + repeated Evidence evidence = 23; + + // Additional information about the Condition + repeated proto.Annotation note = 24; +} + +// Auto-generated from StructureDefinition for US Core Device Profile. +// US Core Implanted Device Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-device +message UsCoreDevice { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Device"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-device"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Instance identifier + repeated proto.Identifier identifier = 9; + + // Unique Device Identifier (UDI) Barcode string + message Udi { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Mandatory fixed portion of UDI + proto.String device_identifier = 4; + + // Device Name as appears on UDI label + proto.String name = 5; + + // Regional UDI authority + proto.Uri jurisdiction = 6; + + // UDI Human Readable Barcode String + proto.String carrier_h_r_f = 7; + + // UDI Machine Readable Barcode String + proto.Base64Binary carrier_a_i_d_c = 8; + + // UDI Issuing Organization + proto.Uri issuer = 9; + + // barcode | rfid | manual + + proto.UDIEntryTypeCode entry_type = 10; + } + Udi udi = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // active | inactive | entered-in-error | unknown + proto.FHIRDeviceStatusCode status = 11; + + // What kind of device this is + proto.CodeableConcept type = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Lot number of manufacture + proto.String lot_number = 13; + + // Name of device manufacturer + proto.String manufacturer = 14; + + // Date when the device was made + proto.DateTime manufacture_date = 15; + + // Date and time of expiry of this device (if applicable) + proto.DateTime expiration_date = 16; + + // Model id assigned by the manufacturer + proto.String model = 17; + + // Version number (i.e. software) + proto.String version = 18; + + // Patient to whom Device is affixed + proto.Reference patient = 19 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization responsible for device + proto.Reference owner = 20; + + // Details for human/organization for support + repeated proto.ContactPoint contact = 21; + + // Where the resource is found + proto.Reference location = 22; + + // Network address to contact device + proto.Uri url = 23; + + // Device notes and comments + repeated proto.Annotation note = 24; + + // Safety Characteristics of Device + repeated proto.CodeableConcept safety = 25; +} + +// Auto-generated from StructureDefinition for US Core DiagnosticReport +// Profile. US Core Diagnostic Report Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport +message UsCoreDiagnosticreport { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/DiagnosticReport"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business identifier for report + repeated proto.Identifier identifier = 9; + + // What was requested + repeated proto.Reference based_on = 10; + + // registered | partial | preliminary | final + + proto.DiagnosticReportStatusCode status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Service category + proto.CodeableConcept category = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // US Core Laboratory Report Order Code + proto.CodeableConcept code = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // The subject of the report - usually, but not always, the patient + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Health care event when test ordered + proto.Reference context = 15; + + // Specimen Collection Datetime or Period + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // DateTime this version was released + proto.Instant issued = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Participants in producing the report + message Performer { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of performer + proto.CodeableConcept role = 4; + + // Practitioner or Organization participant + proto.Reference actor = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Performer performer = 18; + + // Specimens this report is based on + repeated proto.Reference specimen = 19; + + // Observations - simple, or complex nested groups + repeated proto.Reference result = 20; + + // Reference to full details of imaging associated with the diagnostic report + repeated proto.Reference imaging_study = 21; + + // Key images associated with this report + message Image { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Comment about the image (e.g. explanation) + proto.String comment = 4; + + // Reference to the image source + proto.Reference link = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Image image = 22; + + // Clinical Interpretation of test results + proto.String conclusion = 23; + + // Codes for the conclusion + repeated proto.CodeableConcept coded_diagnosis = 24; + + // Entire report as issued + repeated proto.Attachment presented_form = 25; +} + +// Auto-generated from StructureDefinition for UsCoreDirect. +// Email is a "direct" email. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct +message ContactPointUsCoreDirect { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Value of extension + proto.Boolean value_boolean = 3; +} + +// Auto-generated from StructureDefinition for US Core ethnicity Extension. +// US Core ethnicity Extension. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity +message PatientUSCoreEthnicityExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Extension + repeated proto.Extension extension = 2; + + // Hispanic or Latino|Not Hispanic or Latino + proto.Coding omb_category = 4; + + // Extended ethnicity codes + repeated proto.Coding detailed = 5; + + // ethnicity Text + proto.String text = 6 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; +} + +// Auto-generated from StructureDefinition for US Core Goal Profile. +// US Core Goal Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal +message UsCoreGoal { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Goal"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Ids for this goal + repeated proto.Identifier identifier = 9; + + // proposed | accepted | planned | in-progress | on-target | ahead-of-target | + // behind-target | sustaining | achieved | on-hold | cancelled | + // entered-in-error | rejected + proto.GoalStatusCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // E.g. Treatment, dietary, behavioral, etc. + repeated proto.CodeableConcept category = 11; + + // high-priority | medium-priority | low-priority + proto.CodeableConcept priority = 12; + + // Code or text describing goal + proto.CodeableConcept description = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who this goal is intended for + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // When goal pursuit begins + message Start { + oneof start { + proto.Date date = 1; + proto.CodeableConcept codeable_concept = 2; + } + } + Start start = 15 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Target outcome for the goal + message Target { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The parameter whose value is being tracked + proto.CodeableConcept measure = 4; + + // The target value to be achieved + message Detail { + oneof detail { + proto.Quantity quantity = 1; + proto.Range range = 2; + proto.CodeableConcept codeable_concept = 3; + } + } + Detail detail = 5 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Reach goal on or before + message Due { + oneof due { + proto.Date date = 1; + proto.Duration duration = 2; + } + } + Due due = 6 [(.google.fhir.stu3.proto.is_choice_type) = true]; + } + Target target = 16; + + // When goal status took effect + proto.Date status_date = 17; + + // Reason for current status + proto.String status_reason = 18; + + // Who's responsible for creating Goal? + proto.Reference expressed_by = 19; + + // Issues addressed by this goal + repeated proto.Reference addresses = 20; + + // Comments about the goal + repeated proto.Annotation note = 21; + + // What result was achieved regarding the goal? + repeated proto.CodeableConcept outcome_code = 22; + + // Observation that resulted from goal + repeated proto.Reference outcome_reference = 23; +} + +// Auto-generated from StructureDefinition for US Core Immunization Profile. +// US Core Immunization Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization +message UsCoreImmunization { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Immunization"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business identifier + repeated proto.Identifier identifier = 9; + + // completed | entered-in-error + proto.ImmunizationStatusCodesCode status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Flag for whether immunization was given + proto.Boolean not_given = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Vaccine Product Type (bind to CVX) + proto.CodeableConcept vaccine_code = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who was immunized + proto.Reference patient = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter administered as part of + proto.Reference encounter = 14; + + // Vaccination administration date + proto.DateTime date = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Indicates context the data was recorded in + proto.Boolean primary_source = 16 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Indicates the source of a secondarily reported record + proto.CodeableConcept report_origin = 17; + + // Where vaccination occurred + proto.Reference location = 18; + + // Vaccine manufacturer + proto.Reference manufacturer = 19; + + // Vaccine lot number + proto.String lot_number = 20; + + // Vaccine expiration date + proto.Date expiration_date = 21; + + // Body site vaccine was administered + proto.CodeableConcept site = 22; + + // How vaccine entered body + proto.CodeableConcept route = 23; + + // Amount of vaccine administered + proto.SimpleQuantity dose_quantity = 24; + + // Who performed event + message Practitioner { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // What type of performance was done + proto.CodeableConcept role = 4; + + // Individual who was performing + proto.Reference actor = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Practitioner practitioner = 25; + + // Vaccination notes + repeated proto.Annotation note = 26; + + // Administration/non-administration reasons + message Explanation { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Why immunization occurred + repeated proto.CodeableConcept reason = 4; + + // Why immunization did not occur + repeated proto.CodeableConcept reason_not_given = 5; + } + Explanation explanation = 27; + + // Details of a reaction that follows immunization + message Reaction { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // When reaction started + proto.DateTime date = 4; + + // Additional information on reaction + proto.Reference detail = 5; + + // Indicates self-reported reaction + proto.Boolean reported = 6; + } + repeated Reaction reaction = 28; + + // What protocol was followed + message VaccinationProtocol { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Dose number within series + proto.PositiveInt dose_sequence = 4; + + // Details of vaccine protocol + proto.String description = 5; + + // Who is responsible for protocol + proto.Reference authority = 6; + + // Name of vaccine series + proto.String series = 7; + + // Recommended number of doses for immunity + proto.PositiveInt series_doses = 8; + + // Disease immunized against + repeated proto.CodeableConcept target_disease = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Indicates if dose counts towards immunity + proto.CodeableConcept dose_status = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Why dose does (not) count + proto.CodeableConcept dose_status_reason = 11; + } + repeated VaccinationProtocol vaccination_protocol = 29; +} + +// Auto-generated from StructureDefinition for US Core Location Profile. +// US Core Location Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-location +message UsCoreLocation { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Location"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-location"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Unique code or number identifying the location to its users + repeated proto.Identifier identifier = 9; + + // active | suspended | inactive + proto.LocationStatusCode status = 10; + + // The Operational status of the location (typically only for a bed/room) + proto.Coding operational_status = 11; + + // Name of the location as used by humans + proto.String name = 12 + [(.google.fhir.stu3.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 proto.String alias = 13; + + // Additional details about the location that could be displayed as further + // information to identify the location beyond its name + proto.String description = 14; + + // instance | kind + proto.LocationModeCode mode = 15; + + // Type of function performed + proto.CodeableConcept type = 16; + + // Contact details of the location + repeated proto.ContactPoint telecom = 17; + + // Physical location + proto.Address address = 18; + + // Physical form of the location + proto.CodeableConcept physical_type = 19; + + // The absolute geographic location + message Position { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Longitude with WGS84 datum + proto.Decimal longitude = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Latitude with WGS84 datum + proto.Decimal latitude = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Altitude with WGS84 datum + proto.Decimal altitude = 6; + } + Position position = 20; + + // Organization responsible for provisioning and upkeep + proto.Reference managing_organization = 21; + + // Another Location this one is physically part of + proto.Reference part_of = 22; + + // Technical endpoints providing access to services operated for the location + repeated proto.Reference endpoint = 23; +} + +// Auto-generated from StructureDefinition for US Core Medication Profile. +// US Core Medication Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication +message UsCoreMedication { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Medication"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Codes that identify this medication + proto.CodeableConcept code = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // active | inactive | entered-in-error + proto.MedicationStatusCode status = 10; + + // True if a brand + proto.Boolean is_brand = 11; + + // True if medication does not require a prescription + proto.Boolean is_over_the_counter = 12; + + // Manufacturer of the item + proto.Reference manufacturer = 13; + + // powder | tablets | capsule + + proto.CodeableConcept form = 14; + + // Active or inactive ingredient + message Ingredient { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The product contained + message Item { + oneof item { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Item item = 4 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Active ingredient indicator + proto.Boolean is_active = 5; + + // Quantity of ingredient present + proto.Ratio amount = 6; + } + repeated Ingredient ingredient = 15; + + // Details about packaged medications + message Package { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // E.g. box, vial, blister-pack + proto.CodeableConcept container = 4; + + // What is in the package + message Content { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The item in the package + message Item { + oneof item { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Item item = 4 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Quantity present in the package + proto.SimpleQuantity amount = 5; + } + repeated Content content = 5; + + // Identifies a single production run + message Batch { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Identifier assigned to batch + proto.String lot_number = 4; + + // When batch will expire + proto.DateTime expiration_date = 5; + } + repeated Batch batch = 6; + } + Package package_value = 16 [json_name = "package"]; + + // Picture of the medication + repeated proto.Attachment image = 17; +} + +// Auto-generated from StructureDefinition for US Core MedicationRequest +// Profile. US Core Medication Request Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest +message UsCoreMedicationrequest { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/MedicationRequest"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External ids for this request + repeated proto.Identifier identifier = 9; + + // Protocol or definition + repeated proto.Reference definition = 10; + + // What request fulfills + repeated proto.Reference based_on = 11; + + // Composite request this is part of + proto.Identifier group_identifier = 12; + + // active | on-hold | cancelled | completed | entered-in-error | stopped | + // draft | unknown + proto.MedicationRequestStatusCode status = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // proposal | plan | order | instance-order + proto.MedicationRequestIntentCode intent = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of medication usage + proto.CodeableConcept category = 15; + + // routine | urgent | stat | asap + proto.MedicationRequestPriorityCode priority = 16; + + // Medication to be taken + message Medication { + oneof medication { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Medication medication = 17 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Who or group medication request is for + proto.Reference subject = 18 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Created during encounter/admission/stay + proto.Reference context = 19; + + // Information to support ordering of the medication + repeated proto.Reference supporting_information = 20; + + // When request was initially authored + proto.DateTime authored_on = 21 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who/What requested the Request + message Requester { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Who ordered the initial medication(s) + proto.Reference agent = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization agent is acting for + proto.Reference on_behalf_of = 5; + } + Requester requester = 22 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Person who entered the request + proto.Reference recorder = 23; + + // Reason or indication for writing the prescription + repeated proto.CodeableConcept reason_code = 24; + + // Condition or Observation that supports why the prescription is being + // written + repeated proto.Reference reason_reference = 25; + + // Information about the prescription + repeated proto.Annotation note = 26; + + // How the medication should be taken + repeated proto.Dosage dosage_instruction = 27; + + // Medication supply authorization + message DispenseRequest { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Time period supply is authorized for + proto.Period validity_period = 4; + + // Number of refills authorized + proto.PositiveInt number_of_repeats_allowed = 5; + + // Amount of medication to supply per dispense + proto.SimpleQuantity quantity = 6; + + // Number of days supply per dispense + proto.Duration expected_supply_duration = 7; + + // Intended dispenser + proto.Reference performer = 8; + } + DispenseRequest dispense_request = 28; + + // Any restrictions on medication substitution + message Substitution { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Whether substitution is allowed or not + proto.Boolean allowed = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Why should (not) substitution be made + proto.CodeableConcept reason = 5; + } + Substitution substitution = 29; + + // An order/prescription that is being replaced + proto.Reference prior_prescription = 30; + + // Clinical Issue with action + repeated proto.Reference detected_issue = 31; + + // A list of events of interest in the lifecycle + repeated proto.Reference event_history = 32; +} + +// Auto-generated from StructureDefinition for US Core MedicationStatement +// Profile. US Core Medication Statement Profile. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement +message UsCoreMedicationstatement { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/MedicationStatement"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External identifier + repeated proto.Identifier identifier = 9; + + // Fulfils plan, proposal or order + repeated proto.Reference based_on = 10; + + // Part of referenced event + repeated proto.Reference part_of = 11; + + // Encounter / Episode associated with MedicationStatement + proto.Reference context = 12; + + // active | completed | entered-in-error | intended | stopped | on-hold + proto.MedicationStatementStatusCode status = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Type of medication usage + proto.CodeableConcept category = 14; + + // What medication was taken + message Medication { + oneof medication { + proto.CodeableConcept codeable_concept = 1; + proto.Reference reference = 2; + } + } + Medication medication = 15 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // The date/time or interval when the medication was taken + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // When the statement was asserted? + proto.DateTime date_asserted = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Person or organization that provided the information about the taking of + // this medication + proto.Reference information_source = 18; + + // Who is/was taking the medication + proto.Reference subject = 19 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Additional supporting information + repeated proto.Reference derived_from = 20; + + // y | n | unk | na + proto.MedicationStatementTakenCode taken = 21 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // True if asserting medication was not given + repeated proto.CodeableConcept reason_not_taken = 22; + + // Reason for why the medication is being/was taken + repeated proto.CodeableConcept reason_code = 23; + + // Condition or observation that supports why the medication is being/was + // taken + repeated proto.Reference reason_reference = 24; + + // Further information about the statement + repeated proto.Annotation note = 25; + + // Details of how medication is/was taken or should be taken + repeated proto.Dosage dosage = 26; +} + +// Auto-generated from StructureDefinition for US Core Results Profile. +// US Core Result Observation. +// See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults +message UsCoreObservationresults { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Observation"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business Identifier for observation + repeated proto.Identifier identifier = 9; + + // Fulfills plan, proposal or order + repeated proto.Reference based_on = 10; + + // registered | preliminary | final | amended + + proto.ObservationStatusCode status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Classification of type of observation + repeated proto.CodeableConcept category = 12 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Laboratory Test Name + proto.CodeableConcept code = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who and/or what this is about + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Healthcare event during which this observation is made + proto.Reference context = 15; + + // Clinically relevant time/time-period for observation + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date/Time this was made available + proto.Instant issued = 17; + + // Who is responsible for the observation + repeated proto.Reference performer = 18; + + // Result Value + message Value { + oneof value { + proto.Quantity quantity = 1; + proto.CodeableConcept codeable_concept = 2; + proto.String string_value = 3 [json_name = "string"]; + proto.Boolean boolean = 4; + proto.Range range = 5; + proto.Ratio ratio = 6; + proto.SampledData sampled_data = 7; + proto.Attachment attachment = 8; + proto.Time time = 9; + proto.DateTime date_time = 10; + proto.Period period = 11; + } + } + Value value = 19 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Why the result is missing + proto.CodeableConcept data_absent_reason = 20; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 21; + + // Comments about result + proto.String comment = 22; + + // Observed body part + proto.CodeableConcept body_site = 23; + + // How it was done + proto.CodeableConcept method = 24; + + // Specimen used for this observation + proto.Reference specimen = 25; + + // (Measurement) Device + proto.Reference device = 26; + + // Provides guide for interpretation + message ReferenceRange { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Low Range, if relevant + proto.SimpleQuantity low = 4; + + // High Range, if relevant + proto.SimpleQuantity high = 5; + + // Reference range qualifier + proto.CodeableConcept type = 6; + + // Reference range population + repeated proto.CodeableConcept applies_to = 7; + + // Applicable age range, if relevant + proto.Range age = 8; + + // Text based reference range in an observation + proto.String text = 9; + } + repeated ReferenceRange reference_range = 27; + + // Resource related to this observation + message Related { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // has-member | derived-from | sequel-to | replaces | qualified-by | + // interfered-by + proto.ObservationRelationshipTypeCode type = 4; + + // Resource that is related to this one + proto.Reference target = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Related related = 28; + + // Component results + message Component { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of component observation (code / type) + proto.CodeableConcept code = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Actual component result + message Value { + oneof value { + proto.Quantity quantity = 1; + proto.CodeableConcept codeable_concept = 2; + proto.String string_value = 3 [json_name = "string"]; + proto.Range range = 4; + proto.Ratio ratio = 5; + proto.SampledData sampled_data = 6; + proto.Attachment attachment = 7; + proto.Time time = 8; + proto.DateTime date_time = 9; + proto.Period period = 10; + } + } + Value value = 5 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Why the component result is missing + proto.CodeableConcept data_absent_reason = 6; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 7; + + // Provides guide for interpretation of component result + repeated ReferenceRange reference_range = 8; + } + repeated Component component = 29; +} + +// Auto-generated from StructureDefinition for US Core Organization Profile. +// US Core Organization Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization +message UsCoreOrganization { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Organization"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Identifies this organization across multiple systems + repeated proto.Identifier identifier = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Whether the organization's record is still in active use + proto.Boolean active = 10 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Kind of organization + repeated proto.CodeableConcept type = 11; + + // Name used for the organization + proto.String name = 12 + [(.google.fhir.stu3.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 proto.String alias = 13; + + // A contact detail for the organization + repeated proto.ContactPoint telecom = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // An address for the organization + repeated proto.Address address = 15 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // The organization of which this organization forms a part + proto.Reference part_of = 16; + + // Contact for the organization for a certain purpose + message Contact { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The type of contact + proto.CodeableConcept purpose = 4; + + // A name associated with the contact + proto.HumanName name = 5; + + // Contact details (telephone, email, etc.) for a contact + repeated proto.ContactPoint telecom = 6; + + // Visiting or postal addresses for the contact + proto.Address address = 7; + } + repeated Contact contact = 17; + + // Technical endpoints providing access to services operated for the + // organization + repeated proto.Reference endpoint = 18; +} + +// Auto-generated from StructureDefinition for US Core Patient Profile. +// US Core Patient Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient +message UsCorePatient { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Patient"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Extension + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // An identifier for this patient + repeated proto.Identifier identifier = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Whether this patient's record is in active use + proto.Boolean active = 10; + + // A name associated with the patient + repeated proto.HumanName name = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // A contact detail for the individual + repeated proto.ContactPoint telecom = 12; + + // male | female | other | unknown + proto.AdministrativeGenderCode gender = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // The date of birth for the individual + proto.Date birth_date = 14; + + // Indicates if the individual is deceased or not + message Deceased { + oneof deceased { + proto.Boolean boolean = 1; + proto.DateTime date_time = 2; + } + } + Deceased deceased = 15 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Addresses for the individual + repeated proto.Address address = 16; + + // Marital (civil) status of a patient + proto.CodeableConcept marital_status = 17; + + // Whether patient is part of a multiple birth + message MultipleBirth { + oneof multiple_birth { + proto.Boolean boolean = 1; + proto.Integer integer = 2; + } + } + MultipleBirth multiple_birth = 18 + [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Image of the patient + repeated proto.Attachment photo = 19; + + // A contact party (e.g. guardian, partner, friend) for the patient + message Contact { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The kind of relationship + repeated proto.CodeableConcept relationship = 4; + + // A name associated with the contact person + proto.HumanName name = 5; + + // A contact detail for the person + repeated proto.ContactPoint telecom = 6; + + // Address for the contact person + proto.Address address = 7; + + // male | female | other | unknown + proto.AdministrativeGenderCode gender = 8; + + // Organization that is associated with the contact + proto.Reference organization = 9; + + // The period during which this contact person or organization is valid to + // be contacted relating to this patient + proto.Period period = 10; + } + repeated Contact contact = 20; + + // A list of Languages which may be used to communicate with the patient about + // his or her health + message Communication { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The language which can be used to communicate with the patient about his + // or her health + proto.CodeableConcept language = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Language preference indicator + proto.Boolean preferred = 5; + } + repeated Communication communication = 22; + + // Patient's nominated primary care provider + repeated proto.Reference general_practitioner = 23; + + // Organization that is the custodian of the patient record + proto.Reference managing_organization = 24; + + // Link to another patient resource that concerns the same actual person + message Link { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The other patient or related person resource that the link refers to + proto.Reference other = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // replaced-by | replaces | refer | seealso - type of link + proto.LinkTypeCode type = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Link link = 25; + + // Extension + PatientUSCoreRaceExtension race = 26 + [(.google.fhir.stu3.proto.fhir_inlined_extension_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"]; + + // Extension + PatientUSCoreEthnicityExtension ethnicity = 27 + [(.google.fhir.stu3.proto.fhir_inlined_extension_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity"]; + + // Extension + proto.UsCoreBirthSexCode birthsex = 28 + [(.google.fhir.stu3.proto.fhir_inlined_extension_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex"]; +} + +// Auto-generated from StructureDefinition for US Core Practitioner Profile. +// US Core Practitioner. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner +message UsCorePractitioner { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Practitioner"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // A identifier for the person as this agent + repeated proto.Identifier identifier = 9 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Whether this practitioner's record is in active use + proto.Boolean active = 10; + + // The name(s) associated with the practitioner + proto.HumanName name = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // A contact detail for the practitioner (that apply to all roles) + repeated proto.ContactPoint telecom = 12; + + // Address(es) of the practitioner that are not role specific (typically home + // address) + repeated proto.Address address = 13; + + // male | female | other | unknown + proto.AdministrativeGenderCode gender = 14; + + // The date on which the practitioner was born + proto.Date birth_date = 15; + + // Image of the person + repeated proto.Attachment photo = 16; + + // Qualifications obtained by training and certification + message Qualification { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // An identifier for this qualification for the practitioner + repeated proto.Identifier identifier = 4; + + // Coded representation of the qualification + proto.CodeableConcept code = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Period during which the qualification is valid + proto.Period period = 6; + + // Organization that regulates and issues the qualification + proto.Reference issuer = 7; + } + repeated Qualification qualification = 17; + + // A language the practitioner is able to use in patient communication + repeated proto.CodeableConcept communication = 18; +} + +// Auto-generated from StructureDefinition for US Core Procedure Profile. +// US Core Procedure Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure +message UsCoreProcedure { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Procedure"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // External Identifiers for this procedure + repeated proto.Identifier identifier = 9; + + // Instantiates protocol or definition + repeated proto.Reference definition = 10; + + // A request for this procedure + repeated proto.Reference based_on = 11; + + // Part of referenced event + repeated proto.Reference part_of = 12; + + // preparation | in-progress | suspended | aborted | completed | + // entered-in-error | unknown + proto.EventStatusCode status = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // True if procedure was not performed as scheduled + proto.Boolean not_done = 14; + + // Reason procedure was not performed + proto.CodeableConcept not_done_reason = 15; + + // Classification of the procedure + proto.CodeableConcept category = 16; + + // SNOMED-CT | ICD-10 | CPT-4 + proto.CodeableConcept code = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who the procedure was performed on + proto.Reference subject = 18 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Encounter or episode associated with the procedure + proto.Reference context = 19; + + // Date/Period the procedure was performed + message Performed { + oneof performed { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Performed performed = 20 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // The people who performed the procedure + message Performer { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // The role the actor was in + proto.CodeableConcept role = 4; + + // The reference to the practitioner + proto.Reference actor = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Organization the device or practitioner was acting for + proto.Reference on_behalf_of = 6; + } + repeated Performer performer = 21; + + // Where the procedure happened + proto.Reference location = 22; + + // Coded reason procedure performed + repeated proto.CodeableConcept reason_code = 23; + + // Condition that is the reason the procedure performed + repeated proto.Reference reason_reference = 24; + + // Target body sites + repeated proto.CodeableConcept body_site = 25; + + // The result of procedure + proto.CodeableConcept outcome = 26; + + // Any report resulting from the procedure + repeated proto.Reference report = 27; + + // Complication following the procedure + repeated proto.CodeableConcept complication = 28; + + // A condition that is a result of the procedure + repeated proto.Reference complication_detail = 29; + + // Instructions for follow up + repeated proto.CodeableConcept follow_up = 30; + + // Additional information about the procedure + repeated proto.Annotation note = 31; + + // Device changed in procedure + message FocalDevice { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Kind of change to device + proto.CodeableConcept action = 4; + + // Device that was changed + proto.Reference manipulated = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated FocalDevice focal_device = 32; + + // Items used during procedure + repeated proto.Reference used_reference = 33; + + // Coded items used during the procedure + repeated proto.CodeableConcept used_code = 34; +} + +// Auto-generated from StructureDefinition for Profile-resource association +// extension. Resource that this profile is based on. See +// http://hl7.org/fhir/us/core/StructureDefinition/us-core-profile-link +message CapabilityStatementProfileResourceAssociationExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-profile-link"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Value of extension + proto.ResourceTypeCode value_code = 3; +} + +// Auto-generated from StructureDefinition for US Core Race Extension. +// US Core Race Extension. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-race +message PatientUSCoreRaceExtension { + option (.google.fhir.stu3.proto.structure_definition_kind) = + KIND_COMPLEX_TYPE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Extension"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race"; + + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Extension + repeated proto.Extension extension = 2; + + // American Indian or Alaska Native|Asian|Black or African American|Native + // Hawaiian or Other Pacific Islander|White + repeated proto.Coding omb_category = 4; + + // Extended race codes + repeated proto.Coding detailed = 5; + + // Race Text + proto.String text = 6 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; +} + +// Auto-generated from StructureDefinition for US Core Smoking Status Profile. +// US Core Smoking Status Observation Profile. +// See http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus +message UsCoreSmokingstatus { + option (.google.fhir.stu3.proto.structure_definition_kind) = KIND_RESOURCE; + option (.google.fhir.stu3.proto.fhir_profile_base) = + "http://hl7.org/fhir/StructureDefinition/Observation"; + option (.google.fhir.stu3.proto.fhir_structure_definition_url) = + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus"; + + // Logical id of this artifact + proto.Id id = 1; + + // Metadata about the resource + proto.Meta meta = 2; + + // A set of rules under which this content was created + proto.Uri implicit_rules = 3; + + // Language of the resource content + proto.LanguageCode language = 4; + + // Text summary of the resource, for human interpretation + proto.Narrative text = 5; + + // Contained, inline Resources + repeated proto.ContainedResource contained = 6; + + // Additional Content defined by implementations + repeated proto.Extension extension = 7; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 8; + + // Business Identifier for observation + repeated proto.Identifier identifier = 9; + + // Fulfills plan, proposal or order + repeated proto.Reference based_on = 10; + + // registered | preliminary | final | amended + + proto.ObservationStatusCode status = 11 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Classification of type of observation + repeated proto.CodeableConcept category = 12; + + // Smoking Status: LOINC 72166-2 = Tobacco smoking status NHIS + proto.CodeableConcept code = 13 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who and/or what this is about + proto.Reference subject = 14 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Healthcare event during which this observation is made + proto.Reference context = 15; + + // Clinically relevant time/time-period for observation + message Effective { + oneof effective { + proto.DateTime date_time = 1; + proto.Period period = 2; + } + } + Effective effective = 16 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Date/Time this was made available + proto.Instant issued = 17 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Who is responsible for the observation + repeated proto.Reference performer = 18; + + // Coded Responses from Smoking Status Value Set + message Value { + oneof value { + proto.CodeableConcept codeable_concept = 2; + } + } + Value value = 19 [ + (.google.fhir.stu3.proto.is_choice_type) = true, + (.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR + ]; + + // Why the result is missing + proto.CodeableConcept data_absent_reason = 20; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 21; + + // Comments about result + proto.String comment = 22; + + // Observed body part + proto.CodeableConcept body_site = 23; + + // How it was done + proto.CodeableConcept method = 24; + + // Specimen used for this observation + proto.Reference specimen = 25; + + // (Measurement) Device + proto.Reference device = 26; + + // Provides guide for interpretation + message ReferenceRange { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Low Range, if relevant + proto.SimpleQuantity low = 4; + + // High Range, if relevant + proto.SimpleQuantity high = 5; + + // Reference range qualifier + proto.CodeableConcept type = 6; + + // Reference range population + repeated proto.CodeableConcept applies_to = 7; + + // Applicable age range, if relevant + proto.Range age = 8; + + // Text based reference range in an observation + proto.String text = 9; + } + repeated ReferenceRange reference_range = 27; + + // Resource related to this observation + message Related { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // has-member | derived-from | sequel-to | replaces | qualified-by | + // interfered-by + proto.ObservationRelationshipTypeCode type = 4; + + // Resource that is related to this one + proto.Reference target = 5 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + } + repeated Related related = 28; + + // Component results + message Component { + // xml:id (or equivalent in JSON) + proto.String id = 1; + + // Additional Content defined by implementations + repeated proto.Extension extension = 2; + + // Extensions that cannot be ignored + repeated proto.Extension modifier_extension = 3; + + // Type of component observation (code / type) + proto.CodeableConcept code = 4 + [(.google.fhir.stu3.proto.validation_requirement) = REQUIRED_BY_FHIR]; + + // Actual component result + message Value { + oneof value { + proto.Quantity quantity = 1; + proto.CodeableConcept codeable_concept = 2; + proto.String string_value = 3 [json_name = "string"]; + proto.Range range = 4; + proto.Ratio ratio = 5; + proto.SampledData sampled_data = 6; + proto.Attachment attachment = 7; + proto.Time time = 8; + proto.DateTime date_time = 9; + proto.Period period = 10; + } + } + Value value = 5 [(.google.fhir.stu3.proto.is_choice_type) = true]; + + // Why the component result is missing + proto.CodeableConcept data_absent_reason = 6; + + // High, low, normal, etc. + proto.CodeableConcept interpretation = 7; + + // Provides guide for interpretation of component result + repeated ReferenceRange reference_range = 8; + } + repeated Component component = 29; +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-allergyintolerance.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-allergyintolerance.descriptor.prototxt new file mode 100644 index 000000000..54c9f7987 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-allergyintolerance.descriptor.prototxt @@ -0,0 +1,392 @@ +name: "UsCoreAllergyintolerance" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External ids for this item" + } +} +field { + name: "clinical_status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AllergyIntoleranceClinicalStatusCode" + options { + [google.fhir.stu3.proto.field_description]: "active | inactive | resolved" + } +} +field { + name: "verification_status" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AllergyIntoleranceVerificationStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "unconfirmed | confirmed | refuted | entered-in-error" + } +} +field { + name: "type" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AllergyIntoleranceTypeCode" + options { + [google.fhir.stu3.proto.field_description]: "allergy | intolerance - Underlying mechanism (if known)" + } +} +field { + name: "category" + number: 13 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AllergyIntoleranceCategoryCode" + options { + [google.fhir.stu3.proto.field_description]: "food | medication | environment | biologic" + } +} +field { + name: "criticality" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AllergyIntoleranceCriticalityCode" + options { + [google.fhir.stu3.proto.field_description]: "low | high | unable-to-assess" + } +} +field { + name: "code" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Code that identifies the allergy or intolerance" + } +} +field { + name: "patient" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who the sensitivity is for" + } +} +field { + name: "onset" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreAllergyintolerance.Onset" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "When allergy or intolerance was identified" + } +} +field { + name: "asserted_date" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "Date record was believed accurate" + } +} +field { + name: "recorder" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who recorded the sensitivity" + } +} +field { + name: "asserter" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Source of the information about the allergy" + } +} +field { + name: "last_occurrence" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "Date(/time) of last known occurrence of a reaction" + } +} +field { + name: "note" + number: 22 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Additional text not captured in other fields" + } +} +field { + name: "reaction" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreAllergyintolerance.Reaction" + options { + [google.fhir.stu3.proto.field_description]: "Adverse Reaction Events linked to exposure to substance" + } +} +nested_type { + name: "Onset" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "age" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Age" + oneof_index: 0 + } + field { + name: "period" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + field { + name: "range" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + oneof_index: 0 + } + field { + name: "string_value" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + oneof_index: 0 + json_name: "string" + } + oneof_decl { + name: "onset" + } +} +nested_type { + name: "Reaction" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "substance" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Specific substance or pharmaceutical product considered to be responsible for event" + } + } + field { + name: "manifestation" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Clinical symptoms/signs associated with the Event" + } + } + field { + name: "description" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Description of the event as a whole" + } + } + field { + name: "onset" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "Date(/time) when manifestations showed" + } + } + field { + name: "severity" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AllergyIntoleranceSeverityCode" + options { + [google.fhir.stu3.proto.field_description]: "mild | moderate | severe (of event as a whole)" + } + } + field { + name: "exposure_route" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "How the subject was exposed to the substance" + } + } + field { + name: "note" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Text about event not captured in other fields" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core AllergyIntolerance Profile.\nUS Core Allergies Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-birthsex.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-birthsex.descriptor.prototxt new file mode 100644 index 000000000..566c660fd --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-birthsex.descriptor.prototxt @@ -0,0 +1,37 @@ +name: "PatientUSCoreBirthSexExtension" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } +} +field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "value_code" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreBirthSexCode" + options { + [google.fhir.stu3.proto.field_description]: "Value of extension" + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_COMPLEX_TYPE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Birth Sex Extension.\nExtension.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Extension" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-careplan.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-careplan.descriptor.prototxt new file mode 100644 index 000000000..900065a77 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-careplan.descriptor.prototxt @@ -0,0 +1,624 @@ +name: "UsCoreCareplan" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External Ids for this plan" + } +} +field { + name: "definition" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Protocol or definition" + } +} +field { + name: "based_on" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Fulfills care plan" + } +} +field { + name: "replaces" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "CarePlan replaced by this CarePlan" + } +} +field { + name: "part_of" + number: 13 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Part of referenced CarePlan" + } +} +field { + name: "status" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CarePlanStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "draft | active | suspended | completed | entered-in-error | cancelled | unknown" + } +} +field { + name: "intent" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CarePlanIntentCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "proposal | plan | order | option" + } +} +field { + name: "category" + number: 16 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Type of plan" + } +} +field { + name: "title" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Human-friendly name for the CarePlan" + } +} +field { + name: "description" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Summary of nature of plan" + } +} +field { + name: "subject" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who care plan is for" + } +} +field { + name: "context" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Created in context of" + } +} +field { + name: "period" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + options { + [google.fhir.stu3.proto.field_description]: "Time period plan covers" + } +} +field { + name: "author" + number: 22 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who is responsible for contents of the plan" + } +} +field { + name: "care_team" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who\'s involved in plan?" + } +} +field { + name: "addresses" + number: 24 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Health issues this plan addresses" + } +} +field { + name: "supporting_info" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Information considered as part of plan" + } +} +field { + name: "goal" + number: 26 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Desired outcome of plan" + } +} +field { + name: "activity" + number: 27 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCareplan.Activity" + options { + [google.fhir.stu3.proto.field_description]: "Action to occur as part of plan" + } +} +field { + name: "note" + number: 28 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Comments about the plan" + } +} +nested_type { + name: "Activity" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "outcome_codeable_concept" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Results of the activity" + } + } + field { + name: "outcome_reference" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Appointment, Encounter, Procedure, etc." + } + } + field { + name: "progress" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Comments about the activity status/progress" + } + } + field { + name: "reference" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Activity details defined in specific resource" + } + } + field { + name: "detail" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCareplan.Activity.Detail" + options { + [google.fhir.stu3.proto.field_description]: "In-line definition of activity" + } + } + nested_type { + name: "Detail" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "category" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "diet | drug | encounter | observation | procedure | supply | other" + } + } + field { + name: "definition" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Protocol or definition" + } + } + field { + name: "code" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Detail type of activity" + } + } + field { + name: "reason_code" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why activity should be done or why activity was prohibited" + } + } + field { + name: "reason_reference" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Condition triggering need for activity" + } + } + field { + name: "goal" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Goals this activity relates to" + } + } + field { + name: "status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CarePlanActivityStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "not-started | scheduled | in-progress | on-hold | completed | cancelled | unknown" + } + } + field { + name: "status_reason" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Reason for current status" + } + } + field { + name: "prohibited" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "Do NOT do" + } + } + field { + name: "scheduled" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCareplan.Activity.Detail.Scheduled" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "When activity is to occur" + } + } + field { + name: "location" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Where it should happen" + } + } + field { + name: "performer" + number: 15 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who will be responsible?" + } + } + field { + name: "product" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCareplan.Activity.Detail.Product" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "What is to be administered/supplied" + } + } + field { + name: "daily_amount" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "How to consume/day?" + } + } + field { + name: "quantity" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "How much to administer/supply/consume" + } + } + field { + name: "description" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Extra info describing activity to perform" + } + } + nested_type { + name: "Scheduled" + field { + name: "timing" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Timing" + oneof_index: 0 + } + field { + name: "period" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + field { + name: "string_value" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + oneof_index: 0 + json_name: "string" + } + oneof_decl { + name: "scheduled" + } + } + nested_type { + name: "Product" + field { + name: "codeable_concept" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "reference" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + oneof_index: 0 + } + oneof_decl { + name: "product" + } + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core CarePlan Profile.\nUS Core CarePlan Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/CarePlan" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-careteam.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-careteam.descriptor.prototxt new file mode 100644 index 000000000..221b849eb --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-careteam.descriptor.prototxt @@ -0,0 +1,285 @@ +name: "UsCoreCareteam" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External Ids for this team" + } +} +field { + name: "status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CareTeamStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "proposed | active | suspended | inactive | entered-in-error" + } +} +field { + name: "category" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Type of team" + } +} +field { + name: "name" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Name of the team, such as crisis assessment team" + } +} +field { + name: "subject" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who care team is for" + } +} +field { + name: "context" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Encounter or episode associated with CareTeam" + } +} +field { + name: "period" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + options { + [google.fhir.stu3.proto.field_description]: "Time period team covers" + } +} +field { + name: "participant" + number: 16 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCareteam.Participant" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Members of the team" + } +} +field { + name: "reason_code" + number: 17 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why the care team exists" + } +} +field { + name: "reason_reference" + number: 18 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Why the care team exists" + } +} +field { + name: "managing_organization" + number: 19 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization responsible for the care team" + } +} +field { + name: "note" + number: 20 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Comments made about the CareTeam" + } +} +nested_type { + name: "Participant" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "role" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Type of involvement" + } + } + field { + name: "member" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who is involved" + } + } + field { + name: "on_behalf_of" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization of the practitioner" + } + } + field { + name: "period" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + options { + [google.fhir.stu3.proto.field_description]: "Time period of participant" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core CareTeam Profile.\nUS Core CareTeam Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/CareTeam" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-condition.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-condition.descriptor.prototxt new file mode 100644 index 000000000..19db97626 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-condition.descriptor.prototxt @@ -0,0 +1,461 @@ +name: "UsCoreCondition" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External Ids for this condition" + } +} +field { + name: "clinical_status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ConditionClinicalStatusCodesCode" + options { + [google.fhir.stu3.proto.field_description]: "active | recurrence | inactive | remission | resolved" + } +} +field { + name: "verification_status" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ConditionVerificationStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "provisional | differential | confirmed | refuted | entered-in-error | unknown" + } +} +field { + name: "category" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "problem-list-item | encounter-diagnosis" + } +} +field { + name: "severity" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Subjective severity of condition" + } +} +field { + name: "code" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Identification of the condition, problem or diagnosis" + } +} +field { + name: "body_site" + number: 15 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Anatomical location, if relevant" + } +} +field { + name: "subject" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who has the condition?" + } +} +field { + name: "context" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Encounter or episode when condition first asserted" + } +} +field { + name: "onset" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCondition.Onset" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Estimated or actual date, date-time, or age" + } +} +field { + name: "abatement" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCondition.Abatement" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "If/when in resolution/remission" + } +} +field { + name: "asserted_date" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "Date record was believed accurate" + } +} +field { + name: "asserter" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Person who asserts this condition" + } +} +field { + name: "stage" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCondition.Stage" + options { + [google.fhir.stu3.proto.field_description]: "Stage/grade, usually assessed formally" + } +} +field { + name: "evidence" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreCondition.Evidence" + options { + [google.fhir.stu3.proto.field_description]: "Supporting evidence" + } +} +field { + name: "note" + number: 24 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Additional information about the Condition" + } +} +nested_type { + name: "Onset" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "age" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Age" + oneof_index: 0 + } + field { + name: "period" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + field { + name: "range" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + oneof_index: 0 + } + field { + name: "string_value" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + oneof_index: 0 + json_name: "string" + } + oneof_decl { + name: "onset" + } +} +nested_type { + name: "Abatement" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "age" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Age" + oneof_index: 0 + } + field { + name: "boolean" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + oneof_index: 0 + } + field { + name: "period" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + field { + name: "range" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + oneof_index: 0 + } + field { + name: "string_value" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + oneof_index: 0 + json_name: "string" + } + oneof_decl { + name: "abatement" + } +} +nested_type { + name: "Stage" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "summary" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Simple summary (disease specific)" + } + } + field { + name: "assessment" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Formal record of assessment" + } + } +} +nested_type { + name: "Evidence" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "code" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Manifestation/symptom" + } + } + field { + name: "detail" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Supporting information found elsewhere" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Condition (a.k.a Problem) Profile.\nUS Core Condition Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Condition" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-device.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-device.descriptor.prototxt new file mode 100644 index 000000000..41645c01f --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-device.descriptor.prototxt @@ -0,0 +1,363 @@ +name: "UsCoreDevice" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "Instance identifier" + } +} +field { + name: "udi" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreDevice.Udi" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Unique Device Identifier (UDI) Barcode string" + } +} +field { + name: "status" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.FHIRDeviceStatusCode" + options { + [google.fhir.stu3.proto.field_description]: "active | inactive | entered-in-error | unknown" + } +} +field { + name: "type" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "What kind of device this is" + } +} +field { + name: "lot_number" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Lot number of manufacture" + } +} +field { + name: "manufacturer" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Name of device manufacturer" + } +} +field { + name: "manufacture_date" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "Date when the device was made" + } +} +field { + name: "expiration_date" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "Date and time of expiry of this device (if applicable)" + } +} +field { + name: "model" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Model id assigned by the manufacturer" + } +} +field { + name: "version" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Version number (i.e. software)" + } +} +field { + name: "patient" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Patient to whom Device is affixed" + } +} +field { + name: "owner" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization responsible for device" + } +} +field { + name: "contact" + number: 21 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContactPoint" + options { + [google.fhir.stu3.proto.field_description]: "Details for human/organization for support" + } +} +field { + name: "location" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Where the resource is found" + } +} +field { + name: "url" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "Network address to contact device" + } +} +field { + name: "note" + number: 24 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Device notes and comments" + } +} +field { + name: "safety" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Safety Characteristics of Device" + } +} +nested_type { + name: "Udi" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "device_identifier" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Mandatory fixed portion of UDI" + } + } + field { + name: "name" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Device Name as appears on UDI label" + } + } + field { + name: "jurisdiction" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "Regional UDI authority" + } + } + field { + name: "carrier_h_r_f" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "UDI Human Readable Barcode String" + } + } + field { + name: "carrier_a_i_d_c" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Base64Binary" + options { + [google.fhir.stu3.proto.field_description]: "UDI Machine Readable Barcode String" + } + } + field { + name: "issuer" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "UDI Issuing Organization" + } + } + field { + name: "entry_type" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.UDIEntryTypeCode" + options { + [google.fhir.stu3.proto.field_description]: "barcode | rfid | manual +" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Device Profile.\nUS Core Implanted Device Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-device" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Device" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-device" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-diagnosticreport.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-diagnosticreport.descriptor.prototxt new file mode 100644 index 000000000..fa7e85149 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-diagnosticreport.descriptor.prototxt @@ -0,0 +1,394 @@ +name: "UsCoreDiagnosticreport" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "Business identifier for report" + } +} +field { + name: "based_on" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "What was requested" + } +} +field { + name: "status" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DiagnosticReportStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "registered | partial | preliminary | final +" + } +} +field { + name: "category" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Service category" + } +} +field { + name: "code" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "US Core Laboratory Report Order Code" + } +} +field { + name: "subject" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "The subject of the report - usually, but not always, the patient" + } +} +field { + name: "context" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Health care event when test ordered" + } +} +field { + name: "effective" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreDiagnosticreport.Effective" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Specimen Collection Datetime or Period" + } +} +field { + name: "issued" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Instant" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "DateTime this version was released" + } +} +field { + name: "performer" + number: 18 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreDiagnosticreport.Performer" + options { + [google.fhir.stu3.proto.field_description]: "Participants in producing the report" + } +} +field { + name: "specimen" + number: 19 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Specimens this report is based on" + } +} +field { + name: "result" + number: 20 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Observations - simple, or complex nested groups" + } +} +field { + name: "imaging_study" + number: 21 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Reference to full details of imaging associated with the diagnostic report" + } +} +field { + name: "image" + number: 22 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreDiagnosticreport.Image" + options { + [google.fhir.stu3.proto.field_description]: "Key images associated with this report" + } +} +field { + name: "conclusion" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Clinical Interpretation of test results" + } +} +field { + name: "coded_diagnosis" + number: 24 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Codes for the conclusion" + } +} +field { + name: "presented_form" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Attachment" + options { + [google.fhir.stu3.proto.field_description]: "Entire report as issued" + } +} +nested_type { + name: "Effective" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "effective" + } +} +nested_type { + name: "Performer" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "role" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Type of performer" + } + } + field { + name: "actor" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Practitioner or Organization participant" + } + } +} +nested_type { + name: "Image" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "comment" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Comment about the image (e.g. explanation)" + } + } + field { + name: "link" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Reference to the image source" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core DiagnosticReport Profile.\nUS Core Diagnostic Report Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/DiagnosticReport" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-direct.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-direct.descriptor.prototxt new file mode 100644 index 000000000..474618422 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-direct.descriptor.prototxt @@ -0,0 +1,37 @@ +name: "ContactPointUsCoreDirect" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } +} +field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "value_boolean" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "Value of extension" + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_COMPLEX_TYPE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for UsCoreDirect.\nEmail is a \"direct\" email.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Extension" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-direct" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-ethnicity.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-ethnicity.descriptor.prototxt new file mode 100644 index 000000000..183f47819 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-ethnicity.descriptor.prototxt @@ -0,0 +1,58 @@ +name: "PatientUSCoreEthnicityExtension" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } +} +field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extension" + } +} +field { + name: "omb_category" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Coding" + options { + [google.fhir.stu3.proto.field_description]: "Hispanic or Latino|Not Hispanic or Latino" + } +} +field { + name: "detailed" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Coding" + options { + [google.fhir.stu3.proto.field_description]: "Extended ethnicity codes" + } +} +field { + name: "text" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "ethnicity Text" + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_COMPLEX_TYPE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core ethnicity Extension.\nUS Core ethnicity Extension.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Extension" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-goal.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-goal.descriptor.prototxt new file mode 100644 index 000000000..91fc555f6 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-goal.descriptor.prototxt @@ -0,0 +1,380 @@ +name: "UsCoreGoal" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External Ids for this goal" + } +} +field { + name: "status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.GoalStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "proposed | accepted | planned | in-progress | on-target | ahead-of-target | behind-target | sustaining | achieved | on-hold | cancelled | entered-in-error | rejected" + } +} +field { + name: "category" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "E.g. Treatment, dietary, behavioral, etc." + } +} +field { + name: "priority" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "high-priority | medium-priority | low-priority" + } +} +field { + name: "description" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Code or text describing goal" + } +} +field { + name: "subject" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who this goal is intended for" + } +} +field { + name: "start" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreGoal.Start" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "When goal pursuit begins" + } +} +field { + name: "target" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreGoal.Target" + options { + [google.fhir.stu3.proto.field_description]: "Target outcome for the goal" + } +} +field { + name: "status_date" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Date" + options { + [google.fhir.stu3.proto.field_description]: "When goal status took effect" + } +} +field { + name: "status_reason" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Reason for current status" + } +} +field { + name: "expressed_by" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who\'s responsible for creating Goal?" + } +} +field { + name: "addresses" + number: 20 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Issues addressed by this goal" + } +} +field { + name: "note" + number: 21 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Comments about the goal" + } +} +field { + name: "outcome_code" + number: 22 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "What result was achieved regarding the goal?" + } +} +field { + name: "outcome_reference" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Observation that resulted from goal" + } +} +nested_type { + name: "Start" + field { + name: "date" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Date" + oneof_index: 0 + } + field { + name: "codeable_concept" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + oneof_decl { + name: "start" + } +} +nested_type { + name: "Target" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "measure" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "The parameter whose value is being tracked" + } + } + field { + name: "detail" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreGoal.Target.Detail" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "The target value to be achieved" + } + } + field { + name: "due" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreGoal.Target.Due" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Reach goal on or before" + } + } + nested_type { + name: "Detail" + field { + name: "quantity" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Quantity" + oneof_index: 0 + } + field { + name: "range" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + oneof_index: 0 + } + field { + name: "codeable_concept" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + oneof_decl { + name: "detail" + } + } + nested_type { + name: "Due" + field { + name: "date" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Date" + oneof_index: 0 + } + field { + name: "duration" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Duration" + oneof_index: 0 + } + oneof_decl { + name: "due" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Goal Profile.\nUS Core Goal Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Goal" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-immunization.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-immunization.descriptor.prototxt new file mode 100644 index 000000000..3aaee92aa --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-immunization.descriptor.prototxt @@ -0,0 +1,588 @@ +name: "UsCoreImmunization" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "Business identifier" + } +} +field { + name: "status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ImmunizationStatusCodesCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "completed | entered-in-error" + } +} +field { + name: "not_given" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Flag for whether immunization was given" + } +} +field { + name: "vaccine_code" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Vaccine Product Type (bind to CVX)" + } +} +field { + name: "patient" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who was immunized" + } +} +field { + name: "encounter" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Encounter administered as part of" + } +} +field { + name: "date" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Vaccination administration date" + } +} +field { + name: "primary_source" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Indicates context the data was recorded in" + } +} +field { + name: "report_origin" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Indicates the source of a secondarily reported record" + } +} +field { + name: "location" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Where vaccination occurred" + } +} +field { + name: "manufacturer" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Vaccine manufacturer" + } +} +field { + name: "lot_number" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Vaccine lot number" + } +} +field { + name: "expiration_date" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Date" + options { + [google.fhir.stu3.proto.field_description]: "Vaccine expiration date" + } +} +field { + name: "site" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Body site vaccine was administered" + } +} +field { + name: "route" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "How vaccine entered body" + } +} +field { + name: "dose_quantity" + number: 24 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "Amount of vaccine administered" + } +} +field { + name: "practitioner" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreImmunization.Practitioner" + options { + [google.fhir.stu3.proto.field_description]: "Who performed event" + } +} +field { + name: "note" + number: 26 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Vaccination notes" + } +} +field { + name: "explanation" + number: 27 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreImmunization.Explanation" + options { + [google.fhir.stu3.proto.field_description]: "Administration/non-administration reasons" + } +} +field { + name: "reaction" + number: 28 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreImmunization.Reaction" + options { + [google.fhir.stu3.proto.field_description]: "Details of a reaction that follows immunization" + } +} +field { + name: "vaccination_protocol" + number: 29 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreImmunization.VaccinationProtocol" + options { + [google.fhir.stu3.proto.field_description]: "What protocol was followed" + } +} +nested_type { + name: "Practitioner" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "role" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "What type of performance was done" + } + } + field { + name: "actor" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Individual who was performing" + } + } +} +nested_type { + name: "Explanation" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "reason" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why immunization occurred" + } + } + field { + name: "reason_not_given" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why immunization did not occur" + } + } +} +nested_type { + name: "Reaction" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "date" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "When reaction started" + } + } + field { + name: "detail" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Additional information on reaction" + } + } + field { + name: "reported" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "Indicates self-reported reaction" + } + } +} +nested_type { + name: "VaccinationProtocol" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "dose_sequence" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.PositiveInt" + options { + [google.fhir.stu3.proto.field_description]: "Dose number within series" + } + } + field { + name: "description" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Details of vaccine protocol" + } + } + field { + name: "authority" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who is responsible for protocol" + } + } + field { + name: "series" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Name of vaccine series" + } + } + field { + name: "series_doses" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.PositiveInt" + options { + [google.fhir.stu3.proto.field_description]: "Recommended number of doses for immunity" + } + } + field { + name: "target_disease" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Disease immunized against" + } + } + field { + name: "dose_status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Indicates if dose counts towards immunity" + } + } + field { + name: "dose_status_reason" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why dose does (not) count" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Immunization Profile.\nUS Core Immunization Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Immunization" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-location.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-location.descriptor.prototxt new file mode 100644 index 000000000..030f65ecc --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-location.descriptor.prototxt @@ -0,0 +1,303 @@ +name: "UsCoreLocation" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "Unique code or number identifying the location to its users" + } +} +field { + name: "status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LocationStatusCode" + options { + [google.fhir.stu3.proto.field_description]: "active | suspended | inactive" + } +} +field { + name: "operational_status" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Coding" + options { + [google.fhir.stu3.proto.field_description]: "The Operational status of the location (typically only for a bed/room)" + } +} +field { + name: "name" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Name of the location as used by humans" + } +} +field { + name: "alias" + number: 13 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "A list of\302\240alternate names that the location is known as, or was known as in the past" + } +} +field { + name: "description" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Additional details about the location that could be displayed as further information to identify the location beyond its name" + } +} +field { + name: "mode" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LocationModeCode" + options { + [google.fhir.stu3.proto.field_description]: "instance | kind" + } +} +field { + name: "type" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Type of function performed" + } +} +field { + name: "telecom" + number: 17 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContactPoint" + options { + [google.fhir.stu3.proto.field_description]: "Contact details of the location" + } +} +field { + name: "address" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Address" + options { + [google.fhir.stu3.proto.field_description]: "Physical location" + } +} +field { + name: "physical_type" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Physical form of the location" + } +} +field { + name: "position" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreLocation.Position" + options { + [google.fhir.stu3.proto.field_description]: "The absolute geographic location" + } +} +field { + name: "managing_organization" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization responsible for provisioning and upkeep" + } +} +field { + name: "part_of" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Another Location this one is physically part of" + } +} +field { + name: "endpoint" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Technical endpoints providing access to services operated for the location" + } +} +nested_type { + name: "Position" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "longitude" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Decimal" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Longitude with WGS84 datum" + } + } + field { + name: "latitude" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Decimal" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Latitude with WGS84 datum" + } + } + field { + name: "altitude" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Decimal" + options { + [google.fhir.stu3.proto.field_description]: "Altitude with WGS84 datum" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Location Profile.\nUS Core Location Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-location" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Location" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-location" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-medication.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-medication.descriptor.prototxt new file mode 100644 index 000000000..e7d6d6d47 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-medication.descriptor.prototxt @@ -0,0 +1,459 @@ +name: "UsCoreMedication" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "code" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Codes that identify this medication" + } +} +field { + name: "status" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.MedicationStatusCode" + options { + [google.fhir.stu3.proto.field_description]: "active | inactive | entered-in-error" + } +} +field { + name: "is_brand" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "True if a brand" + } +} +field { + name: "is_over_the_counter" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "True if medication does not require a prescription" + } +} +field { + name: "manufacturer" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Manufacturer of the item" + } +} +field { + name: "form" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "powder | tablets | capsule +" + } +} +field { + name: "ingredient" + number: 15 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedication.Ingredient" + options { + [google.fhir.stu3.proto.field_description]: "Active or inactive ingredient" + } +} +field { + name: "package_value" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedication.Package" + options { + [google.fhir.stu3.proto.field_description]: "Details about packaged medications" + } + json_name: "package" +} +field { + name: "image" + number: 17 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Attachment" + options { + [google.fhir.stu3.proto.field_description]: "Picture of the medication" + } +} +nested_type { + name: "Ingredient" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "item" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedication.Ingredient.Item" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "The product contained" + } + } + field { + name: "is_active" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "Active ingredient indicator" + } + } + field { + name: "amount" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Ratio" + options { + [google.fhir.stu3.proto.field_description]: "Quantity of ingredient present" + } + } + nested_type { + name: "Item" + field { + name: "codeable_concept" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "reference" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + oneof_index: 0 + } + oneof_decl { + name: "item" + } + } +} +nested_type { + name: "Package" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "container" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "E.g. box, vial, blister-pack" + } + } + field { + name: "content" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedication.Package.Content" + options { + [google.fhir.stu3.proto.field_description]: "What is in the package" + } + } + field { + name: "batch" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedication.Package.Batch" + options { + [google.fhir.stu3.proto.field_description]: "Identifies a single production run" + } + } + nested_type { + name: "Content" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "item" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedication.Package.Content.Item" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "The item in the package" + } + } + field { + name: "amount" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "Quantity present in the package" + } + } + nested_type { + name: "Item" + field { + name: "codeable_concept" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "reference" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + oneof_index: 0 + } + oneof_decl { + name: "item" + } + } + } + nested_type { + name: "Batch" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "lot_number" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Identifier assigned to batch" + } + } + field { + name: "expiration_date" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.field_description]: "When batch will expire" + } + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Medication Profile.\nUS Core Medication Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Medication" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-medicationrequest.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-medicationrequest.descriptor.prototxt new file mode 100644 index 000000000..b3eaf09e8 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-medicationrequest.descriptor.prototxt @@ -0,0 +1,547 @@ +name: "UsCoreMedicationrequest" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External ids for this request" + } +} +field { + name: "definition" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Protocol or definition" + } +} +field { + name: "based_on" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "What request fulfills" + } +} +field { + name: "group_identifier" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "Composite request this is part of" + } +} +field { + name: "status" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.MedicationRequestStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown" + } +} +field { + name: "intent" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.MedicationRequestIntentCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "proposal | plan | order | instance-order" + } +} +field { + name: "category" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Type of medication usage" + } +} +field { + name: "priority" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.MedicationRequestPriorityCode" + options { + [google.fhir.stu3.proto.field_description]: "routine | urgent | stat | asap" + } +} +field { + name: "medication" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedicationrequest.Medication" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Medication to be taken" + } +} +field { + name: "subject" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who or group medication request is for" + } +} +field { + name: "context" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Created during encounter/admission/stay" + } +} +field { + name: "supporting_information" + number: 20 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Information to support ordering of the medication" + } +} +field { + name: "authored_on" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "When request was initially authored" + } +} +field { + name: "requester" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedicationrequest.Requester" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who/What requested the Request" + } +} +field { + name: "recorder" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Person who entered the request" + } +} +field { + name: "reason_code" + number: 24 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Reason or indication for writing the prescription" + } +} +field { + name: "reason_reference" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Condition or Observation that supports why the prescription is being written" + } +} +field { + name: "note" + number: 26 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Information about the prescription" + } +} +field { + name: "dosage_instruction" + number: 27 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Dosage" + options { + [google.fhir.stu3.proto.field_description]: "How the medication should be taken" + } +} +field { + name: "dispense_request" + number: 28 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedicationrequest.DispenseRequest" + options { + [google.fhir.stu3.proto.field_description]: "Medication supply authorization" + } +} +field { + name: "substitution" + number: 29 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedicationrequest.Substitution" + options { + [google.fhir.stu3.proto.field_description]: "Any restrictions on medication substitution" + } +} +field { + name: "prior_prescription" + number: 30 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "An order/prescription that is being replaced" + } +} +field { + name: "detected_issue" + number: 31 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Clinical Issue with action" + } +} +field { + name: "event_history" + number: 32 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "A list of events of interest in the lifecycle" + } +} +nested_type { + name: "Medication" + field { + name: "codeable_concept" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "reference" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + oneof_index: 0 + } + oneof_decl { + name: "medication" + } +} +nested_type { + name: "Requester" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "agent" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who ordered the initial medication(s)" + } + } + field { + name: "on_behalf_of" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization agent is acting for" + } + } +} +nested_type { + name: "DispenseRequest" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "validity_period" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + options { + [google.fhir.stu3.proto.field_description]: "Time period supply is authorized for" + } + } + field { + name: "number_of_repeats_allowed" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.PositiveInt" + options { + [google.fhir.stu3.proto.field_description]: "Number of refills authorized" + } + } + field { + name: "quantity" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "Amount of medication to supply per dispense" + } + } + field { + name: "expected_supply_duration" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Duration" + options { + [google.fhir.stu3.proto.field_description]: "Number of days supply per dispense" + } + } + field { + name: "performer" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Intended dispenser" + } + } +} +nested_type { + name: "Substitution" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "allowed" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Whether substitution is allowed or not" + } + } + field { + name: "reason" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why should (not) substitution be made" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core MedicationRequest Profile.\nUS Core Medication Request Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/MedicationRequest" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-medicationstatement.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-medicationstatement.descriptor.prototxt new file mode 100644 index 000000000..9ca451699 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-medicationstatement.descriptor.prototxt @@ -0,0 +1,318 @@ +name: "UsCoreMedicationstatement" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External identifier" + } +} +field { + name: "based_on" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Fulfils plan, proposal or order" + } +} +field { + name: "part_of" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Part of referenced event" + } +} +field { + name: "context" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Encounter / Episode associated with MedicationStatement" + } +} +field { + name: "status" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.MedicationStatementStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "active | completed | entered-in-error | intended | stopped | on-hold" + } +} +field { + name: "category" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Type of medication usage" + } +} +field { + name: "medication" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedicationstatement.Medication" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "What medication was taken" + } +} +field { + name: "effective" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreMedicationstatement.Effective" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "The date/time or interval when the medication was taken" + } +} +field { + name: "date_asserted" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "When the statement was asserted?" + } +} +field { + name: "information_source" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Person or organization that provided the information about the taking of this medication" + } +} +field { + name: "subject" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who is/was taking the medication" + } +} +field { + name: "derived_from" + number: 20 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Additional supporting information" + } +} +field { + name: "taken" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.MedicationStatementTakenCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "y | n | unk | na" + } +} +field { + name: "reason_not_taken" + number: 22 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "True if asserting medication was not given" + } +} +field { + name: "reason_code" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Reason for why the medication is being/was taken" + } +} +field { + name: "reason_reference" + number: 24 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Condition or observation that supports why the medication is being/was taken" + } +} +field { + name: "note" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Further information about the statement" + } +} +field { + name: "dosage" + number: 26 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Dosage" + options { + [google.fhir.stu3.proto.field_description]: "Details of how medication is/was taken or should be taken" + } +} +nested_type { + name: "Medication" + field { + name: "codeable_concept" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "reference" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + oneof_index: 0 + } + oneof_decl { + name: "medication" + } +} +nested_type { + name: "Effective" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "effective" + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core MedicationStatement Profile.\nUS Core Medication Statement Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/MedicationStatement" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-observationresults.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-observationresults.descriptor.prototxt new file mode 100644 index 000000000..46e10bf4a --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-observationresults.descriptor.prototxt @@ -0,0 +1,739 @@ +name: "UsCoreObservationresults" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "Business Identifier for observation" + } +} +field { + name: "based_on" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Fulfills plan, proposal or order" + } +} +field { + name: "status" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ObservationStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "registered | preliminary | final | amended +" + } +} +field { + name: "category" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Classification of type of observation" + } +} +field { + name: "code" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Laboratory Test Name" + } +} +field { + name: "subject" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who and/or what this is about" + } +} +field { + name: "context" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Healthcare event during which this observation is made" + } +} +field { + name: "effective" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreObservationresults.Effective" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Clinically relevant time/time-period for observation" + } +} +field { + name: "issued" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Instant" + options { + [google.fhir.stu3.proto.field_description]: "Date/Time this was made available" + } +} +field { + name: "performer" + number: 18 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who is responsible for the observation" + } +} +field { + name: "value" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreObservationresults.Value" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Result Value" + } +} +field { + name: "data_absent_reason" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why the result is missing" + } +} +field { + name: "interpretation" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "High, low, normal, etc." + } +} +field { + name: "comment" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Comments about result" + } +} +field { + name: "body_site" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Observed body part" + } +} +field { + name: "method" + number: 24 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "How it was done" + } +} +field { + name: "specimen" + number: 25 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Specimen used for this observation" + } +} +field { + name: "device" + number: 26 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "(Measurement) Device" + } +} +field { + name: "reference_range" + number: 27 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreObservationresults.ReferenceRange" + options { + [google.fhir.stu3.proto.field_description]: "Provides guide for interpretation" + } +} +field { + name: "related" + number: 28 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreObservationresults.Related" + options { + [google.fhir.stu3.proto.field_description]: "Resource related to this observation" + } +} +field { + name: "component" + number: 29 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreObservationresults.Component" + options { + [google.fhir.stu3.proto.field_description]: "Component results" + } +} +nested_type { + name: "Effective" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "effective" + } +} +nested_type { + name: "Value" + field { + name: "quantity" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Quantity" + oneof_index: 0 + } + field { + name: "codeable_concept" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "string_value" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + oneof_index: 0 + json_name: "string" + } + field { + name: "boolean" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + oneof_index: 0 + } + field { + name: "range" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + oneof_index: 0 + } + field { + name: "ratio" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Ratio" + oneof_index: 0 + } + field { + name: "sampled_data" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SampledData" + oneof_index: 0 + } + field { + name: "attachment" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Attachment" + oneof_index: 0 + } + field { + name: "time" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Time" + oneof_index: 0 + } + field { + name: "date_time" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "value" + } +} +nested_type { + name: "ReferenceRange" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "low" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "Low Range, if relevant" + } + } + field { + name: "high" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "High Range, if relevant" + } + } + field { + name: "type" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Reference range qualifier" + } + } + field { + name: "applies_to" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Reference range population" + } + } + field { + name: "age" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + options { + [google.fhir.stu3.proto.field_description]: "Applicable age range, if relevant" + } + } + field { + name: "text" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Text based reference range in an observation" + } + } +} +nested_type { + name: "Related" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "type" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ObservationRelationshipTypeCode" + options { + [google.fhir.stu3.proto.field_description]: "has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by" + } + } + field { + name: "target" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Resource that is related to this one" + } + } +} +nested_type { + name: "Component" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "code" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Type of component observation (code / type)" + } + } + field { + name: "value" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreObservationresults.Component.Value" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Actual component result" + } + } + field { + name: "data_absent_reason" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why the component result is missing" + } + } + field { + name: "interpretation" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "High, low, normal, etc." + } + } + field { + name: "reference_range" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreObservationresults.ReferenceRange" + options { + [google.fhir.stu3.proto.field_description]: "Provides guide for interpretation of component result" + } + } + nested_type { + name: "Value" + field { + name: "quantity" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Quantity" + oneof_index: 0 + } + field { + name: "codeable_concept" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "string_value" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + oneof_index: 0 + json_name: "string" + } + field { + name: "range" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + oneof_index: 0 + } + field { + name: "ratio" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Ratio" + oneof_index: 0 + } + field { + name: "sampled_data" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SampledData" + oneof_index: 0 + } + field { + name: "attachment" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Attachment" + oneof_index: 0 + } + field { + name: "time" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Time" + oneof_index: 0 + } + field { + name: "date_time" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "value" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Results Profile.\nUS Core Result Observation.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Observation" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observationresults" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-organization.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-organization.descriptor.prototxt new file mode 100644 index 000000000..e618c751e --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-organization.descriptor.prototxt @@ -0,0 +1,265 @@ +name: "UsCoreOrganization" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Identifies this organization across multiple systems" + } +} +field { + name: "active" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Whether the organization\'s record is still in active use" + } +} +field { + name: "type" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Kind of organization" + } +} +field { + name: "name" + number: 12 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Name used for the organization" + } +} +field { + name: "alias" + number: 13 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "A list of\302\240alternate names that the organization is known as, or was known as in the past" + } +} +field { + name: "telecom" + number: 14 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContactPoint" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "A contact detail for the organization" + } +} +field { + name: "address" + number: 15 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Address" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "An address for the organization" + } +} +field { + name: "part_of" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "The organization of which this organization forms a part" + } +} +field { + name: "contact" + number: 17 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreOrganization.Contact" + options { + [google.fhir.stu3.proto.field_description]: "Contact for the organization for a certain purpose" + } +} +field { + name: "endpoint" + number: 18 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Technical endpoints providing access to services operated for the organization" + } +} +nested_type { + name: "Contact" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "purpose" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "The type of contact" + } + } + field { + name: "name" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.HumanName" + options { + [google.fhir.stu3.proto.field_description]: "A name associated with the contact" + } + } + field { + name: "telecom" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContactPoint" + options { + [google.fhir.stu3.proto.field_description]: "Contact details (telephone, email, etc.) for a contact" + } + } + field { + name: "address" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Address" + options { + [google.fhir.stu3.proto.field_description]: "Visiting or postal addresses for the contact" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Organization Profile.\nUS Core Organization Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Organization" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-patient.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-patient.descriptor.prototxt new file mode 100644 index 000000000..8a72b138e --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-patient.descriptor.prototxt @@ -0,0 +1,541 @@ +name: "UsCorePatient" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extension" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "An identifier for this patient" + } +} +field { + name: "active" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "Whether this patient\'s record is in active use" + } +} +field { + name: "name" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.HumanName" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "A name associated with the patient" + } +} +field { + name: "telecom" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContactPoint" + options { + [google.fhir.stu3.proto.field_description]: "A contact detail for the individual" + } +} +field { + name: "gender" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AdministrativeGenderCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "male | female | other | unknown" + } +} +field { + name: "birth_date" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Date" + options { + [google.fhir.stu3.proto.field_description]: "The date of birth for the individual" + } +} +field { + name: "deceased" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCorePatient.Deceased" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Indicates if the individual is deceased or not" + } +} +field { + name: "address" + number: 16 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Address" + options { + [google.fhir.stu3.proto.field_description]: "Addresses for the individual" + } +} +field { + name: "marital_status" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Marital (civil) status of a patient" + } +} +field { + name: "multiple_birth" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCorePatient.MultipleBirth" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Whether patient is part of a multiple birth" + } +} +field { + name: "photo" + number: 19 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Attachment" + options { + [google.fhir.stu3.proto.field_description]: "Image of the patient" + } +} +field { + name: "contact" + number: 20 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCorePatient.Contact" + options { + [google.fhir.stu3.proto.field_description]: "A contact party (e.g. guardian, partner, friend) for the patient" + } +} +field { + name: "communication" + number: 22 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCorePatient.Communication" + options { + [google.fhir.stu3.proto.field_description]: "A list of Languages which may be used to communicate with the patient about his or her health" + } +} +field { + name: "general_practitioner" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Patient\'s nominated primary care provider" + } +} +field { + name: "managing_organization" + number: 24 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization that is the custodian of the patient record" + } +} +field { + name: "link" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCorePatient.Link" + options { + [google.fhir.stu3.proto.field_description]: "Link to another patient resource that concerns the same actual person" + } +} +field { + name: "race" + number: 26 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.PatientUSCoreRaceExtension" + options { + [google.fhir.stu3.proto.field_description]: "Extension" + [google.fhir.stu3.proto.fhir_inlined_extension_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" + } +} +field { + name: "ethnicity" + number: 27 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.PatientUSCoreEthnicityExtension" + options { + [google.fhir.stu3.proto.field_description]: "Extension" + [google.fhir.stu3.proto.fhir_inlined_extension_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" + } +} +field { + name: "birthsex" + number: 28 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreBirthSexCode" + options { + [google.fhir.stu3.proto.field_description]: "Extension" + [google.fhir.stu3.proto.fhir_inlined_extension_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex" + } +} +nested_type { + name: "Deceased" + field { + name: "boolean" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + oneof_index: 0 + } + field { + name: "date_time" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + oneof_decl { + name: "deceased" + } +} +nested_type { + name: "MultipleBirth" + field { + name: "boolean" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + oneof_index: 0 + } + field { + name: "integer" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Integer" + oneof_index: 0 + } + oneof_decl { + name: "multiple_birth" + } +} +nested_type { + name: "Contact" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "relationship" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "The kind of relationship" + } + } + field { + name: "name" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.HumanName" + options { + [google.fhir.stu3.proto.field_description]: "A name associated with the contact person" + } + } + field { + name: "telecom" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContactPoint" + options { + [google.fhir.stu3.proto.field_description]: "A contact detail for the person" + } + } + field { + name: "address" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Address" + options { + [google.fhir.stu3.proto.field_description]: "Address for the contact person" + } + } + field { + name: "gender" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AdministrativeGenderCode" + options { + [google.fhir.stu3.proto.field_description]: "male | female | other | unknown" + } + } + field { + name: "organization" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization that is associated with the contact" + } + } + field { + name: "period" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + options { + [google.fhir.stu3.proto.field_description]: "The period during which this contact person or organization is valid to be contacted relating to this patient" + } + } +} +nested_type { + name: "Communication" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "The language which can be used to communicate with the patient about his or her health" + } + } + field { + name: "preferred" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "Language preference indicator" + } + } +} +nested_type { + name: "Link" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "other" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "The other patient or related person resource that the link refers to" + } + } + field { + name: "type" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LinkTypeCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "replaced-by | replaces | refer | seealso - type of link" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Patient Profile.\nUS Core Patient Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Patient" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-practitioner.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-practitioner.descriptor.prototxt new file mode 100644 index 000000000..97e0568d4 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-practitioner.descriptor.prototxt @@ -0,0 +1,263 @@ +name: "UsCorePractitioner" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "A identifier for the person as this agent" + } +} +field { + name: "active" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "Whether this practitioner\'s record is in active use" + } +} +field { + name: "name" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.HumanName" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "The name(s) associated with the practitioner" + } +} +field { + name: "telecom" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContactPoint" + options { + [google.fhir.stu3.proto.field_description]: "A contact detail for the practitioner (that apply to all roles)" + } +} +field { + name: "address" + number: 13 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Address" + options { + [google.fhir.stu3.proto.field_description]: "Address(es) of the practitioner that are not role specific (typically home address)" + } +} +field { + name: "gender" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.AdministrativeGenderCode" + options { + [google.fhir.stu3.proto.field_description]: "male | female | other | unknown" + } +} +field { + name: "birth_date" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Date" + options { + [google.fhir.stu3.proto.field_description]: "The date on which the practitioner was born" + } +} +field { + name: "photo" + number: 16 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Attachment" + options { + [google.fhir.stu3.proto.field_description]: "Image of the person" + } +} +field { + name: "qualification" + number: 17 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCorePractitioner.Qualification" + options { + [google.fhir.stu3.proto.field_description]: "Qualifications obtained by training and certification" + } +} +field { + name: "communication" + number: 18 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "A language the practitioner is able to use in patient communication" + } +} +nested_type { + name: "Qualification" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "identifier" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "An identifier for this qualification for the practitioner" + } + } + field { + name: "code" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Coded representation of the qualification" + } + } + field { + name: "period" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + options { + [google.fhir.stu3.proto.field_description]: "Period during which the qualification is valid" + } + } + field { + name: "issuer" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization that regulates and issues the qualification" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Practitioner Profile.\nUS Core Practitioner.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Practitioner" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-procedure.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-procedure.descriptor.prototxt new file mode 100644 index 000000000..97060d22b --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-procedure.descriptor.prototxt @@ -0,0 +1,492 @@ +name: "UsCoreProcedure" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "External Identifiers for this procedure" + } +} +field { + name: "definition" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Instantiates protocol or definition" + } +} +field { + name: "based_on" + number: 11 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "A request for this procedure" + } +} +field { + name: "part_of" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Part of referenced event" + } +} +field { + name: "status" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.EventStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "preparation | in-progress | suspended | aborted | completed | entered-in-error | unknown" + } +} +field { + name: "not_done" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Boolean" + options { + [google.fhir.stu3.proto.field_description]: "True if procedure was not performed as scheduled" + } +} +field { + name: "not_done_reason" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Reason procedure was not performed" + } +} +field { + name: "category" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Classification of the procedure" + } +} +field { + name: "code" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "SNOMED-CT | ICD-10 | CPT-4" + } +} +field { + name: "subject" + number: 18 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who the procedure was performed on" + } +} +field { + name: "context" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Encounter or episode associated with the procedure" + } +} +field { + name: "performed" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreProcedure.Performed" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Date/Period the procedure was performed" + } +} +field { + name: "performer" + number: 21 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreProcedure.Performer" + options { + [google.fhir.stu3.proto.field_description]: "The people who performed the procedure" + } +} +field { + name: "location" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Where the procedure happened" + } +} +field { + name: "reason_code" + number: 23 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Coded reason procedure performed" + } +} +field { + name: "reason_reference" + number: 24 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Condition that is the reason the procedure performed" + } +} +field { + name: "body_site" + number: 25 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Target body sites" + } +} +field { + name: "outcome" + number: 26 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "The result of procedure" + } +} +field { + name: "report" + number: 27 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Any report resulting from the procedure" + } +} +field { + name: "complication" + number: 28 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Complication following the procedure" + } +} +field { + name: "complication_detail" + number: 29 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "A condition that\302\240is a result of the procedure" + } +} +field { + name: "follow_up" + number: 30 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Instructions for follow up" + } +} +field { + name: "note" + number: 31 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Annotation" + options { + [google.fhir.stu3.proto.field_description]: "Additional information about the procedure" + } +} +field { + name: "focal_device" + number: 32 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreProcedure.FocalDevice" + options { + [google.fhir.stu3.proto.field_description]: "Device changed in procedure" + } +} +field { + name: "used_reference" + number: 33 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Items used during procedure" + } +} +field { + name: "used_code" + number: 34 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Coded items used during the procedure" + } +} +nested_type { + name: "Performed" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "performed" + } +} +nested_type { + name: "Performer" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "role" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "The role the actor was in" + } + } + field { + name: "actor" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "The reference to the practitioner" + } + } + field { + name: "on_behalf_of" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Organization the device or practitioner was acting for" + } + } +} +nested_type { + name: "FocalDevice" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "action" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Kind of change to device" + } + } + field { + name: "manipulated" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Device that was changed" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Procedure Profile.\nUS Core Procedure Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Procedure" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-profile-link.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-profile-link.descriptor.prototxt new file mode 100644 index 000000000..8dde8c360 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-profile-link.descriptor.prototxt @@ -0,0 +1,37 @@ +name: "CapabilityStatementProfileResourceAssociationExtension" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } +} +field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "value_code" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ResourceTypeCode" + options { + [google.fhir.stu3.proto.field_description]: "Value of extension" + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_COMPLEX_TYPE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for Profile-resource association extension.\nResource that this profile is based on.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-profile-link" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Extension" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-profile-link" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-race.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-race.descriptor.prototxt new file mode 100644 index 000000000..88bacbef8 --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-race.descriptor.prototxt @@ -0,0 +1,58 @@ +name: "PatientUSCoreRaceExtension" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } +} +field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extension" + } +} +field { + name: "omb_category" + number: 4 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Coding" + options { + [google.fhir.stu3.proto.field_description]: "American Indian or Alaska Native|Asian|Black or African American|Native Hawaiian or Other Pacific Islander|White" + } +} +field { + name: "detailed" + number: 5 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Coding" + options { + [google.fhir.stu3.proto.field_description]: "Extended race codes" + } +} +field { + name: "text" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Race Text" + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_COMPLEX_TYPE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Race Extension.\nUS Core Race Extension.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Extension" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" +} diff --git a/testdata/stu3/uscore/StructureDefinition-us-core-smokingstatus.descriptor.prototxt b/testdata/stu3/uscore/StructureDefinition-us-core-smokingstatus.descriptor.prototxt new file mode 100644 index 000000000..ee36ba6bb --- /dev/null +++ b/testdata/stu3/uscore/StructureDefinition-us-core-smokingstatus.descriptor.prototxt @@ -0,0 +1,659 @@ +name: "UsCoreSmokingstatus" +field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Id" + options { + [google.fhir.stu3.proto.field_description]: "Logical id of this artifact" + } +} +field { + name: "meta" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Meta" + options { + [google.fhir.stu3.proto.field_description]: "Metadata about the resource" + } +} +field { + name: "implicit_rules" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Uri" + options { + [google.fhir.stu3.proto.field_description]: "A set of rules under which this content was created" + } +} +field { + name: "language" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.LanguageCode" + options { + [google.fhir.stu3.proto.field_description]: "Language of the resource content" + } +} +field { + name: "text" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Narrative" + options { + [google.fhir.stu3.proto.field_description]: "Text summary of the resource, for human interpretation" + } +} +field { + name: "contained" + number: 6 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ContainedResource" + options { + [google.fhir.stu3.proto.field_description]: "Contained, inline Resources" + } +} +field { + name: "extension" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } +} +field { + name: "modifier_extension" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } +} +field { + name: "identifier" + number: 9 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Identifier" + options { + [google.fhir.stu3.proto.field_description]: "Business Identifier for observation" + } +} +field { + name: "based_on" + number: 10 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Fulfills plan, proposal or order" + } +} +field { + name: "status" + number: 11 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ObservationStatusCode" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "registered | preliminary | final | amended +" + } +} +field { + name: "category" + number: 12 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Classification of type of observation" + } +} +field { + name: "code" + number: 13 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Smoking Status: LOINC 72166-2 = Tobacco smoking status NHIS" + } +} +field { + name: "subject" + number: 14 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Who and/or what this is about" + } +} +field { + name: "context" + number: 15 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Healthcare event during which this observation is made" + } +} +field { + name: "effective" + number: 16 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreSmokingstatus.Effective" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Clinically relevant time/time-period for observation" + } +} +field { + name: "issued" + number: 17 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Instant" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Date/Time this was made available" + } +} +field { + name: "performer" + number: 18 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Who is responsible for the observation" + } +} +field { + name: "value" + number: 19 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreSmokingstatus.Value" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Coded Responses from Smoking Status Value Set" + } +} +field { + name: "data_absent_reason" + number: 20 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why the result is missing" + } +} +field { + name: "interpretation" + number: 21 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "High, low, normal, etc." + } +} +field { + name: "comment" + number: 22 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Comments about result" + } +} +field { + name: "body_site" + number: 23 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Observed body part" + } +} +field { + name: "method" + number: 24 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "How it was done" + } +} +field { + name: "specimen" + number: 25 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "Specimen used for this observation" + } +} +field { + name: "device" + number: 26 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.field_description]: "(Measurement) Device" + } +} +field { + name: "reference_range" + number: 27 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreSmokingstatus.ReferenceRange" + options { + [google.fhir.stu3.proto.field_description]: "Provides guide for interpretation" + } +} +field { + name: "related" + number: 28 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreSmokingstatus.Related" + options { + [google.fhir.stu3.proto.field_description]: "Resource related to this observation" + } +} +field { + name: "component" + number: 29 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreSmokingstatus.Component" + options { + [google.fhir.stu3.proto.field_description]: "Component results" + } +} +nested_type { + name: "Effective" + field { + name: "date_time" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "effective" + } +} +nested_type { + name: "Value" + field { + name: "codeable_concept" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + oneof_decl { + name: "value" + } +} +nested_type { + name: "ReferenceRange" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "low" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "Low Range, if relevant" + } + } + field { + name: "high" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SimpleQuantity" + options { + [google.fhir.stu3.proto.field_description]: "High Range, if relevant" + } + } + field { + name: "type" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Reference range qualifier" + } + } + field { + name: "applies_to" + number: 7 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Reference range population" + } + } + field { + name: "age" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + options { + [google.fhir.stu3.proto.field_description]: "Applicable age range, if relevant" + } + } + field { + name: "text" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "Text based reference range in an observation" + } + } +} +nested_type { + name: "Related" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "type" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.ObservationRelationshipTypeCode" + options { + [google.fhir.stu3.proto.field_description]: "has-member | derived-from | sequel-to | replaces | qualified-by | interfered-by" + } + } + field { + name: "target" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Reference" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Resource that is related to this one" + } + } +} +nested_type { + name: "Component" + field { + name: "id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + options { + [google.fhir.stu3.proto.field_description]: "xml:id (or equivalent in JSON)" + } + } + field { + name: "extension" + number: 2 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Additional Content defined by implementations" + } + } + field { + name: "modifier_extension" + number: 3 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Extension" + options { + [google.fhir.stu3.proto.field_description]: "Extensions that cannot be ignored" + } + } + field { + name: "code" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.validation_requirement]: REQUIRED_BY_FHIR + [google.fhir.stu3.proto.field_description]: "Type of component observation (code / type)" + } + } + field { + name: "value" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreSmokingstatus.Component.Value" + options { + [google.fhir.stu3.proto.is_choice_type]: true + [google.fhir.stu3.proto.field_description]: "Actual component result" + } + } + field { + name: "data_absent_reason" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "Why the component result is missing" + } + } + field { + name: "interpretation" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + options { + [google.fhir.stu3.proto.field_description]: "High, low, normal, etc." + } + } + field { + name: "reference_range" + number: 8 + label: LABEL_REPEATED + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.uscore.UsCoreSmokingstatus.ReferenceRange" + options { + [google.fhir.stu3.proto.field_description]: "Provides guide for interpretation of component result" + } + } + nested_type { + name: "Value" + field { + name: "quantity" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Quantity" + oneof_index: 0 + } + field { + name: "codeable_concept" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.CodeableConcept" + oneof_index: 0 + } + field { + name: "string_value" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.String" + oneof_index: 0 + json_name: "string" + } + field { + name: "range" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Range" + oneof_index: 0 + } + field { + name: "ratio" + number: 5 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Ratio" + oneof_index: 0 + } + field { + name: "sampled_data" + number: 6 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.SampledData" + oneof_index: 0 + } + field { + name: "attachment" + number: 7 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Attachment" + oneof_index: 0 + } + field { + name: "time" + number: 8 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Time" + oneof_index: 0 + } + field { + name: "date_time" + number: 9 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.DateTime" + oneof_index: 0 + } + field { + name: "period" + number: 10 + label: LABEL_OPTIONAL + type: TYPE_MESSAGE + type_name: ".google.fhir.stu3.proto.Period" + oneof_index: 0 + } + oneof_decl { + name: "value" + } + } +} +options { + [google.fhir.stu3.proto.structure_definition_kind]: KIND_RESOURCE + [google.fhir.stu3.proto.message_description]: "Auto-generated from StructureDefinition for US Core Smoking Status Profile.\nUS Core Smoking Status Observation Profile.\nSee http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus" + [google.fhir.stu3.proto.fhir_profile_base]: "http://hl7.org/fhir/StructureDefinition/Observation" + [google.fhir.stu3.proto.fhir_structure_definition_url]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus" +}