///<summary>Replaces all clinic-level fields in ClearinghouseHq with non-blank fields ///from the clinic-level clearinghouse for the passed-in clinicNum. Non clinic-level fields are not replaced.</summary> public static Clearinghouse OverrideFields(Clearinghouse clearinghouseHq, long clinicNum) { //No need to check RemotingRole; no call to db. Clearinghouse clearinghouseClin = Clearinghouses.GetForClinic(clearinghouseHq, clinicNum); return(OverrideFields(clearinghouseHq, clearinghouseClin)); }
///<summary>Replaces all clinic-level fields in ClearinghouseHq with non-blank fields ///from the clinic-level clearinghouse for the passed-in clinicNum. Non clinic-level fields are not replaced. ///If Clinics are disabled, uses clearinghouseHq settings.</summary> public static Clearinghouse OverrideFields(Clearinghouse clearinghouseHq, long clinicNum) { //No need to check RemotingRole; no call to db. //Do not use given clinicNum when clinics are disabled. //Otherwise clinic level clearinghouse settings that were set when clinics were enabled would be used //and user would have no way of fixing them unless they turned clinics back on. //Use unassigned settings since they are what show in the UI when editing clearinghouse settings. clinicNum = (PrefC.HasClinicsEnabled?clinicNum:0); Clearinghouse clearinghouseClin = Clearinghouses.GetForClinic(clearinghouseHq, clinicNum); return(OverrideFields(clearinghouseHq, clearinghouseClin)); }