Changeset 1740


Ignore:
Timestamp:
Nov 22, 2012, 7:57:07 AM (9 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #431: Add option for exporting PAT-id in the montly operation list

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

Legend:

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

    r1721 r1740  
    4141  url += '&time=' + frm.time.value;
    4242  url += '&exportSubtype='+(frm.exportSubtype.checked ? 1 : 0);
     43  url += '&exportPatientId='+(frm.exportPatientId.checked ? 1 : 0);
    4344  if (preview)
    4445  {
     
    128129{
    129130  position: absolute;
    130   top: 9em;
     131  top: 11em;
    131132  bottom: 1em;
    132133  left: 20px;
     
    229230      </tr>
    230231     
    231       <tr>
     232      <tr style="vertical-align: top;">
    232233        <td class="prompt">Optional columns</td>
    233234        <td class="input">
    234235          <input type="checkbox" name="exportSubtype" value="1" id="exportSubtype">
    235           <label for="exportSubtype">Specimen/NoSpecimen</label>
     236          <label for="exportSubtype">Specimen/NoSpecimen</label><br>
     237          <input type="checkbox" name="exportPatientId" value="1" id="exportPatientId">
     238          <label for="exportPatientId">Patient ID</label>
    236239        </td>
    237240        <td class="help"><span id="subtype.message" class="message" style="display: none;"></span></td>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/ExportServlet.java

    r1721 r1740  
    6060      {
    6161        boolean exportSubtype = Values.getBoolean(req.getParameter("exportSubtype"));
     62        boolean exportPatientId = Values.getBoolean(req.getParameter("exportPatientId"));
    6263       
    6364        // This can be any time point in the desired month/year
     
    142143                  String opDate = dateFormat.format(s.getCreationEvent().getEventDate());
    143144                  String subtype = exportSubtype ? s.getItemSubtype().getName() : null;
     145                  String patientId = exportPatientId ? patient.getName() : null;
    144146                  String caseName = caseNamePattern.matcher(s.getName()).replaceFirst("");
    145                   opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName, consent));
     147                  opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName, consent, patientId));
    146148                }
    147149              }
     
    155157        resp.setCharacterEncoding("UTF-8");
    156158        PrintWriter os = resp.getWriter();
    157        
    158159        for (PersonalOpDate pop : opDates)
    159160        {
     
    188189    private final String caseName;
    189190    private final String consent;
    190    
    191     PersonalOpDate(String pnr, String opDate, Site site, String laterality, String subtype, String caseName, String consent)
     191    private final String patientId;
     192   
     193    PersonalOpDate(String pnr, String opDate, Site site, String laterality, String subtype, String caseName, String consent, String patientId)
    192194    {
    193195      this.pnr = pnr;
     
    198200      this.caseName = caseName;
    199201      this.consent = consent;
     202      this.patientId = patientId;
    200203    }
    201204   
     
    203206    public String toString()
    204207    {
    205       return pnr + "\t" + caseName + "\t" + opDate + "\t" +
    206           (laterality == null ? "" : laterality) + "\t" +
    207           site.getName() +
    208           (subtype==null ? "" : "\t" + subtype) + "\t" +
    209           (consent == null ? "MISSING" : consent.toUpperCase());
     208      return pnr + "\t" + caseName + "\t" + opDate +
     209          "\t" + (laterality == null ? "" : laterality) +
     210          "\t" + site.getName() +
     211          (subtype==null ? "" : "\t" + subtype) +
     212          (patientId==null ? "" : "\t"+patientId)+
     213          "\t" + (consent == null ? "MISSING" : consent.toUpperCase());
    210214    }
    211215
Note: See TracChangeset for help on using the changeset viewer.