CPRS templates will support a thing called TEXT OBJECTS. And example might be |PATIENT NAME|. Whenever that is encountered in a note, it will be replaced with the relevant data. Now this is done on the server through a thing called a TIU TEXT OBJECT. This maps the name (e.g. PATIENT NAME) to a bit of code that returns a string result. So if you want to have a custom object to come into your note, then you can write a custom object.
The creating of these object is typically done from this menu option: TIUFJ CREATE OBJECTS MGR
Here is a dump of the record for the PATIENT NAME object. Notice the part: "S X=$$NAME^TIULO(DFN)"
Record# 76, in FILE: 8925.1
.01-NAME : PATIENT NAME
.02-ABBREVIATION : NAME
.03-PRINT NAME : PATIENT NAME
.04-TYPE : OBJECT
.06-CLASS OWNER : CLINICAL COORDINATOR (`55 in #8930)
.07-STATUS : ACTIVE (`11 in #8925.6)
.08-IN USE : NA
.11-ORPHAN : NA
.12-HAS BOILTXT : NA
.15-PRF FLAG : NA
3.02-OK TO DISTRIBUTE : YES
9-OBJECT METHOD : S X=$$NAME^TIULO(DFN)
99-TIMESTAMP : 62934,61603
This code returns the result from NAME^TIULO and puts it into variable X. That X in then put into your note. For reference, here is the mumps code for TIULO. It just calls out to another function, but I think you can get the idea from this.
TIULO
; SLC/JER - Embedded Objects ;11/29/02
;;1.0;TEXT INTEGRATION UTILITIES;**34,70,101,148,204**;Jun 20, 1997
DEM
(
DFN
,VADM
)
; Calls DEM^VADPT
DO
DEM^VADPT QUIT
NAME
🔗(
DFN
)
; Patient NAME
IF
'
$DATA
(
VADM
(
1
)
)
DO
DEM(
DFN
,.
VADM
)
QUIT
$SELECT
(
VADM
(
1
)
]
""
:
VADM
(
1
)
,
1
:
"NAME UNKNOWN"
)
At my office, I have extended this process to make what we call TIU TEXT TABLES. For each table, we define sub parts. that will pull in data from the computer. It makes a nice snapshot of a given problem. Below is an example of our hypertension table. Our tables can pull in labs, entries from prior notes, TIU TEXT OBJECTS, and medications defined to be associated with a specific problem.
-- [HYPERTENSION] ---------
Date of last electrolytes : 9/1/2017 <--
2/9/2017
Sodium = 144 on 9/1/2017 <-- 145 on 2/9/2017
Potassium = 4.6
on 9/1/2017 <-- 4.7 on 2/9/2017 <-- 4.8 on 1/30/2017
Creatinine = 0.8
on 11/30/2017 <-- 0.8 on 9/1/2017 <-- 0.7 on 2/9/2017
Urine Protein =
NEGATIVE on 11/30/2017 <-- NEGATIVE on 9/29/2016
EKG = 12/3/07, 12/26/12,
11/3/13 extensive ST-T changes Dr. xxxxx said looked ok
BP = 130/86 <-
118/78 <- 131/81 <- 130/69
CVD Risk = 1% in next 10
years
Complications :
Medication-1 = aldactone (spironolactone) 25 mg po
twice Daily
Medication-2 = metoprolol tartrate 25 mg po BID for palpitations
(Dr Whitaker, Cardiology)
Side effects: lisinopril --> cough.
Kevin Toppenberg, MD