Changeset 1428
- Timestamp:
- Oct 31, 2011, 8:47:45 AM (12 years ago)
- Location:
- extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/dao/Patient.java
r1424 r1428 102 102 loadAnnotations(dc, "gender", Reggie.ANNOTATION_GENDER, null); 103 103 loadAnnotations(dc, "dateOfBirth", Reggie.ANNOTATION_DATE_OF_BIRTH, new DateToStringConverter(new SimpleDateFormat("yyyy-MM-dd"))); 104 /*105 // Date-of-birth need special handling for formatting106 AnnotationType dateOfBirthType = Reggie.findAnnotationType(dc, Item.BIOSOURCE, Reggie.ANNOTATION_DATE_OF_BIRTH, true);107 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");108 String dateOfBirth = df.format((Date)Reggie.getAnnotationValue(getBioSource(), dateOfBirthType));109 setAnnotation("dateOfBirth", dateOfBirth);110 */111 112 104 } 113 105 -
extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/servlet/ConsentFormServlet.java
r1368 r1428 26 26 import net.sf.basedb.reggie.dao.Case; 27 27 import net.sf.basedb.reggie.dao.SpecimenTube; 28 import net.sf.basedb.reggie.dao.Subtype; 28 29 import net.sf.basedb.util.Values; 29 30 import net.sf.basedb.util.error.ThrowableUtil; … … 162 163 String caseName = (String)jsonCase.get("name"); 163 164 theCase = Sample.getNew(dc); 165 theCase.setItemSubtype(Subtype.CASE.load(dc)); 164 166 theCase.setName(caseName); 165 167 if ("Not asked".equals(consent)) -
extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/servlet/PartitionRegistrationServlet.java
r1424 r1428 28 28 import net.sf.basedb.reggie.Reggie; 29 29 import net.sf.basedb.reggie.converter.StringToDateConverter; 30 import net.sf.basedb.reggie.dao.Case;31 30 import net.sf.basedb.reggie.dao.SpecimenTube; 31 import net.sf.basedb.reggie.dao.Subtype; 32 32 import net.sf.basedb.util.Values; 33 33 import net.sf.basedb.util.error.ThrowableUtil; … … 160 160 { 161 161 Extract lysExtract = specimen.newExtract(apWeight); 162 lysExtract.setItemSubtype(Subtype.LYSATE.load(dc)); 162 163 lysExtract.setName(specimen.getName()+".l"); 163 164 dc.saveItem(lysExtract); … … 201 202 { 202 203 hisSample = Sample.getNew(dc); 204 hisSample.setItemSubtype(Subtype.HISTOLOGY.load(dc)); 203 205 hisSample.setName(specimen.getName() + ".his"); 204 206 dc.saveItem(hisSample); -
extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/servlet/PersonalRegistrationServlet.java
r1424 r1428 36 36 import net.sf.basedb.reggie.dao.Patient; 37 37 import net.sf.basedb.reggie.dao.SpecimenTube; 38 import net.sf.basedb.reggie.dao.Subtype; 38 39 import net.sf.basedb.util.MD5; 39 40 import net.sf.basedb.util.Values; … … 276 277 // Create new patient 277 278 patient = BioSource.getNew(dc); 279 patient.setItemSubtype(Subtype.PATIENT.load(dc)); 278 280 patient.setName((String)jsonPat.get("name")); 279 281 String pnr = (String)jsonPat.get("personalNumber"); … … 329 331 // Register a new case 330 332 theCase = Sample.getNew(dc); 333 theCase.setItemSubtype(Subtype.CASE.load(dc)); 331 334 theCase.setName(originalCaseName); 332 335 if (laterality != null) -
extensions/net.sf.basedb.reggie/branches/2.0-dev/src/net/sf/basedb/reggie/servlet/SpecimenTubeServlet.java
r1424 r1428 29 29 import net.sf.basedb.reggie.dao.Case; 30 30 import net.sf.basedb.reggie.dao.SpecimenTube; 31 import net.sf.basedb.reggie.dao.Subtype; 31 32 import net.sf.basedb.util.Values; 32 33 import net.sf.basedb.util.error.ThrowableUtil; … … 264 265 JSONObject jsonSpec = (JSONObject)jsonSpecimen.get(i); 265 266 Sample specimen = Sample.getNew(dc); 267 specimen.setItemSubtype(Subtype.SPECIMEN.load(dc)); 266 268 specimen.setName((String)jsonSpec.get("name")); 267 269 dc.saveItem(specimen);
Note: See TracChangeset
for help on using the changeset viewer.