POST /Mapping/test-now-extract/$debug
Content-Type: text/yaml
patientId: ede14f63-fffa-4ed0-aed8-b5b4f34f0055
Result:
type: transaction
entry:
request:
url: /Observation
method: POST
resource:
code:
coding:
code: 29463-7
system: http://loinc.org
display: Body weight
value:
Quantity:
unit: kg
value: 80
status: final
effective:
dateTime: 2023-03-20T14:35:59.726Z
resourceType: Observation
resourceType: Bundle
But $applyreturns the error
POST /Mapping/test-now-extract/$apply
Content-Type: text/yaml
patientId: ede14f63-fffa-4ed0-aed8-b5b4f34f0055
The answer
resourceType: OperationOutcome
...
text:
status: generated
div: >-
Transaction failed at entry[0]. Response status is 422. Response body is
{"resourceType":"OperationOutcome","text":{"status":"generated","div":"Invalid
resource"},"issue":[{"severity":"fatal","code":"invalid","expression":["Observation.effective.dateTime"],"diagnostics":"expected
type of string"}]}.
issue:
- severity: fatal
code: invalid
diagnostics: expected type of string
expression:
- Observation.effective.dateTime
Expected behavior
$apply should return FHIR dateTime with no error
Describe the bug We faced en error in extracting the questionnaire due to the use of
$ now()
in MappingSeverity Critical
Steps to reproduce the behavior:
$ now()
Note: the use of variables is required to reproduce the error$debug
returns correct resultpatientId: ede14f63-fffa-4ed0-aed8-b5b4f34f0055
type: transaction entry:
$apply
returns the errorThe answer
Expected behavior $apply should return FHIR dateTime with no error
Versions: