Ejemplo n.º 1
0
        /// <summary>
        /// Creates a medication item.
        /// </summary>
        /// <param name="code">Medication code.</param>
        /// <param name="name">Medication name.</param>
        /// <param name="directionsNullFlavour">The Directions Null Flavour</param>
        /// <param name="recomendationOrChangeNullFlavour">The Recommendation Or Change Null Flavour</param>
        /// <param name="changeTypeNullFlavour">The Change Type Null Flavour</param>
        /// <returns></returns>
        private static IMedicationItem CreateMedication(string code, string name, bool showNullflavor)
        {
            IMedicationItem medication = EventSummary.CreateMedication();

            if (showNullflavor)
            {
                medication.Directions   = BaseCDAModel.CreateStructuredText(NullFlavour.Other);
                medication.ChangeStatus = BaseCDAModel.CreateCodableText(NullFlavour.Other, CodingSystem.SNOMED, "Change made"); // Could not find ChangeStatus code for the provided refset
                medication.ChangeType   = BaseCDAModel.CreateCodableText(NullFlavour.Other, CodingSystem.SNOMED, "Changed");     // Could not find ChangeType code for the provided refset
            }
            else
            {
                medication.Directions   = BaseCDAModel.CreateStructuredText("Dose:1, Frequency: 3 times daily");
                medication.ChangeStatus = BaseCDAModel.CreateCodableText(ChangeStatus.ChangeMade);
                medication.ChangeType   = BaseCDAModel.CreateCodableText(ChangeTypeSnomed.Changed);
            }

            medication.ChangeDescription  = "Change Description";
            medication.ChangeReason       = BaseCDAModel.CreateStructuredText("Change Reason");
            medication.ClinicalIndication = "Clinical Indication";
            medication.Comment            = "Comment";

            medication.Medicine = BaseCDAModel.CreateCodableText(code, CodingSystem.AMTV3, name);

            return(medication);
        }
        /// <summary>
        /// Creates a medication item.
        /// </summary>
        /// <param name="code">Medication code.</param>
        /// <param name="name">Medication name.</param>
        /// <param name="directionsNullFlavour">The Directions Null Flavour</param>
        /// <param name="recomendationOrChangeNullFlavour">The Recommendation Or Change Null Flavour</param>
        /// <param name="changeTypeNullFlavour">The Change Type Null Flavour</param>
        /// <returns></returns>
        private static IMedicationItem CreateMedication(string code, string name, bool showNullflavor = false)
        {
            IMedicationItem medication = EventSummary.CreateMedication();

            // WE SHOULD NEVER USE showNullflavor as the defined refsets are very simple ones
            medication.Directions   = BaseCDAModel.CreateStructuredText("Dose:1, Frequency: 3 times daily");
            medication.ChangeStatus = BaseCDAModel.CreateCodableText(ChangeStatus.ChangeMade);
            medication.ChangeType   = BaseCDAModel.CreateCodableText(ChangeTypeSnomed.Changed);

            medication.ChangeDescription  = "Change Description";
            medication.ChangeReason       = BaseCDAModel.CreateStructuredText("Change Reason");
            medication.ClinicalIndication = "Clinical Indication";
            medication.Comment            = "Comment";

            medication.Medicine = BaseCDAModel.CreateCodableText(code, CodingSystem.AMTV3, name);

            return(medication);
        }