Exemplo n.º 1
0
        public static DsioObservation GetDsioObservation(Observation observation)
        {
            DsioObservation returnVal = new DsioObservation()
            {
                Ien                 = observation.Ien,
                BabyIen             = observation.BabyIen,
                Category            = observation.Category,
                EnteredBy           = observation.EnteredBy,
                PatientDfn          = observation.PatientDfn,
                PregnancyIen        = observation.PregnancyIen,
                Value               = observation.Value,
                Narrative           = observation.Narrative,
                Unit                = observation.Unit,
                ExchangeDocumentIen = observation.ExchangeDocumentIen
            };

            returnVal.Code.Code           = observation.Code;
            returnVal.Code.DisplayName    = observation.Description;
            returnVal.Code.CodeSystemName = CodingSystemUtility.GetDescription(observation.CodeSystem);

            returnVal.ExamDate  = observation.ExamDate.ToString(VistaDates.VistADateFormatFour);
            returnVal.EntryDate = observation.EntryDate.ToString(VistaDates.VistADateFormatFour);

            returnVal.Negation = (observation.Negation) ? "true" : "false";

            return(returnVal);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a Physical Exam Subsection using initial values that are required
        /// </summary>
        /// <param name="codingSys">The system of coding</param>
        /// <param name="code">The code used</param>
        /// <param name="displayName">The name associated with the code</param>
        /// <param name="templateId">The template id of the sub-section</param>
        /// <param name="sectionTitle">The title of the section</param>
        /// <returns>A new PhysicalExamSubsection</returns>
        public static PhysicalExamSubsection CreateSubsection(CodingSystem codingSys, string code, string displayName, string templateId, string sectionTitle)
        {
            PhysicalExamSubsection returnVal = new PhysicalExamSubsection();

            // *** Get system info ***
            string codeSysName = CodingSystemUtility.GetDescription(codingSys);
            string codeSysId   = CodingSystemUtility.GetSystemId(codingSys);

            // *** Set the code ***
            returnVal.SetCode(codeSysName, codeSysId, code, displayName, codingSys);

            // *** Set the template id ***
            returnVal.SetTemplateIds(templateId);

            // *** Set the section title ***
            returnVal.SetSectionTitle(sectionTitle);

            return(returnVal);
        }
Exemplo n.º 3
0
        public static CdaObservationModel Create(CdaSimpleObservation obs)
        {
            CdaObservationModel returnVal = new CdaObservationModel();

            // TODO: Support low/high 
            // TODO: Show time 

            returnVal.EffectiveTime = obs.EffectiveTime.High.ToString(VistaDates.UserDateFormat);

            if (obs.Code != null)
            {
                returnVal.CodeSystem = CodingSystemUtility.GetDescription(obs.Code.CodeSystem);
                returnVal.Code = obs.Code.Code;
                returnVal.DisplayName = obs.Code.DisplayName;
            }

            returnVal.NegationInd = (obs.NegationIndicator) ? "True" : "False";

            returnVal.Status = obs.Status.ToString();

            returnVal.Value = obs.DisplayValue; 

            return returnVal; 
        }
Exemplo n.º 4
0
        protected override StrucDocTable GetEntriesTable()
        {
            //return this.Organizer.gE
            // *** Create the table ***
            StrucDocTable returnTable = null;

            if (this.Procedures.Count > 0)
            {
                returnTable = new StrucDocTable();

                // *** Create Header information ***
                returnTable.thead             = new StrucDocThead();
                returnTable.thead.tr          = new StrucDocTr[] { new StrucDocTr() };
                returnTable.thead.tr[0].Items = new StrucDocTh[] {
                    new StrucDocTh()
                    {
                        Text = new string[] { "Code System" }
                    },
                    new StrucDocTh()
                    {
                        Text = new string[] { "Code" }
                    },
                    new StrucDocTh()
                    {
                        Text = new string[] { "Description" }
                    }
                };

                // *** Create Body Information ***
                returnTable.tbody = new StrucDocTbody[] { new StrucDocTbody() };
                List <StrucDocTr> trList = new List <StrucDocTr>();

                foreach (var obs in this.Procedures)
                {
                    // *** Create the row ***
                    StrucDocTr tr = new StrucDocTr()
                    {
                        ID = obs.ReferenceId
                    };

                    // *** Create a list of TD ***
                    List <StrucDocTd> tdList = new List <StrucDocTd>();

                    // *** Add TD's ***

                    // *** Code System ***
                    tdList.Add(new StrucDocTd()
                    {
                        Text = new string[] { CodingSystemUtility.GetDescription(obs.Code.CodeSystem) }
                    });

                    // *** Code ***
                    tdList.Add(new StrucDocTd()
                    {
                        Text = new string[] { obs.Code.Code }
                    });

                    // *** Description ***
                    tdList.Add(new StrucDocTd()
                    {
                        Text = new string[] { obs.Code.DisplayName }
                    });

                    // *** Add td's to tr ***
                    tr.Items = tdList.ToArray();

                    // *** Add tr to tr list ***
                    trList.Add(tr);
                }

                // *** Add rows to body ***
                returnTable.tbody[0].tr = trList.ToArray();
            }

            return(returnTable);
        }