Esempio n. 1
0
        /// <summary>Gets from cache.  This will return null if no HL7defs are enabled.  Since only one can be enabled, this will return only the enabled one. No need to check RemotingRole, cache is filled by calling GetTableRemotelyIfNeeded.</summary>
        public static HL7Def GetOneDeepEnabled()
        {
            HL7Def retval = null;

            for (int i = 0; i < Listt.Count; i++)
            {
                if (Listt[i].IsEnabled)
                {
                    retval = Listt[i];
                }
            }
            if (retval == null)
            {
                return(null);
            }
            if (retval.IsInternal)             //if internal, messages, segments, and fields will not be in the database
            {
                GetDeepForInternal(retval);
            }
            else
            {
                retval.hl7DefMessages = HL7DefMessages.GetDeepFromCache(retval.HL7DefNum);
            }
            return(retval);
        }
Esempio n. 2
0
        ///<summary>Gets from cache.  If isMedLabHL7 is true, this will only return the enabled def if it is HL7InternalType.MedLabv2_3.
        ///If false, then only those defs not of that type.  This will return null if no HL7defs are enabled.  Since only one can be enabled,
        ///this will return only one.  No need to check RemotingRole, cache is filled by calling GetTableRemotelyIfNeeded.</summary>
        public static HL7Def GetOneDeepEnabled(bool isMedLabHL7)
        {
            HL7Def retval = GetFirstOrDefault(x => x.IsEnabled && isMedLabHL7 == (x.InternalType == HL7InternalType.MedLabv2_3));

            if (retval == null)
            {
                return(null);
            }
            if (retval.IsInternal)             //if internal, messages, segments, and fields will not be in the database
            {
                GetDeepForInternal(retval);
            }
            else
            {
                retval.hl7DefMessages = HL7DefMessages.GetDeepFromCache(retval.HL7DefNum);
            }
            return(retval);
        }