Exemplo n.º 1
0
 public void UpdateHealthcard(HealthcardNumber hc, HealthcardDetail detail, IPersistenceContext context)
 {
     hc.Id = detail.Id;
     hc.AssigningAuthority = EnumUtils.GetEnumValue<InsuranceAuthorityEnum>(detail.AssigningAuthority, context);
     hc.VersionCode = detail.VersionCode;
     hc.ExpiryDate = detail.ExpiryDate;
 }
Exemplo n.º 2
0
        public HealthcardDetail CreateHealthcardDetail(HealthcardNumber healthcard)
        {
            if (healthcard == null)
                return new HealthcardDetail();

            return new HealthcardDetail(
                healthcard.Id,
                EnumUtils.GetEnumValueInfo(healthcard.AssigningAuthority),
                healthcard.VersionCode,
                healthcard.ExpiryDate);
        }
Exemplo n.º 3
0
		private static void TestHealthcard(HealthcardNumber healthcard, ref List<string> reasons)
		{
			if (healthcard == null)
			{
				reasons.Add(SR.AlertHealthcardMissing);
				return;
			}

			if (string.IsNullOrEmpty(healthcard.Id))
				reasons.Add(SR.AlertHealthcardIdMissing);

			if (healthcard.AssigningAuthority == null)
				reasons.Add(SR.AlertHealthcardAssigningAuthorityMissing);
		}