Aidbox / Issues

Issue tracker for Aidbox FHIR backend by Health Samurai
7 stars 0 forks source link

Having problem while creating Search Parameter #530

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, I trying to create new SearchParameter but I having an issue.

I couldn't understand why it Could not resolve element for expression ["patient"] ?

My request


PUT /SearchParameter/TrainingSchedules.patient
content-type: text/yaml
accept: text/yaml

name: patient type: token resource: {id: TrainingSchedules, resourceType: Entity} expression: [[patient]] ```

The response

resourceType: OperationOutcome
text:
status: generated
div: Invalid resource
issue:
- severity: fatal
code: invalid
expression:
- SearchParameter.
diagnostics: Could not resolve element for expression ["patient"]

And my TrainingSchedules structure is

TrainingSchedules.days string [ ] A list of available days
TrainingSchedules.id string
TrainingSchedules.patient* Reference Owner of the schedule

The structure of patient attribute

description: Owner of the schedule
path:
  - patient
refers:
  - Patient
type:
  id: Reference
  resourceType: Entity
resourceType: Attribute
module: fhir-4.0.1
id: TrainingSchedules.patient
resource:
  id: TrainingSchedules
  resourceType: Entity
order: 12
isRequired: true
_source: code
isSummary: true
spicyfalafel commented 2 years ago

Hello, @nyeroglu-actimi. _source: code is intended for Attributes generated by Aidbox. Please remove this field.

ghost commented 2 years ago

Thanks @spicyfalafel. The main problem with search parameter is lowercase - uppercase. Expression in my search parameter was like expression: