.ney code examples

Aug 10, 2014 at 11:27 PM
Do you have a .net code example for creating a complete ccda summary of care record for MU stage 2
Dec 29, 2014 at 9:14 AM
Hi ,
      Following is the sample allergy section with empty entry . May be you have completed this . But for other ppls reference want to use it . 
   var section = cd.Component.AsStructuredBody.Component.Append();
            section.Section.Title.Text = "Allergies, adverse reactions, alerts";
            section.Section.TemplateId.Add(new II() { Root = "2.16.840.1.113883.10.20.22.2.6.1" });

            section.Section.Code.Code = "48765-2";
            section.Section.Code.CodeSystem = "2.16.840.1.113883.6.1";
            section.Section.Code.CodeSystemName = "LOINC";

var entry1=section.Section.Entry.Append();
 entry1.TypeCode = x_ActRelationshipEntry.DRIV;
            var act = entry1.AsAct;
            act.ClassCode = x_ActClassDocumentEntryAct.ACT;
            act.MoodCode = x_DocumentActMood.EVN;
            act.TemplateId.Add(new II() { Root = "2.16.840.1.113883.10.20.22.4.30" });
            act.Id.Add(new II() { Root = System.Guid.NewGuid().ToString() });
            act.Code.Code = "48765-2";
            act.Code.CodeSystem = "2.16.840.1.113883.6.1";
            act.Code.CodeSystemName = "LOINC";
            act.Code.DisplayName = "Allergies, adverse reactions, alerts";
            act.StatusCode.Code = "completed";
            act.EffectiveTime.Init(low: new IVXB_TS() { NullFlavor = "NI" }, high: new IVXB_TS() { NullFlavor = "NI" });

            var entryRel = act.EntryRelationship.Append();
            entryRel.TypeCode = x_ActRelationshipEntryRelationship.SUBJ;

            var observation = entryRel.AsObservation;
            observation.TemplateId.Add(new II() { Root = "2.16.840.1.113883.10.20.22.4.7" });
            observation.ClassCode = "OBS";
            observation.MoodCode = x_ActMoodDocumentObservation.EVN;
            observation.StatusCode.Code = "completed";

            observation.Id.Add(new II() { Root = System.Guid.NewGuid().ToString() });

            observation.Code.Code = "ASSERTION";
            observation.Code.CodeSystem = "2.16.840.1.113883.5.4";
            observation.StatusCode.Code = "completed";
            observation.EffectiveTime.NullFlavor = "NI";
            observation.Value.Add(new CD() { NullFlavor = "NI" });
Coordinator
Dec 29, 2014 at 2:08 PM
Hi rajputs6,

To avoid NREs while building CDAs, don't forget to set the Lazy property to true:

var doc = CreateDocument();
doc.Lazy = true;
var section = doc.Component.AsStructuredBody.Component.Append();
section.Section.Title.Text = "Allergies, adverse reactions, alerts";
section.Section.TemplateId.Add(new II() { Root = "2.16.840.1.113883.10.20.22.2.6.1" });