internal static OracleDynamicParameters GetTextTemplateSaveUpdateQueryParams(TextTemplateDTO textTemplate) { OracleDynamicParameters dynamicParameters = new OracleDynamicParameters(); var isactive = textTemplate.IsActive ? 1 : 0; var isAttachPSSLink = textTemplate.AttachPSSLink ? 1 : 0; var isVideoAppoinment = textTemplate.IsVideoAppoinment ? 1 : 0; var levelOfCareParam = AssocativeArraysConverter .ConvertCollectionToPLSQLAssociativeArray(textTemplate.OfficialLevelOfCare, "p_offLevelOfCare"); var contactTypeParam = AssocativeArraysConverter .ConvertCollectionToPLSQLAssociativeArray(textTemplate.ContactType, "p_contactType"); dynamicParameters.AddDynamicParams(levelOfCareParam); dynamicParameters.AddDynamicParams(contactTypeParam); dynamicParameters.Add("p_oldSMSTextID", GuidConvert.ToRaw(textTemplate.TemplateGUID), OracleMappingType.Raw, ParameterDirection.Input); dynamicParameters.Add("p_ruleSetGuid", GuidConvert.ToRaw(textTemplate.RuleSetGUID), OracleMappingType.Raw, ParameterDirection.Input); dynamicParameters.Add("p_hospitalID", textTemplate.HospitalID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_departmentID", textTemplate.DepartmentID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_OPDID", textTemplate.OPDID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_locationID", textTemplate.LocationID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_sectionID", textTemplate.SectionID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_wardID", textTemplate.WardID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_SMSTextName", textTemplate.Name, OracleMappingType.Varchar2, ParameterDirection.Input); dynamicParameters.Add("p_SMSText", textTemplate.SMSText, OracleMappingType.Varchar2, ParameterDirection.Input); dynamicParameters.Add("p_SMSTextTempID", GuidConvert.ToRaw(textTemplate.GroupedTextGUID), OracleMappingType.Raw, ParameterDirection.Input); dynamicParameters.Add("p_validFrom", textTemplate.ValidFrom, OracleMappingType.Date, ParameterDirection.Input); dynamicParameters.Add("p_validTo", textTemplate.ValidTo, OracleMappingType.Date, ParameterDirection.Input); dynamicParameters.Add("p_isActive", isactive, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("p_sendPSSLink", isAttachPSSLink, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("p_isVideoCall", isVideoAppoinment, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("l_SMSTEXTID", null, OracleMappingType.Raw, ParameterDirection.ReturnValue, 16); return(dynamicParameters); }
internal static OracleDynamicParameters getQPForCreateORUpdateRuleSet(RuleSetDTO ruleSetDTO) { var isactive = (ruleSetDTO.IsActive ? 1 : 0); var isValidateAptTime = (ruleSetDTO.isValidateAptTime ? 1 : 0); var sendSMSIfAdmitted = (ruleSetDTO.IgnoreSMStoAdmittedPatient ? 1 : 0); OracleDynamicParameters dynamicParameters = AssocativeArraysConverter .ConvertCollectionToPLSQLAssociativeArray(ruleSetDTO.ExcludingOrgUnitIDs, "p_excludedReshIDs"); dynamicParameters.Add("p_oldRulesetGuid", GuidConvert.ToRaw(ruleSetDTO.RuleSetGUID), OracleMappingType.Raw, ParameterDirection.Input); dynamicParameters.Add("p_hospitalID", ruleSetDTO.HospitalID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_departmentID", ruleSetDTO.DepartmentID, OracleMappingType.Long, ParameterDirection.Input); dynamicParameters.Add("p_ruleSetName", ruleSetDTO.Name, OracleMappingType.Varchar2, ParameterDirection.Input, 0, true, 9, 0, String.Empty, DataRowVersion.Current); dynamicParameters.Add("p_sendBeforeDays", ruleSetDTO.SendSMSBeforeDays, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("p_retryExpireDays", ruleSetDTO.DaysForRetryExpiry, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("p_validateAptTime", isValidateAptTime, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("p_validAptFromTime", ruleSetDTO.AptValidate_From, OracleMappingType.Varchar2, ParameterDirection.Input, 0, true, 9, 0, String.Empty, DataRowVersion.Current); dynamicParameters.Add("p_validAptToTime", ruleSetDTO.AptValidate_To, OracleMappingType.Varchar2, ParameterDirection.Input, 0, true, 9, 0, String.Empty, DataRowVersion.Current); dynamicParameters.Add("p_validFrom", ruleSetDTO.ValidFrom, OracleMappingType.TimeStamp, ParameterDirection.InputOutput, 25); dynamicParameters.Add("p_validTo", ruleSetDTO.ValidTo, OracleMappingType.TimeStamp, ParameterDirection.InputOutput, 25); dynamicParameters.Add("p_timeWindowFrom", ruleSetDTO.SendingTimeWindowFrom, OracleMappingType.Varchar2, ParameterDirection.Input, 0, true, 9, 0, String.Empty, DataRowVersion.Current); dynamicParameters.Add("p_timeWindowTo", ruleSetDTO.SendingTimeWindowTo, OracleMappingType.Varchar2, ParameterDirection.Input, 0, true, 9, 0, String.Empty, DataRowVersion.Current); dynamicParameters.Add("p_sendBefore", ruleSetDTO.SendSMSBeforeInMins, OracleMappingType.Int16, ParameterDirection.Input, 0, true, 9, 0, String.Empty, DataRowVersion.Current); dynamicParameters.Add("p_isActive", isactive, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("p_ignoreForAdmitted", sendSMSIfAdmitted, OracleMappingType.Int16, ParameterDirection.Input); dynamicParameters.Add("l_ruleSetGuid", null, OracleMappingType.Raw, ParameterDirection.ReturnValue, 16); return(dynamicParameters); }