Changeset 1736
- Timestamp:
- Nov 16, 2012, 2:30:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/BloodRegistrationServlet.java
r1623 r1736 17 17 import net.sf.basedb.core.AnnotationType; 18 18 import net.sf.basedb.core.Application; 19 import net.sf.basedb.core.BioMaterialEvent; 19 20 import net.sf.basedb.core.BioSource; 20 21 import net.sf.basedb.core.DbControl; … … 195 196 blood.setItemSubtype(Subtype.BLOOD.load(dc)); 196 197 blood.setName(bloodName); 197 blood.getCreationEvent().setSource(patient); 198 BioMaterialEvent creationEvent = blood.getCreationEvent(); 199 creationEvent.setSource(patient); 198 200 dc.saveItem(blood); 199 201 … … 203 205 String bloodSample = Values.getStringOrNull((String)jsonBlood.get("bloodSample")); 204 206 205 if (samplingDate != null) Annotationtype.BLOOD_SAMPLING_DATETIME.setAnnotationValue(dc, blood, samplingDate); 206 if (freezerDate != null) Annotationtype.BLOOD_FREEZER_DATETIME.setAnnotationValue(dc, blood, freezerDate); 207 creationEvent.setEventDate(samplingDate); 208 Annotationtype.BLOOD_SAMPLING_DATETIME.setAnnotationValue(dc, blood, samplingDate); 209 Annotationtype.BLOOD_FREEZER_DATETIME.setAnnotationValue(dc, blood, freezerDate); 207 210 Annotationtype.BLOOD_SERUM.setAnnotationValue(dc, blood, jsonBlood.get("serum")); 208 211 Annotationtype.BLOOD_SAMPLE.setAnnotationValue(dc, blood, bloodSample); … … 237 240 String bloodSample = Values.getStringOrNull((String)jsonBlood.get("bloodSample")); 238 241 239 if (samplingDate != null) Annotationtype.BLOOD_SAMPLING_DATETIME.setAnnotationValue(dc, blood, samplingDate); 240 if (freezerDate != null) Annotationtype.BLOOD_FREEZER_DATETIME.setAnnotationValue(dc, blood, freezerDate); 242 blood.getCreationEvent().setEventDate(samplingDate); 243 244 Annotationtype.BLOOD_SAMPLING_DATETIME.setAnnotationValue(dc, blood, samplingDate); 245 Annotationtype.BLOOD_FREEZER_DATETIME.setAnnotationValue(dc, blood, freezerDate); 241 246 Annotationtype.BLOOD_SERUM.setAnnotationValue(dc, blood, jsonBlood.get("serum")); 242 247 Annotationtype.BLOOD_SAMPLE.setAnnotationValue(dc, blood, bloodSample);
Note: See TracChangeset
for help on using the changeset viewer.