v2 to CDA Mapping: Data Types
Oct 7, 2011A couple of weeks ago, I held a v2 to CDA mapping course (See here). Overall, the course was a success - at least, that’s the feedback I had from the attendees, who left with a much deeper understanding of the problem space for mapping from HL7 v2 to CDA, and the ways to approach solutions. Several of the participants asked me if I was going to run the course again, since only some of the people in their institution could attend. Well, it depends on interest - if you’re interested, let me know. Because there’s no “solution” to the problem - it depends so much on the context.There’s not a lot of good information in public about how to do such. a conversion. Keith Boone has a chapter (17) in his excellent book on CDA, but this very general, and possibly a little US specific for an Australian context. I’m going to publish a few of my course notes here in the hope that it will be useful to other people working on v2 to CDA mappings.
Firstly, a general mapping guide from v2 data types to CDA datatypes:
Data Type | CDA Data Type |
OBX-5 types | |
ST - String | ST (String) |
TX -Text data | ST (String) |
FT -Formatted text | ED (Encapsulated Data) Or Narrative |
RP -reference pointer | TEL (Telecommunications Reference) |
NM -Numeric | Usually PQ when combined with units field (i.e. OBX-6), or REAL |
SN -structured numeric | IVL, RTO, PQ, or CO depending on contents |
NR -Numeric Range | IVL |
DT -Date | TS (Timestamp) |
TS -time stamp | TS (Timestamp) |
TM -Time | PQ (Physical Quantity, unit measure of time) |
CQ -composite quantity with units | PQ |
DR -date/time range | IVL |
ED -encapsulated data | ED (encapsulated data) |
EI -entity identifier | II + more |
MO - money | MO (Money) |
NA - numeric array | LIST |
CD - channel definition | Set of observations |
TQ - timing quantity | GTS + many more things |
CE - coded element | CD/CE (Concept) |
CF -coded element with formatted values | CD/CE (Concept) |
CNE -coded with no exceptions | CD/CE (Concept) |
CWE -coded with exceptions | CD/CE (Concept) |
non-OBX-5 types | |
ID - Coded values for HL7 tables | CS? CD? (Coded simple or Concept) |
IS - Coded value for user-defined tables | CS? CD? (Coded simple or Concept) |
SI - Sequence ID | INT (if mapped; unusual) |
AD -address | AD (Address) |
CX -extended composite ID with check digit | II + other things (see identification pattern) |
CN - composite ID number and name | II + PN + more |
DLN -driver’s license number | II + more |
EI -entity identifier | II? CD.codeSystem? More? |
HD -hierarchic designator | II.root? CD.codeSystem? More? |
PL - person location | Split across several locations |
RFR -reference range | IVL |
XAD -extended address | AD (Address) |
XCN - extended composite ID number and name for persons | II + PN + more |
XON -extended composite name and identification number for organizations | ON (Organizational Name) |
XPN - extended person name | PN (Person Name) |
XTN - extended telecommunication number | TEL (Telecommunications Reference) |
Notes:
- mappings are only candidates – the correct mapping depends on context and scope.
- Only useful data types included in this table.
- mappings are imprecise – version 2 and CDA data type scopes can differ significantly
It’s important, when mapping from v2 data types to CDis level A, to not simply map at the data type level. This table provides a starting point, but you need to map each component every time, since the use of these is so variable, and there’s such internal mismatch between types (see here about II, for instance)