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; }
public HealthcardDetail CreateHealthcardDetail(HealthcardNumber healthcard) { if (healthcard == null) return new HealthcardDetail(); return new HealthcardDetail( healthcard.Id, EnumUtils.GetEnumValueInfo(healthcard.AssigningAuthority), healthcard.VersionCode, healthcard.ExpiryDate); }
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); }