0

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?

Joe Taras
  • 15,166
  • 7
  • 42
  • 55

2 Answers2

1

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

Vadim Peretokin
  • 2,221
  • 3
  • 29
  • 40
  • So, in my case, is it correct use of DMI, pattern FHIR + SOA? – Joe Taras May 20 '20 at 14:30
  • Sorry, what do you mean by DMI? – Vadim Peretokin May 20 '20 at 14:34
  • Sorrty, DMI was a fault copy paste. The right sentence is: So, in my case, is it correct use of pattern FHIR + SOA? – Joe Taras May 20 '20 at 14:38
  • I think you'd need to describe your use case more :) but your question is correct, implementing a custom method to prevent the change of an element is OK. Make sure to document it in your Implementation Guide that changing that element isn't allowed. – Vadim Peretokin May 21 '20 at 15:11
  • Hi dear, I try to explain better my scenarios in this question: https://stackoverflow.com/questions/61951059/fhir-interoperability-platform-choose – Joe Taras May 22 '20 at 08:48
1

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

granadaCoder
  • 26,328
  • 10
  • 113
  • 146