Beispiel #1
0
 public TaggedMedicationArray(string tag, Medication mdo)
 {
     this.tag = tag;
     if (mdo == null)
     {
         this.count = 0;
         return;
     }
     this.meds = new MedicationTO[1];
     this.meds[0] = new MedicationTO(mdo);
     this.count = 1;
 }
Beispiel #2
0
 public MedicationTO(Medication mdo)
 {
     this.id = mdo.Id;
     this.name = mdo.Name;
     this.rxNum = mdo.RxNumber;
     this.quantity = mdo.Quantity;
     this.expirationDate = mdo.ExpirationDate;
     this.issueDate = mdo.IssueDate;
     this.startDate = mdo.StartDate;
     this.stopDate = mdo.StopDate;
     this.orderId = mdo.OrderId;
     this.status = mdo.Status;
     this.refills = mdo.Refills;
     this.isOutpatient = mdo.IsOutpatient;
     this.isInpatient = mdo.IsInpatient;
     this.isIV = mdo.IsIV;
     this.isUnitDose = mdo.IsUnitDose;
     this.isNonVA = mdo.IsNonVA;
     this.lastFillDate = mdo.LastFillDate;
     this.remaining = mdo.Remaining;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Provider != null)
     {
         this.provider = new AuthorTO(mdo.Provider);
     }
     this.cost = mdo.Cost;
     this.sig = mdo.Sig;
     this.type = mdo.Type;
     this.additives = mdo.Additives;
     this.solution = mdo.Solution;
     this.rate = mdo.Rate;
     this.route = mdo.Route;
     this.dose = mdo.Dose;
     this.instruction = mdo.Instruction;
     this.comment = mdo.Comment;
     this.dateDocumented = mdo.DateDocumented;
     if (mdo.Documentor != null)
     {
         this.documentor = new AuthorTO(mdo.Documentor);
     }
     this.detail = mdo.Detail;
     this.schedule = mdo.Schedule;
     this.daysSupply = mdo.DaysSupply;
     this.isImo = mdo.IsImo;
     if(!String.IsNullOrEmpty(mdo.Hospital.Value))
         this.hospital = new TaggedText(mdo.Hospital);
     if (!String.IsNullOrEmpty(mdo.Drug.Value))
         this.drug = new TaggedText(mdo.Drug);
 }
Beispiel #3
0
 public TaggedMedicationArray(string tag, Medication[] mdos)
 {
     this.tag = tag;
     if (mdos == null)
     {
         this.count = 0;
         return;
     }
     this.meds = new MedicationTO[mdos.Length];
     for (int i = 0; i < mdos.Length; i++)
     {
         this.meds[i] = new MedicationTO(mdos[i]);
     }
     this.count = meds.Length;
 }
Beispiel #4
0
 /// <summary>
 /// Convert a MDO Medication object to a CCR StructuredProductType. Since there is not a 1 to 1 mapping
 /// between the two objects' properties, the additional arguments should be supplied
 /// </summary>
 /// <param name="med"></param>
 /// <returns></returns>
 public StructuredProductType toStructuredProductType(Medication med, string units, string form, string unitsPerDose)
 {
     StructuredProductType newMed = new CCRHelper().buildMedObject(med.Name, med.PharmacyId, med.StartDate, med.StopDate, med.IssueDate, med.LastFillDate, med.ExpirationDate,
         med.Sig, med.Dose, units, form, unitsPerDose, med.Schedule, med.Route, med.Refills, med.Remaining, med.Quantity,
         med.Provider.Name, med.Provider.Id, med.Status, med.Type);
     return newMed;
 }