コード例 #1
0
        /// <summary>
        /// Creates the CDS rule.
        /// </summary>
        /// <returns>A CdsRule.</returns>
        public CdsRule CreateCdsRule()
        {
            var cdsRule = new CdsRule();

            _cdsRuleRepository.MakePersistent(cdsRule);
            return(cdsRule);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 /// <summary>
 /// Destroys the CDS rule.
 /// </summary>
 /// <param name="cdsRule">The CDS rule.</param>
 public void DestroyCdsRule(CdsRule cdsRule)
 {
     _cdsRuleRepository.MakeTransient(cdsRule);
 }
コード例 #4
0
ファイル: CdsRuleFactory.cs プロジェクト: divyang4481/REM
 /// <summary>
 /// Destroys the CDS rule.
 /// </summary>
 /// <param name="cdsRule">The CDS rule.</param>
 public void DestroyCdsRule( CdsRule cdsRule )
 {
     _cdsRuleRepository.MakeTransient ( cdsRule );
 }
コード例 #5
0
ファイル: CdsRuleFactory.cs プロジェクト: divyang4481/REM
 /// <summary>
 /// Creates the CDS rule.
 /// </summary>
 /// <returns>A CdsRule.</returns>
 public CdsRule CreateCdsRule()
 {
     var cdsRule = new CdsRule ();
     _cdsRuleRepository.MakePersistent ( cdsRule );
     return cdsRule;
 }