Changeset 2162


Ignore:
Timestamp:
Dec 9, 2013, 11:03:27 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #543: Different default values in 'Blood registration wizard' depending on site

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/personal/bloodform.jsp

    r2148 r2162  
    4242var patientInfo = null;
    4343var bloodInfo = null;
     44var siteInfo = null;
    4445var consentInfo = null;
    4546
     
    269270  var samplingTime = frm.samplingTime.value;
    270271 
     272  var isUppsala = siteInfo && siteInfo.prefix == '88';
     273 
    271274  if (samplingDate != '' || samplingTime != '')
    272275  {
     
    276279
    277280    samplingTime = autoFillTime(samplingTime);
     281    // Set sampling time to 0000 for Uppsala since it is not known
     282    if (!samplingTime && isUppsala) samplingTime = '0000';
    278283    frm.samplingTime.value = samplingTime;
    279284   
     
    283288      return;
    284289    }
    285     if (frm.freezerDate.value == '') frm.freezerDate.value = samplingDate;
     290   
     291    // Automatically fill in freezer date except for Uppsala since it is not known
     292    if (frm.freezerDate.value == '' && !isUppsala)
     293    {
     294      frm.freezerDate.value = samplingDate;
     295    }
    286296   
    287297    if (!Dates.isDate(samplingDate + ' ' + samplingTime, 'yyyyMMdd HHmm'))
     
    364374  patientInfo = response.patientInfo;
    365375  consentInfo = response.consentInfo;
     376  siteInfo = response.siteInfo;
    366377 
    367378  if (patientInfo)
     
    495506      Main.show("copyConsentSection");
    496507    }
     508  }
     509 
     510  // Special case for Uppsala
     511  if (siteInfo && siteInfo.prefix == '88')
     512  {
     513    // Plasm/serum check box should not be selected
     514    frm.serum.checked = false;
    497515  }
    498516 
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/BloodRegistrationServlet.java

    r2161 r2162  
    7373        String caseName = req.getParameter("caseName");
    7474        Site site = Site.findByCaseName(caseName);
     75        json.put("siteInfo", site.asJSONObject());
     76       
    7577        Blood blood = Blood.findByCaseName(dc, caseName, site.useCaseSuffixForPreNeoForms());
    7678        Patient patient = null;
Note: See TracChangeset for help on using the changeset viewer.