@pacharanero: Thanks, happy and inspired to have the opportunity to try to contribute to an open-source project with such evident clinical utility – and to meet a fellow physician coder who has shipped code that’s out in the world for people like me to use, learn from, and contribute to.
It’s clear to me that this project’s mission places children’s well-being front and center. Would be happy to share more about my interest in the project down the road. Suffice to say, the accuracy of proprietary growth chart implementations varies, which is a completely predictable consequence of the extraordinary difficulty of getting the core logic right.
I share your vision of getting the fundamentals right, and allowing others to leverage this project’s accurate and reliable calculations in their own growth chart product, and stop trying to re-invent the wheel.
Thank you also @mayfield.g.kev and @riksmithies for your commentary and insights. As a someone who is new to FHIR and APIs, I welcome insights and the opportunity to collaborate with people with technical expertise.
FHIR Also Supports Extended Operations
I think it would be helpful to clarify how I think FHIR would integrate with the RCPCH API, which differs from the typical FHIR use case. Most discussions around FHIR focus on facilitating the exchange of patient-specific information via Create, Read, Update, Delete (CRUD) operations.
However, as you know, the RCPCH API doesn’t exchange patient information. Rather, it puts a child’s growth measures in context by comparing them with those of their peers. By design, it does not receive or store identifiable patient data.
This makes the Extended Operations resource, (“operations”), rather than CRUD interactions on patient and observation resources, a better foundation for a FHIR endpoint.
The purpose of the RCPCH API’s “calculation” endpoints is aptly described by FHIR’s Extended Operation: a remote procedure-style call (RPC) in which the server formulates the response’s content.
The Evaluate Measure
Specifically, I think the Evaluate Measure operation, which takes parameters and returns a MeasureReport, is well-suited to our use case, which does not entail the exchange of information per se, but rather putting it in context.
The Observation resource is another good option, which would have the benefit of being a simpler and more mature FHIR resource than MeasureReport. One potential downside I see of using Observation is that it may require more work to define other custom FHIR resources, like the FHIR operation that would define the transformation from the input parameters to the output Observation. There is also the risk that the more custom FHIR resources we define, the more friction for interoperability we create.
API Endpoint Style
@pacharenero, I agree it would be best to introduce the FHIR endpoint as an option alongside the existing ‘simple’ response. The FHIR style guide calls for following a [base URI]/[resource type]/[type interactions] template, which differs from the {reference growth chart}/calculation} the ‘simple’ API uses.
I think this new endpoint could look something like:
http://api.rcpch.ac.uk/growth/v1/fhir/R4B/Measure/{standardized_measure}/$evaluate-measure
where {standardized_measure} is the centile/standard deviation score for weight, height, occipitofrontal circumference, and BMI, respectively.
Although I included R4B following the lead of FHIR test servers like hapi.fhir.org and server.fire.ly which support running different versions on different endpoints, this forward-compatibility may be excessive for an alpha version of the API.
@pacharenero, as you have mentioned, the {standardized measures} could be encoded as a codeable concept which references multiple codings like SNOMED CT, Read Version 2, and perhaps LOINC (although I’m not sure this system has all the measures we need).
I generally favor following expected FHIR convention as much as possible, although I also want to be sensitive to the multiple other considerations about how this extension would fit into the larger project which likely exist, and of which I am unaware.
What do you think? I think the main points of discussion at this point include:
- The format of the URI which hosts the FHIR API endpoint
- The FHIR resources which should form the basis of the API
- In particular, should the API return a MeasureReport or an Observation?