+
Skip to content

Fix the error : Transform evaluate takes 1 parameter but 2 were found #330

Open
@Wambere

Description

@Wambere

When validating a .json structureMap that has been generated from a .map structureMap (which has been validated and is valid), we're getting the following errors

EFSITY: :: INFO  :: Starting FHIR resource validation
EFSITY: :: INFO  :: Input file path project_name/structure_maps/json/anc/anc_extraction.json
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
EFSITY: :: INFO  :: project_name/structure_maps/json/anc/anc_extraction.json
EFSITY: :: ERROR ::  StructureMap.group[1].rule[0].rule[0].rule[1].target[0] - Transform c not checked yet
EFSITY: :: ERROR ::  StructureMap.group[1].rule[0].rule[0].rule[3].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[1].rule[0].rule[0].rule[3].rule[1].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[1].rule[0].rule[0].rule[4].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[2].rule[0].rule[0].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[2].rule[5].rule[0].rule[1].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[2].rule[5].rule[0].rule[2].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[2].rule[9].rule[1].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[2].rule[9].rule[2].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[4].rule[0].rule[4].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[4].rule[0].rule[6].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[4].rule[0].rule[7].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[5].rule[0].rule[4].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[5].rule[0].rule[6].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[5].rule[0].rule[7].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[6].rule[0].rule[5].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[6].rule[0].rule[6].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[6].rule[0].rule[7].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[7].rule[0].rule[5].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[7].rule[0].rule[6].rule[0].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: :: ERROR ::  StructureMap.group[7].rule[0].rule[7].target[0] - Transform evaluate takes 1 parameter(s) but 2 were found
EFSITY: Completed in 0 mins 05 secs  

This is coming from parts in the .json structureMap like

  "target": [
    {
      "context": "enPeriod",
      "contextType": "variable",
      "element": "start",
      "transform": "evaluate",
      "parameter": [
        {
          "valueId": "src"
        },
        {
          "valueString": "now()"
        }
      ]
    }
  ]

Which is generated from the following in a .map

src -> enPeriod.start = evaluate(src, now()) "r_en_per_start";

The evaluate in the .map needs two params, the source and the FHIRPath expression in order to evaluate correctly
So how can this be written to ensure the .json structureMap is also valid with 1 param?

For more context:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载