Beispiel #1
0
        private static OutsidePrescriptionType TransformRemMedicationIntoOutsidePrescriptionAsFreeText(Medication medication)
        {
            Check.IsNotNull(
                medication.UsageDateRange, "Medication Usage Range was provided for " + medication.MedicationCodeCodedConcept.DisplayName);

            Check.IsNotNull(medication.UsageDateRange.StartDate, "Medication Usage Start Date cannot be null");
            Debug.Assert(medication.UsageDateRange.StartDate != null, "medication.UsageDateRange.StartDate != null");

            var prescription = new OutsidePrescriptionType
            {
                ExternalId = medication.Key.ToString(),
                Date       = medication.UsageDateRange.StartDate.Value.ToString("yyyMMdd"),
                DoctorName = medication.PrescribingPhysicianName,
                DrugIdentifierTypeSpecified = false,
                Drug = NcScriptHelper.RemoveUnwantedPartsFromDrugName(medication.RootMedicationCodedConcept.DisplayName),
                //// DrugIdentifier = medication.MedicationCodeCodedConcept.CodedConceptCode,
                PrescriptionType = "reconcile",
                ////DispenseNumber = "0",
                ////RefillCount = "0",
                Sig = medication.FrequencyDescription,
                PrescriptionStatus =
                    NcScriptHelper.TransformRemMedicationStatusIntoNewCropPrescriptionStatus(
                        medication.MedicationStatus.WellKnownName),
                PrescriptionArchiveStatus =
                    NcScriptHelper.TransformRemMedicationIntoNewCropPrescriptionArchiveStatus(
                        medication.MedicationStatus.WellKnownName),
            };

            return(prescription);
        }
Beispiel #2
0
        private static PatientAllergyFreeformType BuildPatientAllergyFreeformType(Allergy drugAllergy)
        {
            var da = new PatientAllergyFreeformType
            {
                AllergyName           = NcScriptHelper.RemoveUnwantedPartsFromDrugName(drugAllergy.AllergenCodedConcept.DisplayName),
                AllergySeverityTypeID =
                    NcScriptHelper.TransformRemAllergySeverityTypeToNewCropAllergySeverityType(
                        drugAllergy.AllergySeverityType),
            };

            return(da);
        }