Skip to main content
Version: v0.0.3

Function: documentTypeForOid()

documentTypeForOid(oid): DocumentType | undefined

Resolve a document-template OID to its DocumentType, or undefined when the OID is not one of the twelve recognized C-CDA R2.1 types.

Parameters

oid

string

Returns

DocumentType | undefined

Example

import { documentTypeForOid } from "@cosyte/ccda";
documentTypeForOid("2.16.840.1.113883.10.20.22.1.2"); // "ccd"
documentTypeForOid("1.2.3"); // undefined