Skip to content

Commit

Permalink
Adds some more test coverage on ignored constraint: `telcom or endpoi…
Browse files Browse the repository at this point in the history
…nt` (pd-1) to the resource_validator.

PiperOrigin-RevId: 561157232
  • Loading branch information
Luid101 authored and copybara-github committed Aug 29, 2023
1 parent 179c690 commit ce405fd
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions cc/google/fhir/r4/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ cc_test(
"//proto/google/fhir/proto/r4/core/resources:coverage_eligibility_request_cc_proto",
"//proto/google/fhir/proto/r4/core/resources:encounter_cc_proto",
"//proto/google/fhir/proto/r4/core/resources:observation_cc_proto",
"//proto/google/fhir/proto/r4/core/resources:practitioner_role_cc_proto",
"//testdata/r4/profiles:test_cc_proto",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
Expand Down
6 changes: 6 additions & 0 deletions cc/google/fhir/r4/resource_validation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "proto/google/fhir/proto/r4/core/resources/coverage_eligibility_request.pb.h"
#include "proto/google/fhir/proto/r4/core/resources/encounter.pb.h"
#include "proto/google/fhir/proto/r4/core/resources/observation.pb.h"
#include "proto/google/fhir/proto/r4/core/resources/practitioner_role.pb.h"
#include "proto/google/fhir/proto/r4/fhirproto.pb.h"
#include "testdata/r4/profiles/test.pb.h"

Expand Down Expand Up @@ -179,6 +180,11 @@ TEST(BundleValidationTest, ValidEmptyBundle) {
InvalidTest<Bundle>("empty_bundle");
}

TEST(PractitionerRole, PractitionerRoleWithNonBoolExpression) {
ValidTest<PractitionerRole>(
"practitioner_role_with_ignored_invalid_constraint");
}

} // namespace

} // namespace r4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
id {
value: "12345"
}
meta {
extension {
url {
value: "https://g.co/fhir/medicalrecords/sourceIdentifier"
}
value {
identifier {
system {
value: "test"
}
value {
value: "12345"
}
}
}
}
}
active {
value: 0
}
period {
start {
value_us: 1663853259000000
timezone: "+00:00"
precision: SECOND
}
end {
value_us: 4133894400000000
timezone: "+00:00"
precision: SECOND
}
}
practitioner {
practitioner_id {
value: "12345"
}
}
organization {
display {
value: "test"
}
}
code {
coding {
system {
value: "https://test.com"
}
code {
value: "123"
}
display {
value: "1234"
}
}
text {
value: "1234"
}
}

0 comments on commit ce405fd

Please sign in to comment.