partial void OnTRChanging(TR? value);
partial void OnTR_SyphilisChanging(TR? value);
partial void OnTR_MalariaChanging(TR? value);
partial void OnTR_HBs_AgChanging(TR? value);
partial void OnTR_HCV_AbChanging(TR? value);
partial void OnTR_HIVChanging(TR? value);
public string Encode(string markerStr, TR tr) { if (!InfectiousMarker.IsValidate(markerStr)) throw new Exception("Invalid InfectiousMarker."); //There is no test result 'non' in ISBT 128. So change it to 'na' if (tr == TR.non) { tr = TR.na; } if (Coop == null) throw new Exception("Invalid Coop TestResult."); TR coopTR = Coop.Decode(markerStr); int value = value2TR.Where(r => r.Result == tr) .Join(Coop.value2TR.Where(r => r.Result == coopTR), r1 => r1.Value, r2 => r2.Value, (r1, r2) => r1.Value).FirstOrDefault(); return markerStr.Substring(0, Index) + value.ToString() + markerStr.Substring(Index + 1); }
public static TR GetDefault(string name) { TR tr = TRList.Where(r => r.Name == name.Trim()).FirstOrDefault(); return(tr == null ? na : tr); }