Changeset 1775


Ignore:
Timestamp:
Dec 11, 2012, 2:52:36 PM (11 years ago)
Author:
olle
Message:

Fixes #448. The blood registration form now accepts comments.

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

Legend:

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

    r1773 r1775  
    473473      Forms.selectListOption(frm.bloodSample, bloodInfo.bloodSample);
    474474    }
     475    if (bloodInfo.otherPathNote)
     476    {
     477      frm.otherPathNote.value = bloodInfo.otherPathNote;
     478    }
    475479  }
    476480  else
     
    519523  bloodInfo.serum = frm.serum.checked ? "Yes" : "No";
    520524  bloodInfo.bloodSample = frm.bloodSample[frm.bloodSample.selectedIndex].value;
     525  bloodInfo.otherPathNote = frm.otherPathNote.value;
    521526  if (frm.copyConsent.checked && frm.copyConsent.value)
    522527  {
     
    529534  frm.freezerTime.disabled = true;
    530535  frm.bloodSample.disabled = true;
     536  frm.otherPathNote.disabled = true;
    531537
    532538  var updateMode = bloodInfo.id;
     
    754760        <td class="prompt" id="bloodSample.prompt">Blood sample</td>
    755761        <td class="input" id="bloodSample.input">
    756           <select name="bloodSample">
     762          <select onkeypress="focusOnEnter(event, 'otherPathNote')"
     763            name="bloodSample"
     764          >
    757765            <option selected value="">unknown
    758766            <option value="PreNeo">PreNeo
     
    762770        <td class="status" id="bloodSample.status"></td>
    763771        <td class="help"><span id="bloodSample.message" class="message" style="display: none;"></span></td>
     772      </tr>
     773      <tr>
     774        <td class="prompt" id="otherPathNote.prompt">Other path note</td>
     775        <td class="input" id="otherPathNote.input"><textarea rows="3" cols="30"
     776          name="otherPathNote" value="" onkeypress="doOnTab(event, goNextAuto)"></textarea></td>
     777        <td class="status" id="otherPathNote.status"></td>
     778        <td class="help"><span id="otherPathNote.message" class="message" style="display: none;"></span></td>
    764779      </tr>
    765780      <tr id="copyConsentSection" style="display: none;">
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/BloodRegistrationServlet.java

    r1767 r1775  
    8686          blood.loadAnnotations(dc, "serum", Annotationtype.BLOOD_SERUM, null);
    8787          blood.loadAnnotations(dc, "bloodSample", Annotationtype.BLOOD_SAMPLE, null);
     88          blood.loadAnnotations(dc, "otherPathNote", Annotationtype.OTHER_PATH_NOTE, null);
    8889
    8990          // Wrap what we have so far up into JSON objects
     
    203204        Date freezerDate = Reggie.CONVERTER_STRING_TO_DATETIME.convert((String)jsonBlood.get("freezerDate"));
    204205        String bloodSample = Values.getStringOrNull((String)jsonBlood.get("bloodSample"));
     206        String otherPathNote = Values.getStringOrNull((String)jsonBlood.get("otherPathNote"));
    205207       
    206208        creationEvent.setEventDate(samplingDate);
     
    209211        Annotationtype.BLOOD_SERUM.setAnnotationValue(dc, blood, jsonBlood.get("serum"));
    210212        Annotationtype.BLOOD_SAMPLE.setAnnotationValue(dc, blood, bloodSample);
     213        Annotationtype.OTHER_PATH_NOTE.setAnnotationValue(dc, blood, otherPathNote);
    211214
    212215        Number copyConsentId = (Number)jsonBlood.get("copyConsent");
     
    238241        Date freezerDate = Reggie.CONVERTER_STRING_TO_DATETIME.convert((String)jsonBlood.get("freezerDate"));
    239242        String bloodSample = Values.getStringOrNull((String)jsonBlood.get("bloodSample"));
     243        String otherPathNote = Values.getStringOrNull((String)jsonBlood.get("otherPathNote"));
    240244       
    241245        blood.getCreationEvent().setEventDate(samplingDate);
     
    245249        Annotationtype.BLOOD_SERUM.setAnnotationValue(dc, blood, jsonBlood.get("serum"));
    246250        Annotationtype.BLOOD_SAMPLE.setAnnotationValue(dc, blood, bloodSample);
     251        Annotationtype.OTHER_PATH_NOTE.setAnnotationValue(dc, blood, otherPathNote);
    247252
    248253        jsonMessages.add("Blood '" + blood.getName() + "' updated successfully.");
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r1693 r1775  
    225225            Annotationtype.CONSENT, Annotationtype.CONSENT_DATE,
    226226            Annotationtype.BLOOD_SAMPLING_DATETIME, Annotationtype.BLOOD_FREEZER_DATETIME,
    227             Annotationtype.BLOOD_SERUM, Annotationtype.BLOOD_SAMPLE));
     227            Annotationtype.BLOOD_SERUM, Annotationtype.BLOOD_SAMPLE,
     228            Annotationtype.OTHER_PATH_NOTE));
    228229       
    229230        jsonChecks.add(checkAnnotationTypeCategory(dc, Subtype.SPECIMEN, createIfMissing,
Note: See TracChangeset for help on using the changeset viewer.