Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Set required recorded field on Provenance resource
The FHIR R4 Provenance resource requires the recorded field (1..1
cardinality). This was missing, making the generated Provenance
resources technically invalid.
  • Loading branch information
trobanga committed Nov 25, 2025
commit ccc13361904cf7c21d538db30199cc2c2a3e0661
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ public Bundle toFhirBundle(String extractionId) {
private static Provenance createProvenance(String extractionId, String groupId, List<ResourceGroup> groupResources) {
Provenance provenance = new Provenance();
provenance.setId(PROVENANCE_PREFIX + groupId);
provenance.setRecorded(new Date());

// Add all resources under the same group as targets
groupResources.forEach(rg ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void nestedRefResolve() throws IOException {
.allSatisfy(

r -> assertThat(r).extractTopElementNames()
.containsExactlyInAnyOrder("resourceType", "id", "target", "occurredPeriod", "agent", "entity")));
.containsExactlyInAnyOrder("resourceType", "id", "target", "recorded", "occurredPeriod", "agent", "entity")));

// all Encounter in all patient bundles must have the given top fields and have at least one reference in diagnosis.condition
assertThat(patientBundles).allSatisfy(b -> assertThat(b).extractResourcesByType(ResourceType.Encounter)
Expand Down