internal static DocumentReference ToFhirInternal(CCR ccr, DocumentReference documentReference)
        {
            string xml = ThingBaseToFhirDocumentReference.GetXmlFromXPathNavigator(ccr.TypeSpecificData.CreateNavigator());

            ThingBaseToFhirDocumentReference.XmlToDocumentReference(documentReference, xml);

            return(documentReference);
        }
        internal static CDA ToCDA(this DocumentReference documentReference)
        {
            var contentComponent = documentReference.GetFirstContentComponentWithData();

            CDA cda = documentReference.ToThingBase <CDA>();

            string        xml   = Encoding.UTF8.GetString(contentComponent.Attachment.Data);
            XPathDocument xpDoc = ThingBaseToFhirDocumentReference.GetXPathNavigatorFromXml(xml);

            cda.TypeSpecificData = xpDoc;

            return(cda);
        }
 public static void DoTransforms(this DocumentReference documentReference, ThingBase thing)
 {
     ThingBaseToFhirDocumentReference.DoTransformInternal(documentReference, thing);
 }