コード例 #1
0
        private static SubstanceAdministrationEvent getSubstanceAdministrationEvent(string clientImmunizationId, string administrationTime)
        {
            II statementTemplateId = new II();

            statementTemplateId.root = "2.16.840.1.113883.3.795.11.9.1.1";

            CD substanceAdminGeneralPurpose = new CD();

            substanceAdminGeneralPurpose.code       = "384810002";
            substanceAdminGeneralPurpose.codeSystem = "2.16.840.1.113883.6.5";

            CD substanceCode = new CD();

            substanceCode.code       = "08";
            substanceCode.codeSystem = "2.16.840.1.113883.12.292";

            II id = new II();

            id.root      = "2.16.840.1.113883.3.795.12.100.10";
            id.extension = clientImmunizationId;

            SubstanceAdministrationEvent statement = new SubstanceAdministrationEvent();

            statement.templateId = new II[] { statementTemplateId };
            statement.id         = id;
            statement.substanceAdministrationGeneralPurpose = substanceAdminGeneralPurpose;

            AdministrableSubstance substance = new AdministrableSubstance();
            II substanceId = new II();

            substanceId.root = System.Guid.NewGuid().ToString("D");
            substance.id     = substanceId;

            substance.substanceCode = substanceCode;
            statement.substance     = substance;

            IVL_TS administrationTimeInterval = new IVL_TS();

            administrationTimeInterval.high      = administrationTime;
            administrationTimeInterval.low       = administrationTime;
            statement.administrationTimeInterval = administrationTimeInterval;

            return(statement);
        }
コード例 #2
0
        private static void callServiceWithObject()
        {
            string   clientSystemPatientId = "1234567890";
            CDSInput cdsInput = new CDSInput();

            II templateId = new II();

            templateId.root     = "2.16.840.1.113883.3.795.11.1.1";
            cdsInput.templateId = new II[] { templateId };

            CDSContext cdsContext        = new CDSContext();
            CD         preferredLanguage = new CD();

            preferredLanguage.code        = "en";
            preferredLanguage.codeSystem  = "1.2.3";
            preferredLanguage.displayName = "English";
            cdsContext.cdsInformationRecipientPreferredLanguage = preferredLanguage;
            cdsInput.cdsContext = cdsContext;

            VMR vmr = new VMR();

            cdsInput.vmrInput = vmr;

            II vmrTemplateId = new II();

            vmrTemplateId.root = "2.16.840.1.113883.3.795.11.1.1";
            vmr.templateId     = new II[] { vmrTemplateId };

            EvaluatedPerson patient = new EvaluatedPerson();

            II personTemplateId = new II();

            personTemplateId.root = "2.16.840.1.113883.3.795.11.2.1.1";
            patient.templateId    = new II[] { personTemplateId };

            II id = new II();

            id.root      = "2.16.840.1.113883.3.795.12.100.11";
            id.extension = clientSystemPatientId;
            patient.id   = id;

            EvaluatedPersonDemographics demographics = new EvaluatedPersonDemographics();

            TS birthTime = new TS();

            birthTime.value        = "20110401";
            demographics.birthTime = birthTime;

            CD gender = new CD();

            gender.code         = "F";
            gender.codeSystem   = "2.16.840.1.113883.5.1";
            demographics.gender = gender;

            patient.demographics = demographics;
            vmr.patient          = patient;

            EvaluatedPersonClinicalStatements statements = new EvaluatedPersonClinicalStatements();

            patient.clinicalStatements = statements;

            SubstanceAdministrationEvent statement1 = getSubstanceAdministrationEvent("185", "20110430");
            SubstanceAdministrationEvent statement2 = getSubstanceAdministrationEvent("184", "20110523");
            SubstanceAdministrationEvent statement3 = getSubstanceAdministrationEvent("183", "20110721");
            SubstanceAdministrationEvent statement4 = getSubstanceAdministrationEvent("182", "20110911");
            SubstanceAdministrationEvent statement5 = getSubstanceAdministrationEvent("181", "20110912");

            statements.substanceAdministrationEvents = new SubstanceAdministrationEvent[] { statement1, statement2, statement3, statement4, statement5 };
            CDSOutput response = getResponse(cdsInput);

            processResponse(response);
        }
コード例 #3
0
        private static SubstanceAdministrationEvent getSubstanceAdministrationEvent(string clientImmunizationId, string administrationTime)
        {
            II statementTemplateId = new II();
            statementTemplateId.root = "2.16.840.1.113883.3.795.11.9.1.1";

            CD substanceAdminGeneralPurpose = new CD();
            substanceAdminGeneralPurpose.code = "384810002";
            substanceAdminGeneralPurpose.codeSystem = "2.16.840.1.113883.6.5";

            CD substanceCode = new CD();
            substanceCode.code = "08";
            substanceCode.codeSystem = "2.16.840.1.113883.12.292";

            II id = new II();
            id.root = "2.16.840.1.113883.3.795.12.100.10";
            id.extension = clientImmunizationId;

            SubstanceAdministrationEvent statement = new SubstanceAdministrationEvent();
            statement.templateId = new II[] { statementTemplateId };
            statement.id = id;
            statement.substanceAdministrationGeneralPurpose = substanceAdminGeneralPurpose;

            AdministrableSubstance substance = new AdministrableSubstance();
            II substanceId = new II();
            substanceId.root = System.Guid.NewGuid().ToString("D");
            substance.id = substanceId;

            substance.substanceCode = substanceCode;
            statement.substance = substance;

            IVL_TS administrationTimeInterval = new IVL_TS();
            administrationTimeInterval.high = administrationTime;
            administrationTimeInterval.low = administrationTime;
            statement.administrationTimeInterval = administrationTimeInterval;

            return statement;
        }