Changeset 2250


Ignore:
Timestamp:
Feb 25, 2014, 12:39:41 PM (9 years ago)
Author:
olle
Message:

Refs #581. Monthly operation list export updated to only include patients for sites belonging to "RCC syd" (Regionalt Cancercentrum syd) in the list:

  1. JSP script export_monthly_oplist.jsp in reggie/resources/personal/ updated to display a note, that only patients for sites belonging to "RCC syd" will be included in the generated list.
  2. Class/file Site.java in reggie/src/net/sf/basedb/reggie/ updated with a new boolean flag attribute partOfRCC_syd, indicating whether the site is part of "RCC syd", or not.
  3. Java servlet ExportServlet.java in reggie/src/net/sf/basedb/reggie/servlet/ updated to only include sites, for which the new flag attribute partOfRCC_syd has value true.
Location:
extensions/net.sf.basedb.reggie/trunk
Files:
3 edited

Legend:

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

    r2217 r2250  
    245245          </select>
    246246        </td>
    247         <td class="help"><span id="time.message" class="message" style="display: none;"></span></td>
     247        <td class="help">Only patients belonging to "RCC syd" will be included.<span id="time.message" class="message" style="display: none;"></span></td>
    248248      </tr>
    249249     
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/Site.java

    r2016 r2250  
    1818  private static final Map<String, Site> sites = new HashMap<String, Site>();
    1919
    20   public static final Site LUND         = new Site("11", "Lund", "2010-11-10", true);
    21   public static final Site HELSINGBORG  = new Site("22", "Helsingborg", "2010-11-01", true);
    22   public static final Site HALMSTAD     = new Site("33", "Halmstad", "2010-10-01", true);
    23   public static final Site KRISTIANSTAD = new Site("44", "Kristianstad", "2010-09-15", true);
    24   public static final Site KARLSKRONA   = new Site("55", "Karlskrona", "2010-10-04", true);
    25   public static final Site VÄXJÖ        = new Site("66", "Växjö", "2010-10-01", true);
    26   public static final Site MALMÖ        = new Site("77", "Malmö", "2010-08-30", true);
    27   public static final Site UPPSALA      = new Site("88", "Uppsala", "2013-10-01", true);
     20  public static final Site LUND         = new Site("11", "Lund", "2010-11-10", true, true);
     21  public static final Site HELSINGBORG  = new Site("22", "Helsingborg", "2010-11-01", true, true);
     22  public static final Site HALMSTAD     = new Site("33", "Halmstad", "2010-10-01", true, true);
     23  public static final Site KRISTIANSTAD = new Site("44", "Kristianstad", "2010-09-15", true, true);
     24  public static final Site KARLSKRONA   = new Site("55", "Karlskrona", "2010-10-04", true, true);
     25  public static final Site VÄXJÖ        = new Site("66", "Växjö", "2010-10-01", true, true);
     26  public static final Site MALMÖ        = new Site("77", "Malmö", "2010-08-30", true, true);
     27  public static final Site UPPSALA      = new Site("88", "Uppsala", "2013-10-01", true, false);
    2828 
    29   public static final Site UNKNOWN      = new Site(null, "Unknown", null, false);
     29  public static final Site UNKNOWN      = new Site(null, "Unknown", null, false, false);
    3030 
    3131  /**
     
    5353  private final String startDate;
    5454  private final boolean useCaseSuffix;
     55  private final boolean partOfRCC_syd;
    5556  private JSONObject json;
    5657 
    57   private Site(String prefix, String name, String startDate, boolean useCaseSuffix)
     58  private Site(String prefix, String name, String startDate, boolean useCaseSuffix, boolean partOfRCC_syd)
    5859  {
    5960    this.prefix = prefix;
     
    6162    this.startDate = startDate;
    6263    this.useCaseSuffix = useCaseSuffix;
     64    this.partOfRCC_syd = partOfRCC_syd;
    6365    if (prefix != null) sites.put(prefix, this);
    6466  }
     
    98100    return useCaseSuffix;
    99101  }
     102
     103  /**
     104      Get flag indicating whether site belongs to "RCC syd" (Regionalt Cancercentrum syd)
     105   */
     106  public boolean isPartOfRCC_syd()
     107  {
     108    return partOfRCC_syd;
     109  }
    100110 
    101111  /**
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/ExportServlet.java

    r2219 r2250  
    171171                    // Finally, we now have the information that should be exported
    172172                    Site site = Site.findByCaseName(s.getName());
    173                     String laterality = (String)Annotationtype.LATERALITY.getAnnotationValue(dc, manager, theCase);
    174                     String consent = (String)Annotationtype.CONSENT.getAnnotationValue(dc, manager, theCase);
    175                     String opDate = dateFormat.format(s.getCreationEvent().getEventDate());
    176                     String subtype = exportSubtype ? s.getItemSubtype().getName() : null;
    177                     String patientId = exportPatientId ? patient.getName() : null;
    178                     String caseName = caseNamePattern.matcher(s.getName()).replaceFirst("");
    179                     opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName, consent, patientId));
     173                    // Only include sites belonging to "RCC syd" (Regionalt Cancercentrum syd)
     174                    if (site.isPartOfRCC_syd())
     175                    {
     176                      String laterality = (String)Annotationtype.LATERALITY.getAnnotationValue(dc, manager, theCase);
     177                      String consent = (String)Annotationtype.CONSENT.getAnnotationValue(dc, manager, theCase);
     178                      String opDate = dateFormat.format(s.getCreationEvent().getEventDate());
     179                      String subtype = exportSubtype ? s.getItemSubtype().getName() : null;
     180                      String patientId = exportPatientId ? patient.getName() : null;
     181                      String caseName = caseNamePattern.matcher(s.getName()).replaceFirst("");
     182                      opDates.add(new PersonalOpDate(pnr, opDate, site, laterality, subtype, caseName, consent, patientId));
     183                    }
    180184                  }
    181185                }
Note: See TracChangeset for help on using the changeset viewer.