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); }
/// <summary> /// This is the Create method. /// </summary> /// <param name="context">The job context.</param> public override void Finish(CDSContext context) { //throw new NotImplementedException("Initialize is not implemented in this CDS state"); }