Exemple #1
0
        public void GenerateVitalSignsEntryEmpty(III hl7III, Factory hl7Factory)
        {
            IEntry entry = functionalStatus.Section.Entry.Append();

            entry.TypeCode = x_ActRelationshipEntry.DRIV;
            entry.AsOrganizer.ClassCode = x_ActClassDocumentEntryOrganizer.CLUSTER;
            entry.AsOrganizer.MoodCode  = "EVN";
            hl7III = entry.AsOrganizer.TemplateId.Append();
            hl7III.Init("2.16.840.1.113883.10.20.22.4.26");
            hl7III                                = entry.AsOrganizer.Id.Append();
            hl7III.NullFlavor                     = "UNK";
            entry.AsOrganizer.Code.Code           = "46680005";
            entry.AsOrganizer.Code.CodeSystem     = "2.16.840.1.113883.6.96";
            entry.AsOrganizer.Code.CodeSystemName = "SNOMED CT";
            entry.AsOrganizer.Code.DisplayName    = "Vital signs";
            entry.AsOrganizer.StatusCode.Init("completed");

            entry.AsOrganizer.EffectiveTime.Init(DateTime.Now);

            IComponent4 component = entry.AsOrganizer.Component.Append();

            // Height Component
            component.AsObservation.ClassCode = "OBS";
            component.AsObservation.MoodCode  = x_ActMoodDocumentObservation.EVN;
            hl7III = component.AsObservation.TemplateId.Append();
            hl7III.Init("2.16.840.1.113883.10.20.22.4.27");
            hl7III            = component.AsObservation.Id.Append();
            hl7III.NullFlavor = "UNK";
            component.AsObservation.Code.NullFlavor           = "UNK";
            component.AsObservation.Text.Reference.NullFlavor = "UNK";
            component.AsObservation.StatusCode.Init("completed");
            component.AsObservation.EffectiveTime.NullFlavor = "NA";
            IPQ PQ = hl7Factory.CreatePQ();

            PQ.NullFlavor = "UNK";
            component.AsObservation.Value.Add(PQ);
            ICE CE = hl7Factory.CreateCE();

            CE.NullFlavor = "UNK";
            component.AsObservation.InterpretationCode.Add(CE);
            IReferenceRange refRange = hl7Factory.CreateReferenceRange();

            refRange.ObservationRange.Text.Text = "";
            component.AsObservation.ReferenceRange.Add(refRange);
        }
Exemple #2
0
        public void GenerateVitalSignsEntry(VitalSigns vitalSign, III hl7III, Factory hl7Factory, ref int refId)
        {
            IEntry entry = functionalStatus.Section.Entry.Append();

            entry.TypeCode = x_ActRelationshipEntry.DRIV;
            entry.AsOrganizer.ClassCode = x_ActClassDocumentEntryOrganizer.CLUSTER;
            entry.AsOrganizer.MoodCode  = "EVN";
            hl7III = entry.AsOrganizer.TemplateId.Append();
            hl7III.Init("2.16.840.1.113883.10.20.22.4.26");
            hl7III = entry.AsOrganizer.Id.Append();
            hl7III.Init(Guid.NewGuid().ToString());
            entry.AsOrganizer.Code.Code           = "46680005";
            entry.AsOrganizer.Code.CodeSystem     = "2.16.840.1.113883.6.96";
            entry.AsOrganizer.Code.CodeSystemName = "SNOMED CT";
            entry.AsOrganizer.Code.DisplayName    = "Vital signs";
            entry.AsOrganizer.StatusCode.Init("completed");

            IVXB_TS low = new IVXB_TS();

            low.Init(Convert.ToDateTime(vitalSign.Entrydate));
            entry.AsOrganizer.EffectiveTime = new IVL_TS().Init(low: low);
            //entry.AsOrganizer.EffectiveTime.Init(Convert.ToDateTime(vitalSign.Entrydate));

            ///'''' Height Component '''''''
            IComponent4 component = entry.AsOrganizer.Component.Append();

            // Height Component
            component.AsObservation.ClassCode = "OBS";
            component.AsObservation.MoodCode  = x_ActMoodDocumentObservation.EVN;
            hl7III = component.AsObservation.TemplateId.Append();
            hl7III.Init("2.16.840.1.113883.10.20.22.4.27");
            hl7III = component.AsObservation.Id.Append();
            hl7III.Init(Guid.NewGuid().ToString());
            component.AsObservation.Code.Code            = "8302-2";
            component.AsObservation.Code.CodeSystem      = "2.16.840.1.113883.6.1";
            component.AsObservation.Code.CodeSystemName  = "LOINC";
            component.AsObservation.Code.DisplayName     = "Height";
            component.AsObservation.Text.Reference.Value = "#vit" + Convert.ToString(refId);
            component.AsObservation.StatusCode.Init("completed");
            low.Init(Convert.ToDateTime(vitalSign.Entrydate));
            component.AsObservation.EffectiveTime = new IVL_TS().Init(low: low);
            //component.AsObservation.EffectiveTime.Init(Convert.ToDateTime(vitalSign.Entrydate));
            IPQ PQ = hl7Factory.CreatePQ();

            if (!string.IsNullOrEmpty(Convert.ToString(vitalSign.Height)))
            {
                PQ.Value = Convert.ToDouble(vitalSign.Height);
                PQ.Unit  = "inch";
            }
            else
            {
                PQ.NullFlavor = "UNK";
            }
            component.AsObservation.Value.Add(PQ);
            ICE CE = hl7Factory.CreateCE();

            CE.Code       = "N";
            CE.CodeSystem = "2.16.840.1.113883.5.83";
            component.AsObservation.InterpretationCode.Add(CE);

            ///'''' Weight Component '''''''''
            component = entry.AsOrganizer.Component.Append();
            // Weight Component
            component.AsObservation.ClassCode = "OBS";
            component.AsObservation.MoodCode  = x_ActMoodDocumentObservation.EVN;
            hl7III = component.AsObservation.TemplateId.Append();
            hl7III.Init("2.16.840.1.113883.10.20.22.4.27");
            hl7III = component.AsObservation.Id.Append();
            hl7III.Init(Guid.NewGuid().ToString());
            component.AsObservation.Code.Code            = "3141-9";
            component.AsObservation.Code.CodeSystem      = "2.16.840.1.113883.6.1";
            component.AsObservation.Code.CodeSystemName  = "LOINC";
            component.AsObservation.Code.DisplayName     = "Patient Body Weight - Measured";
            component.AsObservation.Text.Reference.Value = "#vit" + Convert.ToString(refId + 1);
            component.AsObservation.StatusCode.Init("completed");
            low.Init(Convert.ToDateTime(vitalSign.Entrydate));
            component.AsObservation.EffectiveTime = new IVL_TS().Init(low: low);
            //component.AsObservation.EffectiveTime.Init(Convert.ToDateTime(vitalSign.Entrydate));
            if (!string.IsNullOrEmpty(Convert.ToString(vitalSign.WEIGHT)))
            {
                PQ       = hl7Factory.CreatePQ();
                PQ.Value = Convert.ToDouble(vitalSign.WEIGHT);
                PQ.Unit  = "Kg";
            }
            else
            {
                PQ.NullFlavor = "UNK";
            }
            component.AsObservation.Value.Add(PQ);
            CE            = hl7Factory.CreateCE();
            CE.Code       = "N";
            CE.CodeSystem = "2.16.840.1.113883.5.83";
            component.AsObservation.InterpretationCode.Add(CE);

            ///'''' BloodPressure Component '''''''''
            component = entry.AsOrganizer.Component.Append();
            // Blood Pressure
            component.AsObservation.ClassCode = "OBS";
            component.AsObservation.MoodCode  = x_ActMoodDocumentObservation.EVN;
            hl7III = component.AsObservation.TemplateId.Append();
            hl7III.Init("2.16.840.1.113883.10.20.22.4.27");
            hl7III = component.AsObservation.Id.Append();
            hl7III.Init(Guid.NewGuid().ToString());
            component.AsObservation.Code.Code            = "3141-9";
            component.AsObservation.Code.CodeSystem      = "2.16.840.1.113883.6.1";
            component.AsObservation.Code.CodeSystemName  = "LOINC";
            component.AsObservation.Code.DisplayName     = "Intravascular Systolic";
            component.AsObservation.Text.Reference.Value = "#vit" + Convert.ToString(refId + 2);
            component.AsObservation.StatusCode.Init("completed");
            low.Init(Convert.ToDateTime(vitalSign.Entrydate));
            component.AsObservation.EffectiveTime = new IVL_TS().Init(low: low);
            // component.AsObservation.EffectiveTime.Init(Convert.ToDateTime(vitalSign.Entrydate));
            PQ = hl7Factory.CreatePQ();
            if (string.IsNullOrEmpty(Convert.ToString(vitalSign.BloodPressure)))
            {
                PQ.NullFlavor = "UNK";
            }
            else
            {
                PQ.Value = Convert.ToDouble(vitalSign.BloodPressure.Split('/')[0]);
                PQ.Unit  = "mm[Hg]";
            }
            component.AsObservation.Value.Add(PQ);
            CE            = hl7Factory.CreateCE();
            CE.Code       = "N";
            CE.CodeSystem = "2.16.840.1.113883.5.83";
            component.AsObservation.InterpretationCode.Add(CE);
            refId = refId + 3;
        }
 public HomeController(IComponent2 component2, IComponent4 component4)
 {
     this.component2 = component2;
     _component4 = component4;
 }