/// <summary> /// Creates the CDS rule. /// </summary> /// <returns>A CdsRule.</returns> public CdsRule CreateCdsRule() { var cdsRule = new CdsRule(); _cdsRuleRepository.MakePersistent(cdsRule); return(cdsRule); }
private bool MapProperties(CdsRule cdsRule, CdsRuleDto cdsRuleDto) { CodedConcept medicationCodedConcept = null; if (cdsRuleDto.MedicationCodedConcept != null) { medicationCodedConcept = new CodedConceptBuilder().WithCodedConceptDto(cdsRuleDto.MedicationCodedConcept); } CodedConcept problemCodedConcept = null; if (cdsRuleDto.ProblemCodedConcept != null) { problemCodedConcept = new CodedConceptBuilder().WithCodedConceptDto(cdsRuleDto.ProblemCodedConcept.ProblemCodeCodedConcept); } var labTestName = _dtoToDomainMappingHelper.MapLookupField <LabTestName> (cdsRuleDto.LabTestName); cdsRule.Rename(cdsRuleDto.Name); cdsRule.ReviseRecommendationNote(cdsRuleDto.RecommendationNote); cdsRule.ReviseMedicationCodedConcept(medicationCodedConcept); cdsRule.ReviseProblemCodedConcept(problemCodedConcept); cdsRule.ReviseLabTestName(labTestName); cdsRule.ReviseAge(cdsRuleDto.Age); cdsRule.ReviseValidLabOrderMonthCount(cdsRuleDto.ValidLabOrderMonthCount); return(true); }
/// <summary> /// Destroys the CDS rule. /// </summary> /// <param name="cdsRule">The CDS rule.</param> public void DestroyCdsRule(CdsRule cdsRule) { _cdsRuleRepository.MakeTransient(cdsRule); }
/// <summary> /// Destroys the CDS rule. /// </summary> /// <param name="cdsRule">The CDS rule.</param> public void DestroyCdsRule( CdsRule cdsRule ) { _cdsRuleRepository.MakeTransient ( cdsRule ); }
/// <summary> /// Creates the CDS rule. /// </summary> /// <returns>A CdsRule.</returns> public CdsRule CreateCdsRule() { var cdsRule = new CdsRule (); _cdsRuleRepository.MakePersistent ( cdsRule ); return cdsRule; }