Esempio n. 1
0
        public static ORU_R01 ProduceORU_R01(Neusoft.HISFC.Models.Order.Order order, System.Collections.ArrayList results)
        {
            ORU_R01 oru = new ORU_R01();

            ProduceMSH(oru.MSH, "ORU", "R01", "2005");
            ORU_R01_PATIENT_RESULT result = oru.GetPATIENT_RESULT();

            ProducePID(result.PATIENT.PID, order.Patient);
            ProducePV1(result.PATIENT.VISIT.PV1, order.Patient.PVisit);

            ORU_R01_ORDER_OBSERVATION orderObs = result.GetORDER_OBSERVATION();

            ProduceOBR(orderObs.OBR, order);



            int i = 1;

            foreach (ObservationResult observationResult in results)
            {
                ORU_R01_OBSERVATION obs = orderObs.GetOBSERVATION(i - 1);
                ProduceOBX(obs.OBX, observationResult, i);
                i++;
            }

            return(oru);
        }
Esempio n. 2
0
        /// <summary>
        /// Get NTE Records from ORU_R01_OBSERVATION
        /// </summary>
        public static IEnumerable GetNTERecords(this ORU_R01_OBSERVATION message)
        {
            object[] result = message.GetRecords("NTERepetitionsUsed", "GetNTE");

            if ((result != null) && (result.Count() > 0))
            {
                for (int i = 0; i < result.Count(); i++)
                {
                    yield return(result[i]);
                }
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Add a new ORU_R01_OBSERVATION to NTE
 /// </summary>
 public static NTE AddNTE(this ORU_R01_OBSERVATION message)
 {
     return(message.GetNTE(message.NTERepetitionsUsed));
 }
Esempio n. 4
0
 /// <summary>
 /// Get all NTE Records from ORU_R01_OBSERVATION
 /// </summary>
 public static List <NTE> GetAllNTERecords(this ORU_R01_OBSERVATION message)
 {
     return(message.GetAllRecords <NTE>("NTERepetitionsUsed", "GetNTE"));
 }