Inheritance: NHapi.Model.V24.Message.OMP_O09
Example #1
0
        internal IList <Medication> refillMeds(IList <string> medsToRefill)
        {
            OMP_O09_PID omp_o09 = new OMP_O09_PID();

            fillMshSegment(omp_o09.MSH, HL7Constants.FIELD_SEPARATOR.ToString(), "MHV EVAULT", "200MHS", "127.0.0.1", "DNS", "MHV VISTA",
                           _cxn.DataSource.SiteId.Id, _cxn.DataSource.Provider, "DNS", "", "OMP", "O09", "OMP_O09", "", "P", "2.4");
            addIdToPID(omp_o09.getPid(), _cxn.Pid, 1, "", "");
            buildRxeAndOrcSegments(omp_o09, medsToRefill);

            PipeParser pp      = new PipeParser();
            string     request = pp.Encode(omp_o09);

            System.Console.WriteLine(request);
            //string response = (string)_cxn.query(request);
            //return new RxRefillDecoder().parse(response);
            throw new NotImplementedException("This function needs to be completed.");
        }
Example #2
0
        void buildRxeAndOrcSegments(OMP_O09_PID omp_o09, IList <string> rxNumbers)
        {
            string nowTimestamp = DateTime.Now.ToString("yyyyMMddhhmmss");

            for (int i = 0; i < rxNumbers.Count; i++)
            {
                RXE rxe = omp_o09.getRxe(i);
                rxe.QuantityTiming.Quantity.Quantity.Value           = "1";
                rxe.QuantityTiming.StartDateTime.TimeOfAnEvent.Value = nowTimestamp;
                rxe.GiveCode.Identifier.Value         = "RF";
                rxe.GiveCode.NameOfCodingSystem.Value = "HL70119";
                rxe.GiveAmountMinimum.Value           = "1";
                rxe.GiveUnits.Identifier.Value        = "1 refill unit";
                rxe.PrescriptionNumber.Value          = rxNumbers[i];

                ORC orc = omp_o09.getOrc(i);
                orc.PlacerOrderNumber.EntityIdentifier.Value = rxNumbers[i] + "-" + nowTimestamp;
                orc.OrderControl.Value = "RF";
            }
        }
        void buildRxeAndOrcSegments(OMP_O09_PID omp_o09, IList<string> rxNumbers)
        {
            string nowTimestamp = DateTime.Now.ToString("yyyyMMddhhmmss");

            for (int i = 0; i < rxNumbers.Count; i++)
            {
                RXE rxe = omp_o09.getRxe(i);
                rxe.QuantityTiming.Quantity.Quantity.Value = "1";
                rxe.QuantityTiming.StartDateTime.TimeOfAnEvent.Value = nowTimestamp;
                rxe.GiveCode.Identifier.Value = "RF";
                rxe.GiveCode.NameOfCodingSystem.Value = "HL70119";
                rxe.GiveAmountMinimum.Value = "1";
                rxe.GiveUnits.Identifier.Value = "1 refill unit";
                rxe.PrescriptionNumber.Value = rxNumbers[i];

                ORC orc = omp_o09.getOrc(i);
                orc.PlacerOrderNumber.EntityIdentifier.Value = rxNumbers[i] + "-" + nowTimestamp;
                orc.OrderControl.Value = "RF";
            }
        }
        internal IList<Medication> refillMeds(IList<string> medsToRefill)
        {
            OMP_O09_PID omp_o09 = new OMP_O09_PID();

            fillMshSegment(omp_o09.MSH, HL7Constants.FIELD_SEPARATOR.ToString(), "MHV EVAULT", "200MHS", "127.0.0.1", "DNS", "MHV VISTA",
                _cxn.DataSource.SiteId.Id, _cxn.DataSource.Provider, "DNS", "", "OMP", "O09", "OMP_O09", "", "P", "2.4");
            addIdToPID(omp_o09.getPid(), _cxn.Pid, 1, "", "");
            buildRxeAndOrcSegments(omp_o09, medsToRefill);

            PipeParser pp = new PipeParser();
            string request = pp.Encode(omp_o09);
            System.Console.WriteLine(request);
            //string response = (string)_cxn.query(request);
            //return new RxRefillDecoder().parse(response);
            throw new NotImplementedException("This function needs to be completed.");
        }