0
votes

I want to implement some business logic rules on FHIR resources and I want to work with RESTFUL API methods.

An example: I've a ServiceRequest resource with a status, I want to prevent change of status depends of the actual value

Suppose if ServiceRequest has status completed I don't want to change with status draft

To manage this scenario, I must implement my custom method or exists a standard bahaviour on FHIR to accomplish this?

2

2 Answers

1
votes

Yep, you'd implement this with a custom method.

1
votes

Maybe this answer and the Vadim answer is "apples and apples", but I think the term is Operations.

base resource:

https://www.hl7.org/fhir/servicerequest.html

then an operation off of that resource.

See

https://hapifhir.io/hapi-fhir/docs/server_plain/rest_operations_operations.html

http://hl7.org/fhir/operations.html

Here is a well known operation:

https://www.hl7.org/fhir/operation-patient-match.html