From d77f57706c1a168529b0b87ca7ccb1c0113e83c2 Mon Sep 17 00:00:00 2001 From: Suyash Kumar Date: Wed, 1 Sep 2021 17:08:43 +0000 Subject: [PATCH] Update ValidationOutcome.subject to be optional. This is because we may need to validate FHIR resources that do not have an ID set. In this case, we can't set ValidationOutcome.subject to something meaningful, but still would like to produce a ValidationOutcome (e.g. from APIs like Validate() [1]). In batch settings, producing ValidationOutcomes that can't point to a resource may be meaningless--but for other uses of the Validate API this isn't the case so having this as optional will still be useful. PiperOrigin-RevId: 394257563 --- proto/google/fhir/proto/r4/fhirproto.proto | 8 +++----- spec/google/fhirproto.prototxt | 1 - spec/google/r4/google.json | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/proto/google/fhir/proto/r4/fhirproto.proto b/proto/google/fhir/proto/r4/fhirproto.proto index 5db199040..d31356199 100644 --- a/proto/google/fhir/proto/r4/fhirproto.proto +++ b/proto/google/fhir/proto/r4/fhirproto.proto @@ -127,9 +127,7 @@ message ValidationOutcome { [(.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR]; // The FHIR resource this Validation is for. - core.Reference subject = 11 [ - (.google.fhir.proto.validation_requirement) = REQUIRED_BY_FHIR, - (.google.fhir.proto.fhir_inlined_extension_url) = - "https://g.co/fhir/medicalrecords/OperationOutcomeSubject" - ]; + core.Reference subject = 11 + [(.google.fhir.proto.fhir_inlined_extension_url) = + "https://g.co/fhir/medicalrecords/OperationOutcomeSubject"]; } diff --git a/spec/google/fhirproto.prototxt b/spec/google/fhirproto.prototxt index 6fb4b82ad..1013fd07e 100644 --- a/spec/google/fhirproto.prototxt +++ b/spec/google/fhirproto.prototxt @@ -9,7 +9,6 @@ profile { element_data { name: "subject" description: "The FHIR resource this Validation is for." - size_restriction: REQUIRED } url: "https://g.co/fhir/medicalrecords/OperationOutcomeSubject" } diff --git a/spec/google/r4/google.json b/spec/google/r4/google.json index 9da397ff7..1c9e13d6a 100755 --- a/spec/google/r4/google.json +++ b/spec/google/r4/google.json @@ -10,7 +10,7 @@ "name": "ValidationOutcome", "title": "ValidationOutcome", "status": "draft", - "date": "2021-08-27", + "date": "2021-08-31", "publisher": "Google LLC", "contact": [ { @@ -909,7 +909,7 @@ "sliceName": "subject", "short": "The FHIR resource this Validation is for.", "definition": "The FHIR resource this Validation is for.", - "min": 1, + "min": 0, "max": "1", "base": { "path": "Extension", @@ -967,7 +967,6 @@ "sliceName": "subject", "short": "The FHIR resource this Validation is for.", "definition": "The FHIR resource this Validation is for.", - "min": 1, "max": "1", "type": [ {