mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-09 06:14:45 +00:00
fix broken link in R4 DeviceUseStatement
This commit is contained in:
parent
aff52322ad
commit
ef92e98810
@ -2,6 +2,8 @@ package org.hl7.fhir.r5.utils;
|
||||
|
||||
import org.hl7.fhir.r5.context.CanonicalResourceManager.CanonicalResourceProxy;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext.PackageVersion;
|
||||
import org.hl7.fhir.r5.model.ElementDefinition;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
|
||||
public class PackageHackerR5 {
|
||||
|
||||
@ -32,9 +34,23 @@ public class PackageHackerR5 {
|
||||
r.hack("http://terminology.hl7.org/CodeSystem/v2-0360-2.3.1", "2.3.1");
|
||||
}
|
||||
|
||||
if ("http://hl7.org/fhir/StructureDefinition/DeviceUseStatement".equals(r.getUrl()) && "4.0.1".equals(r.getVersion())) {
|
||||
StructureDefinition sd = (StructureDefinition) r.getResource();
|
||||
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
|
||||
if (ed.hasRequirements()) {
|
||||
ed.setRequirements(ed.getRequirements().replace("[http://hl7.org/fhir/StructureDefinition/bodySite](null.html)", "[http://hl7.org/fhir/StructureDefinition/bodySite](http://hl7.org/fhir/extension-bodysite.html)"));
|
||||
}
|
||||
}
|
||||
for (ElementDefinition ed : sd.getDifferential().getElement()) {
|
||||
if (ed.hasRequirements()) {
|
||||
ed.setRequirements(ed.getRequirements().replace("[http://hl7.org/fhir/StructureDefinition/bodySite](null.html)", "[http://hl7.org/fhir/StructureDefinition/bodySite](http://hl7.org/fhir/extension-bodysite.html)"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (r.hasUrl() && r.getUrl().contains("|")) {
|
||||
assert false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user