Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$apply operation error when specifying practitioner #2240

Closed
tbieste opened this issue Apr 13, 2021 · 2 comments
Closed

$apply operation error when specifying practitioner #2240

tbieste opened this issue Apr 13, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tbieste
Copy link
Contributor

tbieste commented Apr 13, 2021

Describe the bug
$apply operation error when specifying practitioner with reference like "Practitioner/2".

Environment
IBM FHIR Server 4.6.1

To Reproduce
Steps to reproduce the behavior:
PlanDefinition/1234/$apply?subject=Patient/1&practitioner=Practitioner/2
Received 500 HTTP error

Expected behavior
Expected 200 HTTP status

Additional context
FHIRResource E An error occurred during the '$apply' operation
com.ibm.fhir.exception.FHIROperationException: An error occurred during the '$apply' operation
at com.ibm.fhir.operation.apply.ApplyOperation.doInvoke(ApplyOperation.java:132)
at com.ibm.fhir.server.operation.spi.AbstractOperation.invoke(AbstractOperation.java:56)
at com.ibm.fhir.server.util.FHIRRestHelper.doInvoke(FHIRRestHelper.java:1132)
...
Caused by: java.lang.IllegalStateException: Resource type found in reference value: 'Practitioner/2' for element: 'careTeam' must be one of: [CareTeam]
at com.ibm.fhir.model.util.ValidationSupport.checkReferenceType(ValidationSupport.java:709)
at com.ibm.fhir.model.util.ValidationSupport.checkReferenceType(ValidationSupport.java:661)
at com.ibm.fhir.model.resource.CarePlan.(CarePlan.java:176)
...

@tbieste tbieste added the bug Something isn't working label Apr 13, 2021
@prb112 prb112 self-assigned this Apr 13, 2021
@prb112
Copy link
Contributor

prb112 commented Apr 13, 2021

I can look at this one... John and I wrote this as a PoC for a Connectathon

prb112 added a commit that referenced this issue Apr 14, 2021
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
@prb112 prb112 added this to the Sprint 2021-05 milestone Apr 14, 2021
prb112 added a commit that referenced this issue Apr 14, 2021
* operation error when specifying practitioner #2240

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>

* Update the test to include a practitioner

Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
@kmbarton423
Copy link
Contributor

Confirmed draft CarePlan provided as expected:

GET https://localhost:9443/fhir-server/api/v4/PlanDefinition/1234/$apply?subject=Patient/1&practitioner=Practitioner/2

{
"resourceType": "CarePlan",
"status": "draft",
"intent": "plan",
"subject": {
"reference": "Patient/1"
},
"contributor": [
{
"reference": "Practitioner/2"
}
],
"activity": [
{
"detail": {
"status": "not-started",
"description": "Measure, Weight, Height, Waist, Circumference; Calculate BMI"
}
}
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants