I've been playing around a bit with the Clinical Query Language lately. One of the interesting challenges I had to solve was to deal with some logic defined with one particular data representation in mind with a different representation.
To simplify the problem, I'll look at something that's pretty typical.
Consider the patient history form, a section commonly appearing on the "Clipboard" given to new patients:
Has anyone in your family ever had:
Cancer [ ?]
Hypertension [ ]
Stroke [X]
You'll note here that the patient might not use the form the way it was intended due to uncertaintly about one of the answers. So perhaps it might later be changed to:
Has anyone in your family ever had:
Cancer Yes No Unknown
Hypertension Yes No Unknown
Stroke Yes No Unknown
When encoding this information, there are number of ways to store it in the EHR system. If using precoordinated terms, you can simply list SNOMED CT expressions for all the positive items. This is one way to encode the information. However, pre-coordination of all possible cases doesn't exist in any singular vocabulary. You cannot say in a single SNOMED CT term that you don't know if the patient has a family history of cancer, but it can be stated in a post-coordinated SNOMED CT expression. So this kind of result is often captured in question/answer form.
There are at least three additional ways to codify this information in question/answer form:
code "FH of Cancer": 'Z80.9' from "ICD10"
To simplify the problem, I'll look at something that's pretty typical.
Consider the patient history form, a section commonly appearing on the "Clipboard" given to new patients:
Has anyone in your family ever had:
Cancer [ ?]
Hypertension [ ]
Stroke [X]
You'll note here that the patient might not use the form the way it was intended due to uncertaintly about one of the answers. So perhaps it might later be changed to:
Has anyone in your family ever had:
Cancer Yes No Unknown
Hypertension Yes No Unknown
Stroke Yes No Unknown
When encoding this information, there are number of ways to store it in the EHR system. If using precoordinated terms, you can simply list SNOMED CT expressions for all the positive items. This is one way to encode the information. However, pre-coordination of all possible cases doesn't exist in any singular vocabulary. You cannot say in a single SNOMED CT term that you don't know if the patient has a family history of cancer, but it can be stated in a post-coordinated SNOMED CT expression. So this kind of result is often captured in question/answer form.
- You can codify the overall question, and give a list of codified answers.
Q1: Family History? A: Hypertension
This tells you nothing about cancer or stroke. - You can codify each individual question, and list the answers as a yes/no for each checked / unchecked box respectively.
Q1: Family History of Cancer? A: No
Q2: Family History of Hypertension? A: No
Q3: Family History of Stroke? A: Yes
This doesn't capture the uncertainty about cancer. - You can codify each individual question, and list the answers as a yes/no or unknown.
Q1: Family History of Cancer? A: Unknown
Q2: Family History of Hypertension? A: No
Q3: Family History of Stroke? A: Yes
This captures the fine detail across the board.
For an application to be able to reason with the data, you have to consider the various ways in which the question could be asked, and how to detect the appropriate response.
The challenge with clinical decision support and quality measurement is then to determine how to map the questions you have answers to into the questions the decision support is asking. Sometimes, there isn't a clean match (as for cases 1 and possibly 2 above, as well as coding using precoordinated terms).
In CQL, you can easily map codes used to answer questions into a particular form, making it rather easy to change the code systems.
Code systems and codes are specified symbolically, as in:
codesystem "SNOMEDCT": 'http://snomed.info/sct'
code "FH of Cancer": '275937001' from "SNOMEDCT"
To change from from SNOMEDCT to ICD-10, you might use:
codesystem "ICD10": 'http://hl7.org/fhir/sid/icd-10-cm'code "FH of Cancer": 'Z80.9' from "ICD10"
You could also create a single value set containing both codes. Presently, CQL does not have a way to define a value set, only to reference them (they are defined elsewhere).
valueset "FH of Cancer": 'some OID or URL reference'
You logic would then only need to address one thing: "FH of Cancer", either as a singular code, or a value set.
You might cheat here and use a Concept as a way to create a faux valueset across different terminologies, but this is actually discouraged in CQL. It might be better to create a CQL list of codes and use the contains() expression to determine if the code you have found is in the list of codes.
This doesn't get at negation/unknown logic that might also be needed in formulations 2 and 3 above. To do that, you can define a function that checks for varying formats, and might also use various value sets for "Yes"/"No"/"Unknown" as possible variations.
When you get right down to it though, the decision that determines how reasoning needs to be done is often taken long before the reasoning is ever implemented. And you cannot expect that to change quickly, because simply changing the form from the first example to the second can take quite a bit of time in a provider organization.
CQL goes a long way towards making clinical decision and quality measure logic reusable and mappable to provider workflows, but it is still missing a few pieces to make it truly easy to separate logic from data.
0 comments:
Post a Comment