Ignore:
Timestamp:
Jun 21, 2012, 6:15:08 PM (12 years ago)
Author:
Sam Habiel
Message:

CGView.cs: modified IsThisARadiologyResource to handle the possibility of Unlinked Resources (not linked to PIMS).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/branches/BMX4Support/CGView.cs

    r1194 r1453  
    15641564        private bool IsThisARadiologyResource(string sResource)
    15651565        {
     1566            //smh - change in v 1.7... if the resource is not linked to a PIMS clinic, this method fails.
     1567            //This happens if there is just one resource that is not linked, which makes it impossible to
     1568            //make any appointments, because this method gets called at any time a menu is opened.
     1569            //So we change res.Field<int> to res.Field<int?>
     1570           
    15661571            // see if resource is mapped to a Radiology Hospital Location.
    15671572            return (   //select all Hospital Locations which are radiology locations
     
    15701575                       //join this to the resources table using the foreign ID (plain jane relational join)
    15711576                       join res in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
    1572                        on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int>("HOSPITAL_LOCATION_ID")
     1577                       //on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int>("HOSPITAL_LOCATION_ID") //change in 1.7
     1578                       on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int?>("HOSPITAL_LOCATION_ID")
    15731579                       //then filter this down to the resource that we have
    15741580                       where res.Field<string>("RESOURCE_NAME") == sResource
Note: See TracChangeset for help on using the changeset viewer.