Skip to content

Commit

Permalink
Update ValidationOutcome.subject to be optional.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
suyashkumar authored and Cameron Tew committed Sep 8, 2021
1 parent 9c5ff4c commit d77f577
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions proto/google/fhir/proto/r4/fhirproto.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
}
1 change: 0 additions & 1 deletion spec/google/fhirproto.prototxt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
5 changes: 2 additions & 3 deletions spec/google/r4/google.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "ValidationOutcome",
"title": "ValidationOutcome",
"status": "draft",
"date": "2021-08-27",
"date": "2021-08-31",
"publisher": "Google LLC",
"contact": [
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": [
{
Expand Down

0 comments on commit d77f577

Please sign in to comment.