我正在尝试使用structureMap资源将xml cda文档映射到Fhir资源。这是我编程的structureMap资源:
StructureMap structureMap = new StructureMap();
StructureMapGroupComponent group = new StructureMapGroupComponent();
StructureMapGroupInputComponent input = new StructureMapGroupInputComponent() ;
List<StructureMapStructureComponent> structureList =new ArrayList<StructureMapStructureComponent>();
StructureMapStructureComponent structure = new StructureMapStructureComponent();
StructureMapStructureComponent structure2 = new StructureMapStructureComponent();
structure.setUrl("C:\\Users\\a_nas\\Desktop\\Master-Arbeit\\Beispieldokumente_2.06.1\\patient.xml");
structure.setMode(StructureMapModelMode.SOURCE);
structure2.setUrl("http://hl7.org/fhir/StructureDefinition/patient");
structure2.setMode(StructureMapModelMode.TARGET);
structureList.add(structure);
structureList.add(structure2);
structureMap.setStructure(structureList);
input.setName("patient");
input.setMode(StructureMapInputMode.SOURCE);
input.setDocumentation("PatientElgaToFhir");
group.addInput(input);
StructureMapGroupRuleComponent rule = new StructureMapGroupRuleComponent() ;
rule.setName("rule1");
StructureMapGroupRuleSourceComponent ruleSource = new StructureMapGroupRuleSourceComponent() ;
List<StructureMapGroupRuleSourceComponent> rulList = new ArrayList<StructureMapGroupRuleSourceComponent>();
ruleSource.setContext("source");
ruleSource.setElement("birthTime");
StructureMapGroupRuleTargetComponent ruleTarget = new StructureMapGroupRuleTargetComponent();
ruleTarget.setContext("target");
ruleTarget.setElement("BirthDate");
ruleTarget.setTransform(StructureMapTransform.COPY);
rule.addSource(ruleSource);
rule.addTarget(ruleTarget);
group.addRule(rule);
structureMap.addGroup(group);
但我找不到任何方法将我定义的structureMap资源链接到相应的FHIR资源。实际上我不知道如何使用这个structureMap并获得fhir资源。 你能帮我吗?