/// <summary>
        /// Creates and Hydrates an Prescription Item.
        ///
        /// Note: the data used within this method is intended as a guide and should be replaced.
        /// </summary>
        /// <param name="mandatorySectionsOnly">Only show mandatorySectionsOnly fields</param>
        /// <param name="prescriptionId">Prescription Identifier </param>
        /// <returns>A Hydrated PrescriptionItem </returns>
        internal static IPCEHRPrescriptionItem CreatePrescriptionItem(Boolean mandatorySectionsOnly, string prescriptionId)
        {
            var prescriptionItem = PCEHRPrescriptionRecord.CreatePrescriptionItem();

            // The Dispensing Information Object
            prescriptionItem.DispensingInformation = CreateDispensingInformation(mandatorySectionsOnly);

            // Prescription Item Identifier - A globally unique object identifier for each instance of a Medication Instruction
            prescriptionItem.PrescriptionItemIdentifier = BaseCDAModel.CreateIdentifier("1.2.36.1.2001.1005.36", BaseCDAModel.CreateGuid());

            if (!mandatorySectionsOnly)
            {
                // Therapeutic Good Identification - The medicine, vaccine or other therapeutic good being ordered, administered to or used by the subject of care
                prescriptionItem.TherapeuticGoodId = BaseCDAModel.CreateCodableText("01158Y", CodingSystem.PBSCode, "cimetidine 400 mg tablet, 60", null, null);

                // Therapeutic Good Strength (Additional Therapeutic Good Detail) - Information concerning the strength of the Therapeutic Good
                prescriptionItem.TherapeuticGoodStrength = "Therapeutic Good Strength";

                // Therapeutic Good Generic Name (Additional Therapeutic Good Detail) - The generic name of the Therapeutic Good
                prescriptionItem.TherapeuticGoodGenericName = "Therapeutic Good Generic Name";

                // Directions - A complete narrative description of how much, when and how to use the medicine, vaccine or other therapeutic good
                prescriptionItem.Directions = "Directions";

                // Formula - The recipe for compounding a medicine
                prescriptionItem.Formula = "Formula";

                // Form - The formulation or presentation of the overall substance
                prescriptionItem.Form = BaseCDAModel.CreateCodableText("385057009", CodingSystem.SNOMED, "Film-coated tablet", null, null);

                // ClinicalIndication - A reason for ordering the medicine, vaccine or other therapeutic good
                prescriptionItem.ClinicalIndication = "Clinical Indication";

                // Route - The route by which the medication is administered
                prescriptionItem.Route = BaseCDAModel.CreateCodableText("26643006", CodingSystem.SNOMED, "Oral route", null, null);

                // Comment - Any additional information that may be needed to ensure the continuity of supply, rationale for current dose and timing, or safe and appropriate use
                prescriptionItem.Comment = "Comment";

                // DateTime Prescription Expires
                prescriptionItem.DateTimePrescriptionExpires = new ISO8601DateTime(DateTime.Now.AddMonths(12));

                // PBS Manufacturer Code (Administrative Manufacturer Code) - Administrative code of the manufacturer of the pharmaceutical item supplied
                prescriptionItem.PBSManufacturerCode = BaseCDAModel.CreateExternalConceptIdentifier(ExternalConcepts.AustralianPBSManufacturerCode, "AB");
            }
            else
            {
                // Therapeutic Good Identification - The medicine, vaccine or other therapeutic good being ordered, administered to or used by the subject of care
                prescriptionItem.TherapeuticGoodId = BaseCDAModel.CreateCodableText("28237011000036107", CodingSystem.AMTV3, "amoxycillin 500 mg capsule, 20", null, null);
            }
            return(prescriptionItem);
        }
Beispiel #2
0
        /// <summary>
        /// Creates and Hydrates an Dispense Item.
        ///
        /// Note: the data used within this method is intended as a guide and should be replaced.
        /// </summary>
        /// <param name="mandatorySectionsOnly">Only show mandatorySectionsOnly fields</param>
        /// <returns>A Hydrated DispenseItem </returns>
        internal static IPCEHRDispenseItem CreateDispenseItem(Boolean mandatorySectionsOnly, string dispenseDocumentId)
        {
            var dispenseItem = PCEHRDispenseRecord.CreateDispenseItem();

            // Status of the document
            dispenseItem.Status = MedicationStatus.Completed;

            // Dispense Item Identifier (Medication Action Instance Identifier)
            dispenseItem.DispenseItemIdentifier = BaseCDAModel.CreateIdentifier("DispenseItemIdentifierAssigningAuthorityName", null, dispenseDocumentId, "1.2.3.4.5.66666", null);

            // DateTime of Dispense Event (Medication Action DateTime)
            dispenseItem.DateTimeOfDispenseEvent = new ISO8601DateTime(DateTime.Now);

            if (!mandatorySectionsOnly)
            {
                // Therapeutic Good Identification - The medicine, vaccine or other therapeutic good being ordered, administered to or used by the subject of care
                dispenseItem.TherapeuticGoodId = BaseCDAModel.CreateCodableText("01471K", CodingSystem.PBSCode, "fluconazole 50 mg capsule, 28");

                // Example of translation
                //var translations = new List<ICodableTranslation>();
                //translations.Add(BaseCDAModel.CreateCodableTranslation("01471K", CodingSystem.PBSCode, "fluconazole 50 mg capsule, 28"));

                //dispenseItem.TherapeuticGoodId = BaseCDAModel.CreateTherapeuticGoodIdentification("28190011000036104",
                //    CodingSystem.AMTV3, "fluconazole 50 mg capsule, 28", null, translations);

                // Therapeutic Good Strength (Additional Therapeutic Good Detail) - Information concerning the strength of the Therapeutic Good
                dispenseItem.TherapeuticGoodStrength = "Therapeutic Good Strength (Additional Therapeutic Good Detail)";

                // Therapeutic Good Generic Name (Additional Therapeutic Good Detail) - The generic name of the Therapeutic Good
                dispenseItem.TherapeuticGoodGenericName = "Therapeutic Good Generic Name";

                // Additional Dispensed Item Description (Additional Therapeutic Good Detail)
                dispenseItem.AdditionalDispensedItemDescription =
                    "Additional Dispensed Item Description (Additional Therapeutic Good Detail)";

                // Label Instruction (Medication Action Instructions)
                dispenseItem.LabelInstruction = "Label Instruction (Medication Action Instructions)";

                // Formula - The recipe for compounding a medicine
                dispenseItem.Formula = "Formula";

                // Form - The formulation or presentation of the overall substance
                dispenseItem.Form = BaseCDAModel.CreateCodableText("385057009", CodingSystem.SNOMED, "Film-coated tablet");

                // Dispensing - Quantity Description - Free text description of the amount which may consist of the quantity and dose unit.
                dispenseItem.QuantityDescription = "Dispensing Information - Quantity";

                // Comment (Medication Action Comment)
                dispenseItem.Comment = "Comment (Medication Action Comment)";

                // Brand Substitution Permitted - Indicates whether or not the substitution of a prescribed medicine with a different brand name of the same medicine, vaccine or other therapeutic good.
                // which has been determined as bioequivalent, is allowed when the medication is dispensed/supplied
                dispenseItem.BrandSubstitutionOccurred = false;

                // Number of this Dispense
                dispenseItem.NumberOfThisDispense = 1;

                // Maximum Number Of Repeats - The number of times the expressed quantity of medicine, vaccine or other therapeutic good may be refilled or re-dispensed without a new prescription
                dispenseItem.MaximumNumberOfRepeats = 6;

                // PBS Manufacturer Code (Administrative Manufacturer Code) - Administrative code of the manufacturer of the pharmaceutical item supplied
                dispenseItem.PBSManufacturerCode =
                    BaseCDAModel.CreateExternalConceptIdentifier(ExternalConcepts.AustralianPBSManufacturerCode, "AB");

                // Unique Pharmacy Prescription Number (Administrative System Identifier)
                dispenseItem.UniquePharmacyPrescriptionNumber = "UniquePharmacyPrescriptionNumber";

                // Prescription Item Identifier - A globally unique object identifier for each instance of a Medication Instruction
                dispenseItem.PrescriptionItemIdentifier = BaseCDAModel.CreateIdentifier(
                    "PrescriptionItemIdentifierAssigningAuthorityName", null, BaseCDAModel.CreateGuid(),
                    "1.2.36.1.2001.1005.36", null);
            }
            else
            {
                // Therapeutic Good Identification - The medicine, vaccine or other therapeutic good being ordered, administered to or used by the subject of care
                dispenseItem.TherapeuticGoodId = BaseCDAModel.CreateCodableText("23641011000036102", CodingSystem.AMTV2,
                                                                                "paracetamol 500 mg + codeine phosphate 30 mg tablet");
            }

            return(dispenseItem);
        }