Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
Jonathan Payne edited this page Feb 23, 2015 · 2 revisions

Overview

The API exposes a representation of a datatype resource that describes concepts in various sources. Examples are numeric, date, coded datatypes that are important in communication of medical data (eg using HL7) and in validating data entry fields to promote data quality eg a date field with the datatype of date can only accept dates during data entry

URI :/rest/datatype

Core Properties

uuid
url
display # Preferred display name based on current locale
displayLocale # Locale of the display name
retired
properties
auditInfo
resourceVersion
names # All names/synonyms for different locales
descriptions # All descriptions for different locales
sources # Indicates the sources in which the class is used

Representations

GET refGET DefaultGET fullPOST createPOST update
uuid
url
display
uuid
url
display
displayLocale
names
descriptions
sources
retired
properties
links
resourceVersion
uuid
url
display
displayLocale
names
descriptions
sources
retired
properties
links
resourceVersion
auditInfo
name
description
name
description

URIs

URLDescriptionResponse Code
GET /rest/datatypeGet/search active datatypes within the CIEL dictionaryOK / Success
Not Found
GET /rest/datatype?source={sourceUuid}Get/search active datatypes in the specified sourceOK / Success
Not Found
GET /rest/datatype/{uuid}Fetch the datatype specified by uuid in the default dictionaryOK / Success
Not Found
POST /rest/datatype/Creates a new datatype within the CIEL dictioanry
The message must have a name as a minimum
OK / Success
Not Found
Duplicate
POST /rest/datatype/?source={sourceUuid}Creates a new datatype within the specified source
The message must have a name as a minimum
OK / Success
Not Found
Duplicate
PUT /rest/datatype/{uuid}Updates the specified datatype within the default CIEL dictionaryOK / Success
Not Found
PUT /rest/datatype/{uuid}?source={sourceUuid}Updates the specified datatype within the specified sourceOK / Success
Not Found
DELETE /rest/datatype/{uuid}?!purgeRetire/Void a datatype specified by the uid within the CIEL dictionaryOK / Success
Not Found
DELETE /rest/datatype/{uuid}?!purge&source={sourceUuid}Retire/Void a datatype specified by the uid within the specified sourceOK / Success
Not Found
DELETE /rest/datatype/{uuid}?purgeDelete a datatype specified by the uidOK / Success
Not Found
DELETE /rest/datatype/{uuid}?purge&source={sourceUuid}Delete a datatype specified by the uid in the source specified by the uuidOK / Success
Not Found

Output Samples

{
"__type__": "OclDataType",
"uuid": "8d4a4488-c2cc-11de-8d13-0010c6dffd0f",
"url": "/rest/datatype/8d492ee0-c2cc-11de-8d13-0010c6dffd0f",
"display": "Numeric",
"displayLocale" : "en" ,
"retired": false,
"properties": {
"hl7Abbreviation": "NM",
"openmrsResourceVersion": "1.8"
},
"auditInfo": {
"creator": "admin",
"dateCreated": "2005-02-17T00:00:00.000+0300",
"changedBy": null,
"dateChanged": null
},
"resourceVersion": "1.2",
"names": [ { "name": "Numeric",
"locale": "en",
"preferred": "True"
},
{
"name": "NM",
"locale": "en",
"preferred": "False"
}
],
"descriptions": [
{ "description": "Numeric value, including integer or float (e.g., creatinine, weight)",
"locale": "en",
"preferred": "True"
}
],
"sources": [
"pih",
"ciel"
]
}

Normalization across Sources

Datatypes are used at very granular level on concepts as properties. Data types are best represented by reviewing the HL7 data types summarized below

Alphanumeric ST String
TX Text data
FT Formatted text
Numerical CQ Composite quantity with units
MO Money
NM Numeric
SI Sequence ID
SN Structured numeric
Identifier ID Coded values for HL7 tables
IS Coded values for user-defined tables
HD Hierarchic designator
EI Entity identifier
RP Reference pointer
PL Person location
PT Processing type
Date/Time DT Date
TM Time
TS Time stamp
Code Values CE Coded element
CF Coded element with formatted values
CK Composite ID with check digit
CN Composite ID number and name
CX Extended composite ID with check digit
XCN Extended composite ID number and name
Generic CM Composite
Demographics AD Address
PN Person name
TN Telephone number
XAD Extended address
XPN Extended person name
XON Extended composite name and ID number for organizations
XTN Extended telecommunications number
Specialty/Chapter specific CD Channel definition
MA Multiplexed array
NA Numeric array
ED Encapsulated data
CP Composite price
FC Financial class
Extended Queries QSC Query selection criteria
QIP Query input parameter list
RCD Row column definition
Master Files DLN Driver’s license number
JCC Job code/class
VH Visiting hours
Medical Records/Info Mgmt PPN Performing person time stamp
Time Series DR Date/time range
RI Repeat interval
SCV Scheduling class value pair
TQ Timing/quantity
- See more at: http://www.corepointhealth.com/resource-center/hl7-resources/hl7-data-types#sthash.BFf38jpz.dpuf

From the interface terminologies for the various sources we utilise as OCL, datatypes remain at a higher less granular level eg Numeric , Coded etc. The reference terminologies like LOINC, ICD and SNOMED have no specified data types, and will mainly extend the Hl7 datatypes during an implementation. LOINC allows mapping the result of to a datatype of numeric, alpha or alphanumeric. This API exposes a representation of datatypes as a top level resource. Datatypes are normalized across sources.

Clone this wiki locally