Act.text and code.originalText
Text is being put into both originalText and act.text and we need guidelines. Last weeks Vocab call discussed this, resulting from the MnM/Vocab thread "question about Act.code.originalText vs Act.text" and InM/Vocab thread "Meaning of CD.displayName". I was asked to provide use cases and candidate representations, to prime the discussion.
Text Use Cases
In summary the use cases are:
Sometimes there is a code
Sometimes there is text that is orthogonal to that code.
Sometimes a short code is entered into UI that results in a code being found and selected.
Sometimes a code is derived from narrative text entered, and you want to record that text (or fragment of it) specifically to show the code decision process.
Sometimes a code would be displayed one way to an expert user (eg CXR for "Chest X-Ray"), but this would need spelling out in full to a less specialist user.
Fuller use cases are below, some more realistic than others (comments on how common they are welcome too).
Uncoded text use case:
1 - Document centric system, supports narrative text only, in form of paragraphs, documents. Little structure, only authors of documents, and time of authoring Suggested text representation: Act.text
2 - Text statement centric system, supports dated, attributed, possibly categorised and/or cross linked, units of text, but no codes. Suggested text representation: Act.text
3 - Code plus text based system, supports coded entries, and uncoded "text" entries. Entry in question has no code, no attempt is made to code it. Suggested text representation: Act.text -- variation: A coded system allows text only entries but has a rule that all entries must be coded so behind the scenes a dummy code is added such as "text comment". This dummy code may be stripped when a message is sent based on it, and replaced with some other semantic marker. Suggested text representation: Act.text
4 - System supports coded entries that can also have text associated. However the text is orthogonal to the code. Eg code says penicillin, text says "told patient come back in a week if not better". Suggested text representation: Act.text
Code from text use cases:
5 - Coded system, user enters (or clicks/selects) PV as abbreviation for full code 1234="Penicillin". The full string "Penicillin" is not shown to the user. 1234="Penicillin" is entered into notes. System doesn’t record the fact that PV was entered, since this is a user interface issue. Suggested text representation: Act.code=1234, act.code.displayName="Penicillin" (mandatory), act.code.originalText="[nothing]" Comment: it would be an unusual system to not offer the full text of "Penicillin" back to the user for confirmation.
6 - Coded system, user enters (or clicks/selects) PV as abbreviation for full code 1234="Penicillin". The full string "Penicillin" is not shown to the user. 1234="Penicillin" is entered into notes. System DOES record the fact that PV was entered. Suggested text representation: Act.code=1234, act.code.displayName="Penicillin" (mandatory), act.code.originalText="PV"
7 - Coded system, user enters (or clicks/selects) PV as abbreviation for full code 1234="Penicillin". The string "Penicillin" IS shown to the user in response to their "short code"/"query string". User selects "Penicillin" perhaps by clicking or hitting return. System doesn’t record the fact that PV was entered, since this is a user interface issue (user could have entered PenV, peni, penic etc, or just used the mouse with no typing). Suggested text representation: Act.code=1234, act.code.displayName="Penicillin" (mandatory), act.code.originalText="[nothing]"
8 - Coded system, user enters an encounter record and adds text "diabetic review" and clicks the "reason" text box next to it to indicate reason for encounter being "diabetic review". Actual encounter gets coded with "seen in surgery" or similar code, orthogonal to the reason. Suggested text representation: Act.code=4567, act.code.displayName="Seen in Surgery" (mandatory), RSON act relationship to another act with has act.text="diabetic review". Alternative not recommended is: Act.code=4567, act.code.displayName="Seen in Surgery" (mandatory), act.reasonCode.code="nothing", act.reasonCode.originalText="diabetic review"
9 - Coded system, user enters (looks up via some shortcut) a code of "diabetic review", then adds supporting short or lengthy text "had chat with patient discussed diet and..."
Suggested text representation: Act.code=5678, act.code.displayName="Diabetic Review" (mandatory), COMP act relationship to another act with has act.text="had chat with patient discussed diet and...".
Alternative not recommended is: Act.code=5678, act.code.displayName="Diabetic Review" (mandatory), act.code.originalText="had chat with patient discussed diet and..."
After the fact coding:
11 - User dictates or hand writes text "had chat with patient reviewed diabetes control and...". Later a medical secretary codes this into a system, adding a code of "Diabetic Review", based on their understanding of the text. The full text is not entered, and remains in paper/tape form only.
Suggested text representation: Act.code=5678, act.displayName="Diabetic Review" (mandatory), act.code.originalText="had chat with patient reviewed diabetes control and...."
10 - Coded system, user enters into the system an uncoded comment "had chat with patient reviewed diabetes control and....". Later, a medical secretary reviews this and adds a code for "diabetic review" to the same entry/record.
Suggested text representation: Act.code=5678, act.displayName="Diabetic Review" (mandatory), act.code.originalText="reviewed diabetes control" (to indicate which words were considered), plus COMP act relationship to another act with has act.text="had chat with patient reviewed diabetes control and....".
Possible other representation is to put all the text into original text and none into component/act.text, or to put all into both.
A third possible representation, only available if the system is constructed a certain way, is to have the main user's text in act.text, with a component act relationship to a secondary act (different author and author time) that has the coded version, Act.code=5678, act.displayName="Diabetic Review" (mandatory), act.code.originalText="reviewed diabetes control"
Note that none of the above use the construct act.code=NULL, act.code.originalText="the text". This is therefore deprecated in the view proposed above. If there is no code involved (perhaps not even an attempt to find a code), there seems no rationale for using code.originalText, other than the fact that this is sometimes convenient in the RIM. The answer to "what if there is no code" is therefore "yes, there really is no code at all, only text, which goes in act.text".
Sometimes code.originalText is employed because the text is used to somehow generate the code. But sometimes it seems to be used because you have text, but a datatype that only accepts a code. This strikes me as a different use case. There are RIM attributes that carry a particular semantic meaning eg reasonCode. To give a textual reason to an encounter, say, you could use act.reasonCode.originalText, and have no value in act.reasonCode.code. This seems to be me to be text masquerading as a code, and if act.reasonCode allowed an ED datatype it would be better to put text in with no reference to codes at all.
Incidentally reasonCode is not in the Clinical Statement pattern, since that tries to have a single way to achieve each representation (RSON act relationship in this case), even though it often standardises on the more verbose more flexible version.
Act.code.originalText itself can work as a way to put uncoded text into an act, and it is less verbose that using act.text and has less baggage around renderings and being affected by other attributes (see http://informatics.mayo.edu/wiki/index.php/Act.text and http://informatics.mayo.edu/wiki/index.php/Supplemental_text). This seems to me to be another kludge, a workaround for there not being a RIM attribute called something like act.supportingText.
I don’t believe that the use of a pre-/post-coordinated term in a code makes any difference to the scenarios above. "Code" can be taken to be a "code group" in any form with or without qualifiers.
Displaying the results:
There are several phases of operation to consider: original data entry, possible secondary coding stage, re-display in original system (not a messaging issue, but possibly illuminating), re-display in another system once messaged.
In all the cases above, what would want to be shown to a user as part of a summary patient record?
A rule of thumb could be: always show act.text, always show act.code.displayName, Never display act.code.code (or other attributes not mentioned like codeSystem), show act.code.originalText only if there is no act.code.code (but this construct may be deprecated). Never display act.code.originalText otherwise, since this is just audit data.