1

我正在尝试使用 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);

但我找不到任何方法将我定义的结构映射资源链接到相应的 FHIR 资源。实际上我不知道如何使用这个结构映射并获得一个 fhir 资源。请你帮助我好吗?

4

0 回答 0