You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(21) |
May
(11) |
Jun
(81) |
Jul
|
Aug
|
Sep
|
Oct
(23) |
Nov
(1) |
Dec
(2) |
|---|
|
From: Johan T. <jt...@us...> - 2006-12-02 23:06:13
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22941/source/se/biobanksregistersyd/vienti/datasources Modified Files: DsRandomdata_RBBR.java Log Message: Make the generation of files work again, though lots of tweaking can and should be done on the values and frequency of them. Lots of code copied from DsSympathy_RBBR. Index: DsRandomdata_RBBR.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources/DsRandomdata_RBBR.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- DsRandomdata_RBBR.java 2 Dec 2006 22:28:59 -0000 1.16 +++ DsRandomdata_RBBR.java 2 Dec 2006 23:06:11 -0000 1.17 @@ -24,6 +24,11 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.17 2006/12/02 23:06:11 jtorin + ** Make the generation of files work again, though lots of tweaking can and + ** should be done on the values and frequency of them. Lots of code copied + ** from DsSympathy_RBBR. + ** ** Revision 1.16 2006/12/02 22:28:59 jtorin ** Code style fixes. ** @@ -98,16 +103,24 @@ import se.biobanksregistersyd.vienti.CurrentContext; import se.biobanksregistersyd.vienti.ParameterException; +import se.biobanksregistersyd.vienti.ParameterExceptionEnum; +import se.biobanksregistersyd.vienti.Parameters; import se.biobanksregistersyd.vienti.datafiles.Datafile; import se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR; import se.biobanksregistersyd.vienti.datafiles.GenerationException; /** - * A class that generates random data in the RBBR10 format. + * A class that generates random data in the RBBR02 format. * * @author johant */ public class DsRandomdata_RBBR extends DsRandomdata { + /** Updated by CVS. Don't edit manually. */ + private static final String CVSREVISION = "$Revision$"; + + /** Class revision from CVS as a string. */ + private String revision = null; + /** Current classname. * "se.biobanksregistersyd.vienti.datasource.DsRandomdata_RBBR" */ private static final String CLASSNAME @@ -122,6 +135,17 @@ private final String companionDatafile = "se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR"; + /** The id of the sample collection. See note in constructor. */ + private String sampleCollectionId = null; + + /** + * Describes if the sample collection is complete (true) or partial (false). + */ + private Boolean complete = null; + + /** The number of samples written to the <code>Datafile</code>. */ + private int numberOfExportedSamples = 0; + /** * Creates a <code>DsRandomdata_RBBR</code> object and loads neccesary * properties to set it up correctly. Constructors in subclasses should call @@ -131,8 +155,13 @@ * to construct names of properties. <p/> The following properties may be * loaded when this class is instantiated. <p/> * <dl> - * <dt> (None) - * <dd> + * <dt> <prefix>.<classname>.sampleCollection + * <dd> A unique identifier for a sample collection (allotted by RBBR in + * Sweden). This should preferably be choosen so it does not collide with + * an existing real sample collection. + * <dt> <prefix>.<classname>.complete + * <dd> (optional) A specifier that tells if the transfer is complete or + * partial. * </dl> * * @param datafileIn @@ -152,6 +181,31 @@ public DsRandomdata_RBBR(final Datafile datafileIn) throws GatheringException, ParameterException { super(datafileIn); + + // Elicit the revisionnumber from the CVS revision keyword string. + revision = CVSREVISION.substring("$Revision: ".length()); + revision = revision.substring(0, revision.length() - 2); + + String tmpPropertyName, tmp; + + tmpPropertyName = getPropertyPrefix() + "." + CLASSNAME + + ".sampleCollectionId"; + sampleCollectionId = Parameters.getProperty(tmpPropertyName); + if (sampleCollectionId == null) { + throw new ParameterException( + ParameterExceptionEnum.PROPERTY_NOT_SPECIFIED, + "Property name: " + tmpPropertyName); + } + + tmpPropertyName = getPropertyPrefix() + "." + CLASSNAME + ".complete"; + tmp = Parameters.getProperty(tmpPropertyName); + if (tmp == null) { + // Default value is false. + complete = Boolean.FALSE; + } else { + complete = Boolean.valueOf(tmp); + } + } /** @@ -198,6 +252,13 @@ DfXML_RBBR df = (DfXML_RBBR) getDatafile(); + df.open(); + String comment = "Information created artificially by '" + CLASSNAME + + "', revision " + revision + "."; + // TODO Create or load start and end date? + df.writeHeader(comment, "fake start date", "fake end date"); + df.writeStartSampleCollection(sampleCollectionId, complete); + Hashtable dataset = new Hashtable(); logger.info("Quantity: " + getQuantity()); @@ -286,14 +347,16 @@ dataset.put("rbbr:biobankValues", biobankvalues); df.writeEntry(dataset); + numberOfExportedSamples += 1; } - // xmlg.writeEndSampleCollection(); - // xmlg.writeFooter(); - - logger.info("Random data generation ok"); + df.writeEndSampleCollection(); + df.writeFooter(); + logger.info("Number of created sample records: " + + Integer.toString(numberOfExportedSamples)); df.close(); + } /** |
|
From: Johan T. <jt...@us...> - 2006-12-02 22:29:01
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7959/source/se/biobanksregistersyd/vienti/datasources Modified Files: DsRandomdata_RBBR.java Log Message: Code style fixes. Index: DsRandomdata_RBBR.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources/DsRandomdata_RBBR.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- DsRandomdata_RBBR.java 20 Jun 2006 14:24:29 -0000 1.15 +++ DsRandomdata_RBBR.java 2 Dec 2006 22:28:59 -0000 1.16 @@ -24,9 +24,12 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.16 2006/12/02 22:28:59 jtorin + ** Code style fixes. + ** ** Revision 1.15 2006/06/20 14:24:29 amijdema - ** Removed the inline class CurrentClassGetter. Now they use CurrentContext.java - ** in its place. + ** Removed the inline class CurrentClassGetter. Now they use + ** CurrentContext.java in its place. ** ** Revision 1.14 2006/06/19 16:17:19 jtorin ** Reformat code according to style. Mega Commiten 2. @@ -105,17 +108,19 @@ * @author johant */ public class DsRandomdata_RBBR extends DsRandomdata { - /** Current classname. + /** Current classname. * "se.biobanksregistersyd.vienti.datasource.DsRandomdata_RBBR" */ - private static final String CLASSNAME = CurrentContext.getCurrentClassName(); - - /** log4j. */ + private static final String CLASSNAME + = CurrentContext.getCurrentClassName(); + + /** log4j. */ private static Logger logger = Logger.getLogger(CLASSNAME); /** * The name of the class that this Datasource is supposed to work with. */ - private final String companionDatafile = "se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR"; + private final String companionDatafile + = "se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR"; /** * Creates a <code>DsRandomdata_RBBR</code> object and loads neccesary @@ -209,10 +214,7 @@ randomDate((long) (x * 1.6)))); dataset.put("base:arrivalDate", new String( randomDate((long) (x * 1.61)))); - dataset.put("rbbr:sampleOrderingUnit", new String("MAKAHJ")); // Get - // syntax - // for - // this + dataset.put("rbbr:sampleOrderingUnit", new String("MAKAHJ")); dataset.put("rbbr:sampleOrderingUnitType", new String( "rbbr:sampleOrderingUnitMG")); dataset.put("rbbr:sampleOrderer", new String(randomName())); @@ -294,27 +296,52 @@ df.close(); } + /** + * Creates a pseudo person number from a date in numerical format. + * + * @param x a <code>long</code> with a date in milliseconds since the + * start of the epoch. + * @return a <code>String</code> with a pseudo person number. + */ private String randomPno(final long x) { - Format formatter; Date randomDate = new Date(x); - formatter = new SimpleDateFormat("yyyyMMdd" + "9999"); + Format formatter = new SimpleDateFormat("yyyyMMdd" + "9999"); return formatter.format(randomDate); } + /** + * Formats a date as a <code>String</code> from its numerical format. + * + * @param x a <code>long</code> with a date in milliseconds since the + * start of the epoch. + * @return a <code>String</code> with the date as a <code>String</code>. + */ private String randomDate(final long x) { Date randomDate = new Date((long) (x)); - Format formatter; - formatter = new SimpleDateFormat("yyyy-MM-dd"); + Format formatter = new SimpleDateFormat("yyyy-MM-dd"); return formatter.format(randomDate); } + /** + * Creates an artifical sample id. + * + * @param x a <code>long</code> with a date in milliseconds since the + * start of the epoch. + * @param i a <code>int</code> with a serial number for the id. + * @return a <code>String</code> with a created sample id. + */ private String randomMainSampleId(final long x, final int i) { Date randomDate = new Date((long) (x)); - Format formatter; - formatter = new SimpleDateFormat("yyyy"); + Format formatter = new SimpleDateFormat("yyyy"); return formatter.format(randomDate) + "-" + i; } + /** + * Builds an pseudo artifical person name. + * + * @return a <code>String</code> with a name that a person + * could have. + */ private String randomName() { String[] fName = { "Emma", "Agnes", "Maja", "Alexandra", "Julia", "Alicia", "Ida", "Alma", "Linnéa", "Alva", "Elin" }; @@ -327,6 +354,11 @@ + lName[(int) (Math.random() * fName.length)]; } + /** + * Returns a random vital status. + * + * @return a <code>String</code> with a random vital status. + */ private String randomVitalStatus() { if (((int) (Math.random() * 2)) > 0) { return "ALIVE"; @@ -335,24 +367,41 @@ } } + /** + * Returns a random preparation result. + * + * @return a <code>String</code> with a random preparation result. + */ private String randomPreparationResult() { String[] preparationResult = { "WHOLE_BLOOD", "PLASMA", "SERUM", "DNA", "RNA", "PROTEIN", "LIPID", "CARBOHYDRATE", "EDTA-PLASMA", "HEPARIN-PLASMA", "CITRATED-PLASMA", "LIQUOR", "UNSPECIFIED" }; - return preparationResult[(int) (Math.random() * preparationResult.length)]; + return preparationResult[(int) (Math.random() + * preparationResult.length)]; } + /** + * Returns a random storage form. + * + * @return a <code>String</code> with a random storage form. + */ private String randomStorageForm() { String[] storageForm = { "FREEZED", "FREEZE-DRIED", "SPECIMEN_SLIDE", "PARAFFIN_BLOCK" }; return storageForm[(int) (Math.random() * storageForm.length)]; } + /** + * Returns a random storage temperature. + * + * @return a <code>String</code> with a random storage temperature. + */ private String randomStorageTemperature() { String[] storageTemperature = { "ROOM_TEMPERATURE", "COLD_ROOM", "FREEZER_-20DEGC", "FREEZER_-70DEGC", "FREEZER_-140DEGC", "FREEZE-DRIED", "LIQUID_NITROGEN" }; - return storageTemperature[(int) (Math.random() * storageTemperature.length)]; + return storageTemperature[(int) (Math.random() + * storageTemperature.length)]; } /** |
|
From: Johan T. <jt...@us...> - 2006-11-20 08:34:51
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datafiles In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv783/source/se/biobanksregistersyd/vienti/datafiles Modified Files: DfXML_RBBR.java Log Message: Removed some old code, corrected comment. Index: DfXML_RBBR.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datafiles/DfXML_RBBR.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- DfXML_RBBR.java 13 Oct 2006 07:35:58 -0000 1.24 +++ DfXML_RBBR.java 20 Nov 2006 08:34:49 -0000 1.25 @@ -24,6 +24,9 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.25 2006/11/20 08:34:49 jtorin + ** Removed some old code, corrected comment. + ** ** Revision 1.24 2006/10/13 07:35:58 jtorin ** Add support for writing the referral id through the element 'referralId', ** belonging to the substitution group 'base:supplementarySampleId'. @@ -359,14 +362,8 @@ // //throw new GenerationException(GenerationExceptionEnum.FILL_IN); // } - // Write the root element "person" with a single attribute "gender" + // Write the root element. xmlw.writeStartElement("xchng:sampleInformation"); - // TODO Rewrite as elements. /JT - /* - * xmlw.writeAttribute("base:countryId", countryId); - * xmlw.writeAttribute("rbbr:biobankId", biobankId); - * xmlw.writeAttribute("rbbr:biobankDivisionId", biobankDivisionId); - */ xmlw.writeNamespace("xchng", xchngNS); xmlw.writeNamespace("rbbr", rbbrNS); xmlw.writeNamespace("base", baseNS); |
|
From: Johan T. <jt...@us...> - 2006-10-25 08:45:44
|
Update of /cvsroot/vienti/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22720 Modified Files: build.xml Log Message: Create the class directory on build. Target the compile against JDK1.4, it's supposed to work there by default (almost). Index: build.xml =================================================================== RCS file: /cvsroot/vienti/vienti/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- build.xml 29 Jun 2006 10:25:44 -0000 1.13 +++ build.xml 25 Oct 2006 08:45:42 -0000 1.14 @@ -25,6 +25,11 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ +** Revision 1.14 2006/10/25 08:45:42 jtorin +** Create the class directory on build. +** Target the compile against JDK1.4, it's supposed to work there by +** default (almost). +** ** Revision 1.13 2006/06/29 10:25:44 jtorin ** Replace tabs with spaces. ** Fix the 'Implementation-Version' string in the jar manifest. @@ -124,7 +129,9 @@ <touch file="${distdir}/schemas/.dummy"/> <!-- Compile the java code. --> - <javac srcdir="${source}" destdir="${class}" classpath="${classpath}"/> + <mkdir dir="${class}"/> + <javac srcdir="${source}" destdir="${class}" + classpath="${classpath}" target="1.4" source="1.4"/> <!-- Put everything in ${source} into a jar file. --> <jar destfile="${distdir}/lib/vienti.jar"> |
|
From: Johan T. <jt...@us...> - 2006-10-25 08:42:04
|
Update of /cvsroot/vienti/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20824 Modified Files: Vienti.buildnumber Log Message: sync Index: Vienti.buildnumber =================================================================== RCS file: /cvsroot/vienti/vienti/Vienti.buildnumber,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Vienti.buildnumber 23 Oct 2006 08:53:21 -0000 1.3 +++ Vienti.buildnumber 25 Oct 2006 08:42:00 -0000 1.4 @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Fri Oct 20 13:59:43 CEST 2006 -build.number=271 +#Tue Oct 24 10:57:24 CEST 2006 +build.number=272 |
|
From: Johan T. <jt...@us...> - 2006-10-25 08:41:45
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20793/source/se/biobanksregistersyd/vienti Modified Files: Vienti.java Log Message: Recurse through all chained exceptions when catching a GatheringException after calling generate(). This is ugly, but will have to do for now. Index: Vienti.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/Vienti.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- Vienti.java 20 Jun 2006 14:24:28 -0000 1.38 +++ Vienti.java 25 Oct 2006 08:41:39 -0000 1.39 @@ -24,6 +24,11 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.39 2006/10/25 08:41:39 jtorin + ** Recurse through all chained exceptions when catching a + ** GatheringException after calling generate(). This is ugly, but will have + ** to do for now. + ** ** Revision 1.38 2006/06/20 14:24:28 amijdema ** Removed the inline class CurrentClassGetter. Now they use CurrentContext.java ** in its place. @@ -337,7 +342,22 @@ logger.info("Datafile for token '" + df.getPropertyPrefix() + "' generated."); } catch (GatheringException e) { - logger.error("Datafile not generated: " + e.getMessage()); + // TODO Rewrite handling of exceptions. + // Make the loop code genereral for all exceptions (create + // a super class for exceptions). This is ugly. /JT + Throwable tmpException = e; + String message = "", tmp = ""; + while (tmpException != null) { + tmp = tmpException.getMessage(); + if (tmp != null) { + if (message.length() > 0) { + message = message + " Details: "; + } + message = message + tmp; + } + tmpException = tmpException.getCause(); + } + logger.error("Datafile not generated: " + message); logger.debug("StackTrace: ", e); errorOccured = true; } catch (GenerationException e) { |
|
From: Johan T. <jt...@us...> - 2006-10-23 08:53:24
|
Update of /cvsroot/vienti/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19206 Modified Files: Vienti.buildnumber Log Message: sync Index: Vienti.buildnumber =================================================================== RCS file: /cvsroot/vienti/vienti/Vienti.buildnumber,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Vienti.buildnumber 16 Oct 2006 12:16:14 -0000 1.2 +++ Vienti.buildnumber 23 Oct 2006 08:53:21 -0000 1.3 @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Fri Oct 13 13:58:01 CEST 2006 -build.number=270 +#Fri Oct 20 13:59:43 CEST 2006 +build.number=271 |
|
From: Johan T. <jt...@us...> - 2006-10-23 08:53:01
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18828/schemas Modified Files: RBBR-WSDL.wsdl Log Message: Uses namespace version 0.2 of RBBR-WS (also fixed typo bug in namespace definitions: RBBR-WSDL -> RBBR-WS). Index: RBBR-WSDL.wsdl =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR-WSDL.wsdl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RBBR-WSDL.wsdl 8 Jun 2006 11:03:54 -0000 1.2 +++ RBBR-WSDL.wsdl 23 Oct 2006 08:52:57 -0000 1.3 @@ -28,11 +28,11 @@ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" - xmlns:rbbrws="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WSDL/0.1/" + xmlns:rbbrws="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.2/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ wsdl.xsd"> - <wsdl:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.1/" location="RBBR-WS.xsd"/> + <wsdl:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.2/" location="RBBR-WS.xsd"/> <wsdl:message name="getSampleInformationPersonRequest"> <wsdl:part name="body" element="rbbrws:getSampleInformationPerson"/> |
|
From: Johan T. <jt...@us...> - 2006-10-23 08:51:03
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18043/schemas Modified Files: RBBR-WS_example.xml Log Message: Added example of the element 'rbbr:multiplicity'. Uses namespace version 0.2 of RBBR and RBBR-WS. Added CVS id tag. Index: RBBR-WS_example.xml =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR-WS_example.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RBBR-WS_example.xml 15 May 2006 13:27:34 -0000 1.1 +++ RBBR-WS_example.xml 23 Oct 2006 08:50:56 -0000 1.2 @@ -1,11 +1,12 @@ <?xml version='1.0' encoding='UTF-8'?> +<!-- $Id$ --> <rbbrws:sampleInformation - xmlns:rbbrws="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.1/" - xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" + xmlns:rbbrws="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.2/" + xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" xmlns:base="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.1/ RBBR-WS.xsd - http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/ RBBR.xsd + xsi:schemaLocation="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.2/ RBBR-WS.xsd + http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/ RBBR.xsd http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/ Base.xsd"> <rbbrws:sampleCollection base:countryId="SE" rbbr:biobankId="136" @@ -18,6 +19,7 @@ <base:arrivalId>VCMASEN-003644</base:arrivalId> <base:samplingDate>2004-04-20</base:samplingDate> <base:arrivalDate>2004-04-22</base:arrivalDate> + <rbbr:multiplicity type="MULTIPLE">1</rbbr:multiplicity> <base:sampleExistence registrationDate="2004-04-22T08:34:08">DESTROYED</base:sampleExistence> <rbbr:sampleUsageRestriction>true</rbbr:sampleUsageRestriction> <rbbr:sampleOrderingUnitMG>MAKAHJ</rbbr:sampleOrderingUnitMG> |
|
From: Johan T. <jt...@us...> - 2006-10-23 08:49:41
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17598/schemas Modified Files: RBBR-WS.xsd Log Message: Added the element 'rbbr:multiplicity'. Uses namespace RBBR in version 0.2. Bumbed namespace version to 0.2. Index: RBBR-WS.xsd =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR-WS.xsd,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RBBR-WS.xsd 8 Jun 2006 11:02:39 -0000 1.2 +++ RBBR-WS.xsd 23 Oct 2006 08:49:35 -0000 1.3 @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- $Id$ --> -<xsd:schema targetNamespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.1/" +<xsd:schema targetNamespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.2/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:base="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/" - xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" - xmlns:rbbrws="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.1/" + xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" + xmlns:rbbrws="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-WS/0.2/" elementFormDefault="qualified" attributeFormDefault="qualified"> <xsd:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/" schemaLocation="Base.xsd"/> - <xsd:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" schemaLocation="RBBR.xsd"/> + <xsd:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" schemaLocation="RBBR.xsd"/> <xsd:annotation> <xsd:documentation> @@ -200,7 +200,13 @@ laboratory. </xsd:documentation></xsd:annotation> </xsd:element> - + + <xsd:element ref="rbbr:multiplicity" minOccurs="0"> + <xsd:annotation><xsd:documentation> + The number of actual samples grouped under this 'mainSampleId'. + </xsd:documentation></xsd:annotation> + </xsd:element> + <xsd:element ref="base:sampleExistence" minOccurs="0"> <xsd:annotation><xsd:documentation> Gives the existence status of the sample. |
|
From: Johan T. <jt...@us...> - 2006-10-16 12:16:18
|
Update of /cvsroot/vienti/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26418 Modified Files: Vienti.buildnumber Log Message: sync Index: Vienti.buildnumber =================================================================== RCS file: /cvsroot/vienti/vienti/Vienti.buildnumber,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Vienti.buildnumber 13 Oct 2006 11:20:33 -0000 1.1 +++ Vienti.buildnumber 16 Oct 2006 12:16:14 -0000 1.2 @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Fri Oct 13 11:05:27 CEST 2006 -build.number=269 +#Fri Oct 13 13:58:01 CEST 2006 +build.number=270 |
|
From: Johan T. <jt...@us...> - 2006-10-13 12:21:54
|
Update of /cvsroot/vienti/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9417 Modified Files: yearlyexport.sh Log Message: Remove a double exported year. Index: yearlyexport.sh =================================================================== RCS file: /cvsroot/vienti/vienti/yearlyexport.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- yearlyexport.sh 29 Jun 2006 10:25:26 -0000 1.1 +++ yearlyexport.sh 13 Oct 2006 12:21:52 -0000 1.2 @@ -28,7 +28,6 @@ # Silly script to simplify elicitation of data in a yearly division. ./export.sh -l -s "1900-01-01 00:00:00" -e "1901-01-01 00:00:00" -./export.sh -l -e "1901-01-01 00:00:00" ./export.sh -l -e "1902-01-01 00:00:00" ./export.sh -l -e "1903-01-01 00:00:00" ./export.sh -l -e "1904-01-01 00:00:00" |
|
From: Johan T. <jt...@us...> - 2006-10-13 11:21:20
|
Update of /cvsroot/vienti/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18478 Modified Files: .cvsignore Log Message: Don't ignore the buildnumber file. Index: .cvsignore =================================================================== RCS file: /cvsroot/vienti/vienti/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- .cvsignore 25 Apr 2006 14:12:19 -0000 1.6 +++ .cvsignore 13 Oct 2006 11:21:18 -0000 1.7 @@ -1,5 +1,4 @@ *.zip -*.buildnumber build doc olddistfiles |
|
From: Johan T. <jt...@us...> - 2006-10-13 11:20:42
|
Update of /cvsroot/vienti/vienti In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18078 Added Files: Vienti.buildnumber Log Message: The official buildnumber of Vienti is placed here. Not optimal, but it will have to do. It is to be updated after each build (or series of builds). --- NEW FILE: Vienti.buildnumber --- #Build Number for ANT. Do not edit! #Fri Oct 13 11:05:27 CEST 2006 build.number=269 |
|
From: Johan T. <jt...@us...> - 2006-10-13 07:37:55
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27468/source/se/biobanksregistersyd/vienti/datasources Modified Files: DsSympathy_RBBR.java Log Message: Put the referral id in the dataset to be written to file. Remove a few debug variable assignments that was accidentially left behind in the last commit. Index: DsSympathy_RBBR.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources/DsSympathy_RBBR.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- DsSympathy_RBBR.java 11 Oct 2006 15:00:30 -0000 1.19 +++ DsSympathy_RBBR.java 13 Oct 2006 07:37:52 -0000 1.20 @@ -24,6 +24,11 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.20 2006/10/13 07:37:52 jtorin + ** Put the referral id in the dataset to be written to file. + ** Remove a few debug variable assignments that was accidentially + ** left behind in the last commit. + ** ** Revision 1.19 2006/10/11 15:00:30 jtorin ** Call a stored procedure in the database instead of executing an SQL-query. ** Rewrote the whole tuple parse logic from scratch since the format of @@ -367,8 +372,6 @@ // // Example of multiple glass&blocks. // startdate = "2005-08-30 09:50:00"; // enddate = "2005-08-30 10:55:01"; - startdate = "2006-10-10 00:50:00"; - enddate = "2006-10-11 00:50:00"; CallableStatement cs; try { @@ -448,6 +451,7 @@ /* Read basic data. */ String patientid = rs.getString("patientid").trim(); + String referralId = remisstyp + remissar + "-" + remissnr; // Sampling date String provdat = null; if (rs.getString("provdat") != null) { @@ -471,6 +475,7 @@ /* Put data into the dataset. */ dataset.put("rbbr:personId", patientid); + dataset.put("rbbr:referralId", referralId); if (provdat != null) { dataset.put("base:samplingDate", provdat); } |
|
From: Johan T. <jt...@us...> - 2006-10-13 07:36:03
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datafiles In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26691/source/se/biobanksregistersyd/vienti/datafiles Modified Files: DfXML_RBBR.java Log Message: Add support for writing the referral id through the element 'referralId', belonging to the substitution group 'base:supplementarySampleId'. Index: DfXML_RBBR.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datafiles/DfXML_RBBR.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- DfXML_RBBR.java 11 Oct 2006 14:41:23 -0000 1.23 +++ DfXML_RBBR.java 13 Oct 2006 07:35:58 -0000 1.24 @@ -24,6 +24,10 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.24 2006/10/13 07:35:58 jtorin + ** Add support for writing the referral id through the element 'referralId', + ** belonging to the substitution group 'base:supplementarySampleId'. + ** ** Revision 1.23 2006/10/11 14:41:23 jtorin ** Handle the element 'rbbr:multiplicity'. ** Adhere to version 0.2 of the RBBR and RBBR-Exchange schemas. @@ -674,6 +678,18 @@ xmlw.writeCharacters("\n"); // + // supplementarySampleId (substitution group) + // + if (dataset.containsKey("rbbr:referralId")) { + xmlw.writeCharacters(" "); + xmlw.writeStartElement(rbbrNS, "referralId"); + xmlw.writeCharacters( + (String) dataset.get("rbbr:referralId")); + xmlw.writeEndElement(); + xmlw.writeCharacters("\n"); + } + + // // samplingDate // xmlw.writeCharacters(" "); |
|
From: Johan T. <jt...@us...> - 2006-10-13 07:33:49
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25918/schemas Modified Files: RBBR_Exchange_example.xml Log Message: Show an example of the element 'rbbr:referralId'. Index: RBBR_Exchange_example.xml =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR_Exchange_example.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- RBBR_Exchange_example.xml 11 Oct 2006 14:36:42 -0000 1.4 +++ RBBR_Exchange_example.xml 13 Oct 2006 07:33:46 -0000 1.5 @@ -19,6 +19,7 @@ <base:mainSampleId>2004-001</base:mainSampleId> <base:labelId>2004-001</base:labelId> <base:arrivalId>VCMASEN-003644</base:arrivalId> + <rbbr:referralId>P2004-1234</rbbr:referralId> <base:samplingDate>2004-04-20</base:samplingDate> <base:arrivalDate>2004-04-22</base:arrivalDate> <rbbr:multiplicity type="MULTIPLE">1</rbbr:multiplicity> |
|
From: Johan T. <jt...@us...> - 2006-10-13 07:32:51
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25502/schemas Modified Files: RBBR.xsd Log Message: Add support for specifying the referral id through the element 'referralId', belonging to the substitution group 'base:supplementarySampleId'. Index: RBBR.xsd =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR.xsd,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- RBBR.xsd 11 Oct 2006 14:26:57 -0000 1.28 +++ RBBR.xsd 13 Oct 2006 07:32:48 -0000 1.29 @@ -163,6 +163,16 @@ <!-- ================================================== --> + <xsd:element name="referralId" type="xsd:string" substitutionGroup="base:supplementarySampleId"> + <xsd:annotation> + <xsd:documentation> + The identifier of the referral that generated the sample. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <!-- ================================================== --> + <xsd:element name="multiplicity"> <xsd:annotation><xsd:documentation> The number of actual samples grouped under this 'mainSampleId'. |
|
From: Johan T. <jt...@us...> - 2006-10-11 15:00:37
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27804/source/se/biobanksregistersyd/vienti/datasources Modified Files: DsSympathy_RBBR.java Log Message: Call a stored procedure in the database instead of executing an SQL-query. Rewrote the whole tuple parse logic from scratch since the format of the resultset changed anyway. Seems to be more maintainable, but introduces a few perculiar constructions. Finally derive the values for preparationresult, storageform and storagetemp from the kind of sample stored. Coalesce biobankvalues if subsequent values are the same. Add the method 'writeData' which duplicates the sample entry into two if both specimen slides and paraffin blocks exists, each sample with a suffix of 'G' (glas) or 'K' (kloss) respectively. Index: DsSympathy_RBBR.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datasources/DsSympathy_RBBR.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- DsSympathy_RBBR.java 20 Jun 2006 14:24:29 -0000 1.18 +++ DsSympathy_RBBR.java 11 Oct 2006 15:00:30 -0000 1.19 @@ -24,6 +24,18 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.19 2006/10/11 15:00:30 jtorin + ** Call a stored procedure in the database instead of executing an SQL-query. + ** Rewrote the whole tuple parse logic from scratch since the format of + ** the resultset changed anyway. Seems to be more maintainable, but + ** introduces a few perculiar constructions. + ** Finally derive the values for preparationresult, storageform and + ** storagetemp from the kind of sample stored. + ** Coalesce biobankvalues if subsequent values are the same. + ** Add the method 'writeData' which duplicates the sample entry into two + ** if both specimen slides and paraffin blocks exists, each sample with + ** a suffix of 'G' (glas) or 'K' (kloss) respectively. + ** ** Revision 1.18 2006/06/20 14:24:29 amijdema ** Removed the inline class CurrentClassGetter. Now they use CurrentContext.java ** in its place. @@ -103,9 +115,9 @@ package se.biobanksregistersyd.vienti.datasources; +import java.sql.CallableStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Statement; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; @@ -137,7 +149,8 @@ /** Current classname. * "se.biobanksregistersyd.vienti.datasource.DsSympathy_RBBR" */ - private static final String CLASSNAME = CurrentContext.getCurrentClassName(); + private static final String CLASSNAME = + CurrentContext.getCurrentClassName(); /** log4j. */ private static Logger logger = Logger.getLogger(CLASSNAME); @@ -145,7 +158,8 @@ /** * The name of the class that this Datasource is supposed to work with. */ - private final String companionDatafile = "se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR"; + private final String companionDatafile = + "se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR"; /** @@ -168,6 +182,9 @@ */ private Boolean complete = null; + /** The number of samples written to the <code>Datafile</code>. */ + private int numberOfExportedSamples = 0; + /** * Creates a <code>DsSympathy_RBBR</code> object and loads neccesary * properties to set it up correctly. Constructors in subclasses should call @@ -268,8 +285,9 @@ if (startdate == null) { throw new GatheringException( GatheringExceptionEnum.DATA_NOT_AVAILABLE, - "No value for 'startdate' available, neither through command line " - + "parameters nor persistent data (hint: see parameter '-s')."); + "No value for 'startdate' available, neither through " + + "command line parameters nor persistent data (hint: " + + "see parameter '-s')."); } // Get the end timestamp, either from command line @@ -315,8 +333,9 @@ } /** - * Generate random data and use callback methods on the associated - * <code>Datafile</code> to output it. + * Query the under-lying database for the laboratory system SymPathy + * and use callback methods on the associated <code>Datafile</code> + * to output it. * * @throws GatheringException * if an error was detected while opening any required @@ -332,53 +351,39 @@ // Recast to be able to use sub-class methods. DfXML_RBBR df = (DfXML_RBBR) getDatafile(); - // TODO Debug /JT - if (1 == 0) - return; +// // Some example of data. Works in Lund against the 'synergi' DB. +// // Small nice example of multiple tuples. +// startdate = "2006-10-04 11:07:00"; +// enddate = "2006-10-04 11:08:00"; +// // Example for a referral that contains 04x extries. +// startdate = "2004-04-22 10:14:00"; +// enddate = "2004-04-22 10:14:01"; +// // Just som tuples. +// startdate = "2004-04-23 10:14:00"; +// enddate = "2004-04-23 10:15:00"; +// // Consent decision changes 1 -> 6. +// startdate = "2006-06-26 10:50:00"; +// enddate = "2006-06-26 10:50:01"; +// // Example of multiple glass&blocks. +// startdate = "2005-08-30 09:50:00"; +// enddate = "2005-08-30 10:55:01"; + startdate = "2006-10-10 00:50:00"; + enddate = "2006-10-11 00:50:00"; - Statement stmt; + CallableStatement cs; try { - stmt = getDbConnection().createStatement(); + String query = "{call la_biobanksreg(" + + "'" + startdate + "'," + "'" + enddate + "')}"; + logger.debug("SQL-query: " + query); + cs = getDbConnection().prepareCall(query); } catch (SQLException e) { - throw new GatheringException( - GatheringExceptionEnum.COULD_NOT_OPEN_RESOURCE, e, - "Could not create a SQL statement."); + throw new GatheringException(GatheringExceptionEnum.IO_ERROR, e, + "Couldn't prepare a SQL-statement to gather data."); } - - /* - * Some comments about the database query: Both r.ankomstdat - * (arrivaldate) and b.datum (what seems to be the consent decision - * registration date) is compared in the selection (unfortunately this - * makes the query much slower) since they tend to have quite a lot of - * "clever" variations. In some found cases the former value is actually - * behind the latter, dispite that it should be impossible to register a - * consent decision on a sample that haven't arrived yet. The sorting - * order is important since the later algoritm depends on parts of it. - */ - final String ls = System.getProperty("line.separator"); - String query = "SELECT p.remisstyp, p.remissar, p.remissnr, p.provnr," - + ls - + " r.patientid, r.ankomstdat, r.provdat, r.remklinikkod," - + ls + " r.svarlakare, b.svarnr, b.kod, b.datum, b.kasserat, " - + ls + " b.kasserat_sign " + ls + "FROM pr_prov p " + ls - + "JOIN re_remiss r ON" + ls - + " r.remisstyp = p.remisstyp AND" + ls - + " r.remissar = p.remissar AND" + ls - + " r.remissnr = p.remissnr" + ls - + "LEFT OUTER JOIN re_nat_biobank b ON" + ls - + " b.remisstyp = p.remisstyp AND" + ls - + " b.remissar = p.remissar AND" + ls - + " b.remissnr = p.remissnr" + ls + "WHERE (r.ankomstdat > '" - + startdate + "' AND" + ls + " r.ankomstdat <= '" - + enddate + "')" + ls + " OR (b.datum > '" + startdate - + "' AND" + ls + " b.datum <= '" + enddate + "')" + ls - + "ORDER BY p.remisstyp, p.remissar, p.remissnr," + ls - + " p.provnr, b.datum" + ls; - logger.debug("SQL-query: " + ls + query); - + ResultSet rs; try { - rs = stmt.executeQuery(query); + rs = cs.executeQuery(); } catch (SQLException e) { throw new GatheringException(GatheringExceptionEnum.IO_ERROR, e, "Couldn't execute a SQL-statement to gather data."); @@ -386,7 +391,6 @@ String comment = "Information gathered by '" + CLASSNAME + "', revision " + revision + "."; - df.open(); df.writeHeader(comment, startdate, enddate); df.writeStartSampleCollection(sampleCollectionId, complete); @@ -394,96 +398,152 @@ Hashtable dataset = new Hashtable(); List biobankvalues = new ArrayList(); - int numberOfExportedSamples = 0; try { boolean tupleOk = rs.next(); - while (tupleOk) { - dataset.clear(); + String remisstyp; + String remissar; + String remissnr; + int svarnr; + String tmpSampleId = null; + String remisstypCurr = ""; + String remissarCurr = ""; + String remissnrCurr = ""; + int svarnrCurr = 0; + String kodPrev = ""; // Previously added biobankvalue. + // The number of paraffin blocks and specimen slides. + int klossant = 0; + int glasant = 0; - String remisstyp = rs.getString("remisstyp").trim(); - String remissar = rs.getString("remissar").trim(); - String remissnr = rs.getString("remissnr").trim(); - String provnr = rs.getString("provnr").trim(); + while (tupleOk) { + remisstyp = rs.getString("remisstyp").trim(); + remissar = rs.getString("remissar").trim(); + remissnr = rs.getString("remissnr").trim(); + svarnr = rs.getInt("svarnr"); + // logger.debug("remisstyp: " + remisstyp); + // logger.debug("remissar : " + remissar); + // logger.debug("remissnr : " + remissnr); + // logger.debug("svarnr : " + svarnr); + // Is this the same referral as the last iteration? + if (!remisstyp.equals(remisstypCurr) + || !remissar.equals(remissarCurr) + || !remissnr.equals(remissnrCurr)) { - dataset.put("rbbr:personId", rs.getString("patientid").trim()); - dataset.put("base:mainSampleId", remisstyp + remissar + "-" - + remissnr + "-" + provnr); - if (rs.getString("provdat") != null) { - dataset.put("base:samplingDate", rs.getString("provdat") - .substring(0, "YYYY-MM-DD".length())); - } - dataset.put("base:arrivalDate", rs.getString("ankomstdat") - .substring(0, "YYYY-MM-DD".length())); - dataset.put("rbbr:sampleOrderingUnit", rs.getString( - "remklinikkod").substring(0, "XXXXXX".length())); - dataset.put("rbbr:sampleOrderingUnitType", - "rbbr:sampleOrderingUnitMG"); - // The database field 'svarlakare' is unfortunately known to - // contain characters in the lower part of ASCII, and these - // are illegal in XML. - // TODO A better solution would be to try converting these chars - // back to their intended representation (é, ü and so on). - String tmp = cleanString(rs.getString("svarlakare").trim()); - if (tmp.length() != 0) { - dataset.put("rbbr:sampleOrderer", tmp); - } - if (rs.getString("remisstyp").trim().equals("O")) { - // O = Obduktion = Autopsy - dataset.put("base:vitalStatusAtSampling", "DEAD"); - } else { - dataset.put("base:vitalStatusAtSampling", "ALIVE"); - } + // Write the last entry if there is data. + if (!dataset.isEmpty() && tmpSampleId != null) { + // logger.debug("Write in-loop."); + writeData(df, tmpSampleId, dataset, biobankvalues, + klossant, glasant); + dataset.clear(); + biobankvalues.clear(); + } - // TODO Static values! - dataset.put("rbbr:preparationResult", "PLASMA"); - dataset.put("rbbr:storageForm", "FREEZED"); - dataset.put("rbbr:storageTemperature", "FREEZER_-20DEGC"); + // logger.debug("New referral."); + remisstypCurr = remisstyp; + remissarCurr = remissar; + remissnrCurr = remissnr; + svarnrCurr = 0; + kodPrev = ""; + tmpSampleId = remisstyp + remissar + "-" + remissnr; - if (rs.getString("svarnr") == null) { - // Sample has no biobankvalue/consent decision. - // Advance to the next tuple. - tupleOk = rs.next(); - } else { - biobankvalues.clear(); + /* Read basic data. + */ + String patientid = rs.getString("patientid").trim(); + // Sampling date + String provdat = null; + if (rs.getString("provdat") != null) { + provdat = rs.getString("provdat") + .substring(0, "YYYY-MM-DD".length()); + } + String ankomstdat = rs.getString("ankomstdat") + .substring(0, "YYYY-MM-DD".length()); + String remklinikkod = rs.getString( + "remklinikkod").substring(0, "XXXXXX".length()); + // The database field 'svarlakare' is unfortunately known to + // contain characters in the lower part of ASCII, and these + // are illegal in XML. + // TODO A better solution would be to try converting these chars back to their intended representation (é, ü and so on). + String svarlakare = + cleanString(rs.getString("svarlakare").trim()); + // The number of paraffin blocks and specimen slides. + klossant = rs.getInt("klossant"); + glasant = rs.getInt("glasant"); - addBiobankValue(biobankvalues, rs.getString("kod").trim(), + /* Put data into the dataset. + */ + dataset.put("rbbr:personId", patientid); + if (provdat != null) { + dataset.put("base:samplingDate", provdat); + } + dataset.put("base:arrivalDate", ankomstdat); + dataset.put("rbbr:sampleOrderingUnit", remklinikkod); + dataset.put("rbbr:sampleOrderingUnitType", + "rbbr:sampleOrderingUnitMG"); + if (svarlakare.length() != 0) { + dataset.put("rbbr:sampleOrderer", svarlakare); + } + if (remisstyp.toUpperCase().equals("O")) { + // O = Obduktion = Autopsy + dataset.put("base:vitalStatusAtSampling", "DEAD"); + } else { + dataset.put("base:vitalStatusAtSampling", "ALIVE"); + } + } + // Is this the same 'svar' as the last iteration? + // And is it non-zero (non-null)? + // The 'kod.startsWith("4")' bit is an ugly hack to + // coalesce the individual biobank values (4, 4a, 4b, and + // so on) into one. See addBiobankValue() for more info + // on how this is handled. Here be dragons... + String kod = rs.getString("kod"); + if (kod != null) { + kod = kod.trim(); + } + if ((svarnr != 0 && svarnr != svarnrCurr) + || (svarnr != 0 && kod.startsWith("4"))) { + // Since the biobank value is duplicated in each + // answer (svar) to the referral there is no real + // meaning of adding it if it's the same value. + // A special case would be if the sample provider + // actually has given the same consent decision + // twice, which would not be reflected in the + // transmission of data. However, the true spirit + // of the sample provider is still respected. + if (!kod.equals(kodPrev)) { + // logger.debug("Add biobank value: " + kod); + addBiobankValue(biobankvalues, kod, rs.getString("datum").trim().substring(0, - "YYYY-MM-DD HH:MM:SS".length()).replaceAll( - " ", "T")); - - // Advance to the next tuple. - tupleOk = rs.next(); - - while (tupleOk - && remisstyp.compareTo(rs.getString("remisstyp") - .trim()) == 0 - && remissar.compareTo(rs.getString("remissar") - .trim()) == 0 - && remissnr.compareTo(rs.getString("remissnr") - .trim()) == 0 - && provnr.compareTo(rs.getString("provnr").trim()) == 0) { - // Still on same referral. Just add on the - // biobanksvalue. - - addBiobankValue(biobankvalues, rs.getString("kod") - .trim(), rs.getString("datum").trim() - .substring(0, "YYYY-MM-DD HH:MM:SS".length()) - .replaceAll(" ", "T")); - - tupleOk = rs.next(); + "YYYY-MM-DD HH:MM:SS".length()). + replaceAll(" ", "T")); + kodPrev = kod; } - - dataset.put("rbbr:biobankValues", biobankvalues); + svarnrCurr = svarnr; } - // System.out.println(dataset.toString()); - - df.writeEntry(dataset); + // SNOMED data is duplicated for each 'svar', thus + // only read it for the first svar. + // TODO This critera will fail in the case of multiple + // 04x biobankvalues. The safest way is that for each tuple + // of SNOMED data, check if it already exists before + // adding it. +// if (svarnr == 1) { +// // Read SNOMED data. +// } - numberOfExportedSamples += 1; + // Advance to the next tuple. + tupleOk = rs.next(); + } + + // Write the last entry if there is data. + if (!dataset.isEmpty()) { + // logger.debug("Write after."); + writeData(df, tmpSampleId, dataset, biobankvalues, + klossant, glasant); + dataset.clear(); + biobankvalues.clear(); } } catch (SQLException e) { throw new GatheringException(GatheringExceptionEnum.IO_ERROR, e, - "An exception occured while retreiving data from a resultset."); + "An exception occured while retreiving data from " + + "a resultset."); } df.writeEndSampleCollection(); @@ -499,6 +559,57 @@ } /** + * Write data to the datafile. Utility method since the operation is + * done in two places. + * + * @param df The <code>Datafile</code> the data is to be + * written to. + * @param tmpSampleId A partial sample id for the sample to write. + * The final id is constructed in-metod. + * @param dataset A previously initialised hashset of values, + * describing one sample to write to the file. + * @param biobankvalues The list of biobankvalues for the sample. + * @param klossant The number of paraffin blocks that belongs + * to this referral. + * @param glasant The number of specimen slides that belongs + * to this referral. + * @throws GenerationException if an error was detected while + * generating the file. + */ + void writeData(final DfXML_RBBR df, final String tmpSampleId, + final Hashtable dataset, final List biobankvalues, + final int klossant, final int glasant) + throws GenerationException { + if (!dataset.isEmpty()) { + if (biobankvalues.size() > 0) { + dataset.put("rbbr:biobankValues", biobankvalues); + } + if (klossant > 0) { + dataset.put("base:mainSampleId", tmpSampleId + "K"); + dataset.put("rbbr:multiplicity", Integer.toString(klossant)); + dataset.put("rbbr:multiplicity-type", "MULTIPLE"); + dataset.put("rbbr:preparationResult", "PARAFFIN_BLOCK"); + dataset.put("rbbr:storageForm", "PARAFFIN_BLOCK"); + dataset.put("rbbr:storageTemperature", "ROOM_TEMPERATURE"); + df.writeEntry(dataset); + numberOfExportedSamples += 1; + // System.out.println(dataset.toString()); + } + if (glasant > 0) { + dataset.put("base:mainSampleId", tmpSampleId + "G"); + dataset.put("rbbr:multiplicity", Integer.toString(glasant)); + dataset.put("rbbr:multiplicity-type", "MULTIPLE"); + dataset.put("rbbr:preparationResult", "SPECIMEN_SLIDE"); + dataset.put("rbbr:storageForm", "SPECIMEN_SLIDE"); + dataset.put("rbbr:storageTemperature", "ROOM_TEMPERATURE"); + df.writeEntry(dataset); + numberOfExportedSamples += 1; + // System.out.println(dataset.toString()); + } + } + } + + /** * Add a biobankvalue retrieved from a SymPathy database to a list of * existing values. * @@ -536,7 +647,7 @@ || newCode.equals("4b") || newCode.equals("4c") || newCode.equals("4d") || newCode.equals("4e") || newCode.equals("4f")) { - // This newCode makes the assumption that every biobank value + // This code makes the assumption that every biobank value // 4/"04" is part of the same consent decision if and only // if they have the same date. At the moment this looks like // the norm in SymPathy. @@ -580,21 +691,22 @@ // In Java 1.5 it is possible to // String.replace(new CharSequence("..."), new CharSequence("...")); return str.replace((char) 0, '*').replace((char) 1, '*').replace( - (char) 2, '*').replace((char) 3, '*').replace((char) 4, '*') - .replace((char) 5, '*').replace((char) 6, '*').replace( - (char) 7, '*').replace((char) 8, '*').replace((char) 9, - '*').replace((char) 9, '*').replace((char) 10, '*') - .replace((char) 11, '*').replace((char) 12, '*').replace( - (char) 13, '*').replace((char) 14, '*').replace( - (char) 15, '*').replace((char) 16, '*').replace( - (char) 17, '*').replace((char) 18, '*').replace( - (char) 19, '*').replace((char) 20, '*').replace( - (char) 21, '*').replace((char) 22, '*').replace( - (char) 23, '*').replace((char) 24, '*').replace( - (char) 25, '*').replace((char) 26, '*').replace( - (char) 27, '*').replace((char) 28, '*').replace( - (char) 29, '*').replace((char) 30, '*').replace( - (char) 31, '*'); + (char) 2, '*').replace((char) 3, '*'). + replace((char) 4, '*').replace((char) 5, '*') + .replace((char) 6, '*').replace((char) 7, '*') + .replace((char) 8, '*').replace((char) 9,'*') + .replace((char) 9, '*').replace((char) 10, '*') + .replace((char) 11, '*').replace((char) 12, '*') + .replace((char) 13, '*').replace((char) 14, '*') + .replace((char) 15, '*').replace((char) 16, '*') + .replace((char) 17, '*').replace((char) 18, '*') + .replace((char) 19, '*').replace((char) 20, '*') + .replace((char) 21, '*').replace((char) 22, '*') + .replace((char) 23, '*').replace((char) 24, '*') + .replace((char) 25, '*').replace((char) 26, '*') + .replace((char) 27, '*').replace((char) 28, '*') + .replace((char) 29, '*').replace((char) 30, '*') + .replace((char) 31, '*'); } /** |
|
From: Johan T. <jt...@us...> - 2006-10-11 14:41:29
|
Update of /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datafiles In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20228/source/se/biobanksregistersyd/vienti/datafiles Modified Files: DfXML_RBBR.java Log Message: Handle the element 'rbbr:multiplicity'. Adhere to version 0.2 of the RBBR and RBBR-Exchange schemas. Javadoc and CheckStyle fixes. Index: DfXML_RBBR.java =================================================================== RCS file: /cvsroot/vienti/vienti/source/se/biobanksregistersyd/vienti/datafiles/DfXML_RBBR.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- DfXML_RBBR.java 20 Jun 2006 14:24:28 -0000 1.22 +++ DfXML_RBBR.java 11 Oct 2006 14:41:23 -0000 1.23 @@ -24,6 +24,11 @@ ** liable for any use that may be made of the information contained herein. ** ** $Log$ + ** Revision 1.23 2006/10/11 14:41:23 jtorin + ** Handle the element 'rbbr:multiplicity'. + ** Adhere to version 0.2 of the RBBR and RBBR-Exchange schemas. + ** Javadoc and CheckStyle fixes. + ** ** Revision 1.22 2006/06/20 14:24:28 amijdema ** Removed the inline class CurrentClassGetter. Now they use CurrentContext.java ** in its place. @@ -144,8 +149,9 @@ private String revision = null; /** Current classname. - * "se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR" */ - private static final String CLASSNAME = CurrentContext.getCurrentClassName(); + * "se.biobanksregistersyd.vienti.datafiles.DfXML_RBBR" */ + private static final String CLASSNAME = + CurrentContext.getCurrentClassName(); /** The country which this biobank belongs to. */ private String countryId = null; @@ -164,19 +170,26 @@ */ private Boolean complete = null; + /** A regexp pattern that matches normal swedish person identification + * numbers. */ private Pattern personIdPnoPattern = Pattern.compile("[0-9]{12}"); + /** A regexp pattern that matches swedish person identification + * numbers of a more deviant kind. */ private Pattern personIdPnoDeviantPattern = Pattern .compile("[0-9,A-Z,a-z]{12}"); /** The namespace name of the schema RBBR-Exchange. */ - private String xchngNS = "http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.1/"; + private String xchngNS = + "http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.2/"; /** The namespace name of the schema RBBR. */ - private String rbbrNS = "http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/"; + private String rbbrNS = + "http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/"; /** The namespace name of the schema BASE. */ - private String baseNS = "http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/"; + private String baseNS = + "http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/"; /** The namespace name of the schema XMLSchema-instance. */ private String xsiNS = "http://www.w3.org/2001/XMLSchema-instance"; @@ -383,8 +396,8 @@ // appropriate for its contents. Match timestamps with both ' ' // and 'T' as the intermeditate character between the date and time // part, and correct it (to 'T') below. - Pattern datePattern = Pattern - .compile("\\d\\d\\d\\d-\\d\\d-\\d\\d(?: |T)\\d\\d:\\d\\d:\\d\\d"); + Pattern datePattern = Pattern.compile( + "\\d\\d\\d\\d-\\d\\d-\\d\\d(?: |T)\\d\\d:\\d\\d:\\d\\d"); Matcher matcher = datePattern.matcher(startdate); // Check if the timestamp is in ISO 8601 format. if (matcher.matches()) { @@ -525,7 +538,8 @@ * @throws GenerationException * if an error was detected while writing XML to the stream. */ - public void writeEntry(final Hashtable dataset) throws GenerationException { + public void writeEntry(final Hashtable dataset) + throws GenerationException { try { // System.out.println(dataset.toString() + "\n"); @@ -686,6 +700,22 @@ xmlw.writeCharacters("\n"); // + // multiplicity + // + if (dataset.containsKey("rbbr:multiplicity")) { + xmlw.writeCharacters(" "); + xmlw.writeStartElement(rbbrNS, "multiplicity"); + if (dataset.containsKey("rbbr:multiplicity-type")) { + xmlw.writeAttribute("type", + (String) dataset.get("rbbr:multiplicity-type")); + } + xmlw.writeCharacters((String) dataset.get("rbbr:multiplicity")); + xmlw.writeEndElement(); + xmlw.writeCharacters("\n"); + } + + + // // sampleExistence // if (sampleIsDestructed) { @@ -768,9 +798,8 @@ if (dataset.containsKey("rbbr:sampleOrderer")) { xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "sampleOrderer"); - xmlw - .writeCharacters((String) dataset - .get("rbbr:sampleOrderer")); + xmlw.writeCharacters((String) dataset + .get("rbbr:sampleOrderer")); xmlw.writeEndElement(); xmlw.writeCharacters("\n"); } @@ -849,7 +878,8 @@ // If there is no consent decision values at all a special one // is generated. See below. if (consentValues.isEmpty() - && (consentSpecificPurposeReference == null && consentSpecificPurposeStoreId == null)) { + && (consentSpecificPurposeReference == null + && consentSpecificPurposeStoreId == null)) { writeConsentHistory = true; } @@ -1032,44 +1062,62 @@ xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "consentCareAndTreatment"); - xmlw.writeCharacters((tmp.indexOf("f") == -1) ? "true" - : "false"); + if (tmp.indexOf("f") == -1) { + xmlw.writeCharacters("true"); + } else { + xmlw.writeCharacters("false"); + } xmlw.writeEndElement(); xmlw.writeCharacters("\n"); xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "consentEducation"); - xmlw.writeCharacters((tmp.indexOf("e") == -1) ? "true" - : "false"); + if (tmp.indexOf("e") == -1) { + xmlw.writeCharacters("true"); + } else { + xmlw.writeCharacters("false"); + } xmlw.writeEndElement(); xmlw.writeCharacters("\n"); xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "consentQualityAssurance"); - xmlw.writeCharacters((tmp.indexOf("d") == -1) ? "true" - : "false"); + if (tmp.indexOf("d") == -1) { + xmlw.writeCharacters("true"); + } else { + xmlw.writeCharacters("false"); + } xmlw.writeEndElement(); xmlw.writeCharacters("\n"); xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "consentDevelopment"); - xmlw.writeCharacters((tmp.indexOf("c") == -1) ? "true" - : "false"); + if (tmp.indexOf("c") == -1) { + xmlw.writeCharacters("true"); + } else { + xmlw.writeCharacters("false"); + } xmlw.writeEndElement(); xmlw.writeCharacters("\n"); xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "consentResearch"); - xmlw.writeCharacters((tmp.indexOf("a") == -1) ? "true" - : "false"); + if (tmp.indexOf("a") == -1) { + xmlw.writeCharacters("true"); + } else { + xmlw.writeCharacters("false"); + } xmlw.writeEndElement(); xmlw.writeCharacters("\n"); xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "consentClinicalTrial"); - xmlw.writeCharacters((tmp.indexOf("b") == -1) ? "true" - : "false"); + if (tmp.indexOf("b") == -1) { + xmlw.writeCharacters("true"); + } else { + xmlw.writeCharacters("false"); + } xmlw.writeEndElement(); xmlw.writeCharacters("\n"); @@ -1152,8 +1200,8 @@ if (creationDate.compareTo("2004-11-01") < 0) { xmlw.writeCharacters("HISTORICAL_SAMPLE"); } else { - xmlw - .writeCharacters("SAMPLE_PROVIDER_NOT_CONSULTED"); + xmlw.writeCharacters( + "SAMPLE_PROVIDER_NOT_CONSULTED"); } xmlw.writeEndElement(); xmlw.writeCharacters("\n"); @@ -1171,7 +1219,8 @@ } } } else if (consentValues.isEmpty() - && (consentSpecificPurposeReference == null && consentSpecificPurposeStoreId == null)) { + && (consentSpecificPurposeReference == null + && consentSpecificPurposeStoreId == null)) { xmlw.writeCharacters(" "); xmlw.writeStartElement(rbbrNS, "consentDecision"); xmlw.writeAttribute("storeId", "ID-AUTOGENERATED"); |
|
From: Johan T. <jt...@us...> - 2006-10-11 14:36:53
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18244/schemas Modified Files: RBBR_Exchange_example.xml Log Message: Show an example of the element 'rbbr:multiplicity'. Index: RBBR_Exchange_example.xml =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR_Exchange_example.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- RBBR_Exchange_example.xml 21 Jun 2006 14:14:59 -0000 1.3 +++ RBBR_Exchange_example.xml 11 Oct 2006 14:36:42 -0000 1.4 @@ -1,11 +1,11 @@ <?xml version='1.0' encoding='UTF-8'?> <xchng:sampleInformation - xmlns:xchng="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.1/" - xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" + xmlns:xchng="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.2/" + xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" xmlns:base="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.1/ RBBR-Exchange.xsd - http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/ RBBR.xsd + xsi:schemaLocation="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.2/ RBBR-Exchange.xsd + http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/ RBBR.xsd http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/ Base.xsd"> <base:countryId>SE</base:countryId> <rbbr:biobankId>136</rbbr:biobankId> @@ -21,6 +21,7 @@ <base:arrivalId>VCMASEN-003644</base:arrivalId> <base:samplingDate>2004-04-20</base:samplingDate> <base:arrivalDate>2004-04-22</base:arrivalDate> + <rbbr:multiplicity type="MULTIPLE">1</rbbr:multiplicity> <base:sampleExistence registrationDate="2004-04-22T08:34:08">DESTROYED</base:sampleExistence> <rbbr:sampleUsageRestriction>true</rbbr:sampleUsageRestriction> <rbbr:sampleOrderingUnitMG>MAKAHJ</rbbr:sampleOrderingUnitMG> |
|
From: Johan T. <jt...@gm...> - 2006-10-11 14:34:56
|
Note that this commit also bumps schema version to 0.2. |
|
From: Johan T. <jt...@us...> - 2006-10-11 14:33:29
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17010/schemas Modified Files: RBBR-Exchange.xsd Log Message: Use element 'rbbr:multiplicity'. Bump schema version to 0.2. Index: RBBR-Exchange.xsd =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR-Exchange.xsd,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- RBBR-Exchange.xsd 15 May 2006 13:24:15 -0000 1.23 +++ RBBR-Exchange.xsd 11 Oct 2006 14:33:26 -0000 1.24 @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- $Id$ --> -<xsd:schema targetNamespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.1/" - xmlns:xchng="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.1/" - xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" +<xsd:schema targetNamespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.2/" + xmlns:xchng="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR-Exchange/0.2/" + xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" xmlns:base="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/ Base.xsd - http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/ RBBR.xsd"> + http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/ RBBR.xsd"> - <xsd:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" schemaLocation="RBBR.xsd"/> + <xsd:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" schemaLocation="RBBR.xsd"/> <xsd:import namespace="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/" schemaLocation="Base.xsd"/> <xsd:annotation> @@ -36,7 +36,7 @@ as is and no guarantee or warranty is given that the information is fit for any particular purpose. The user thereof uses the information at its sole risk and liability. The Community is not liable for any use that may - be made of the information contained herein. + be made of the information contained herein. </xsd:documentation> </xsd:annotation> @@ -143,6 +143,12 @@ </xsd:documentation></xsd:annotation> </xsd:element> + <xsd:element ref="rbbr:multiplicity" minOccurs="0"> + <xsd:annotation><xsd:documentation> + The number of actual samples grouped under this 'mainSampleId'. + </xsd:documentation></xsd:annotation> + </xsd:element> + <xsd:element ref="base:sampleExistence" minOccurs="0"> <xsd:annotation><xsd:documentation> Gives the existence status of the sample. |
|
From: Johan T. <jt...@us...> - 2006-10-11 14:27:01
|
Update of /cvsroot/vienti/vienti/schemas In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14240/schemas Modified Files: RBBR.xsd Log Message: Add element 'multiplicity'. Add the values 'SPECIMEN_SLIDE' and 'PARAFFIN_BLOCK' to 'PreparationResultType'. Note that they exists under 'StorageFormType' too. This is perhaps not totally satisfying, but will have to do for now. Index: RBBR.xsd =================================================================== RCS file: /cvsroot/vienti/vienti/schemas/RBBR.xsd,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- RBBR.xsd 15 May 2006 13:32:29 -0000 1.27 +++ RBBR.xsd 11 Oct 2006 14:26:57 -0000 1.28 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- $Id$ --> -<xsd:schema targetNamespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" - xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.1/" +<xsd:schema targetNamespace="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" + xmlns:rbbr="http://www.biobanksregistersyd.se/XML-schema/ns/RBBR/0.2/" xmlns:base="http://www.biobanksregistersyd.se/XML-schema/ns/Base/0.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -32,7 +32,7 @@ as is and no guarantee or warranty is given that the information is fit for any particular purpose. The user thereof uses the information at its sole risk and liability. The Community is not liable for any use that may - be made of the information contained herein. + be made of the information contained herein. </xsd:documentation> </xsd:annotation> @@ -163,6 +163,51 @@ <!-- ================================================== --> + <xsd:element name="multiplicity"> + <xsd:annotation><xsd:documentation> + The number of actual samples grouped under this 'mainSampleId'. + This construction can be used when a number of samples belonging + to a referral are known to exist, but are not enumerable. + This makes the creation of an identifying code for each sample + possibly counter-productive. If this element is omitted it is + to be assumed that the sample describes one and only one + physical sample. + This element can also be used to signal that the physical + sample has been destructed, by stating a value of zero. + However, see also 'base:sampleExistence'. + </xsd:documentation></xsd:annotation> + <xsd:complexType> + <xsd:simpleContent> + <xsd:extension base="xsd:nonNegativeInteger"> + <xsd:attribute name="type" use="required"> + <xsd:annotation><xsd:documentation> + Explictly describes the type of multiplicity used, either + 'SINGLE' or 'MULTIPLE'. If multiplictly is given with an + value of '1', there is no way of knowing if there is a + possibility that more sample could exists. + </xsd:documentation></xsd:annotation> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="SINGLE"> + <xsd:annotation><xsd:documentation> + The logical sample describes one and only one physical sample. + </xsd:documentation></xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="MULTIPLE"> + <xsd:annotation><xsd:documentation> + The logical sample describes one or several physical samples. + </xsd:documentation></xsd:annotation> + </xsd:enumeration> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + </xsd:element> + + <!-- ================================================== --> + <xsd:element name="sampleUsageRestriction"> <xsd:annotation><xsd:documentation> If the sample has usage restrictions (true) or not (false) @@ -752,6 +797,16 @@ unspecified (Swedish: "ospecificerat") </xsd:documentation></xsd:annotation> </xsd:enumeration> + <xsd:enumeration value="SPECIMEN_SLIDE"> + <xsd:annotation><xsd:documentation> + specimen slide (Swedish: "preparatglas") + </xsd:documentation></xsd:annotation> + </xsd:enumeration> + <xsd:enumeration value="PARAFFIN_BLOCK"> + <xsd:annotation><xsd:documentation> + paraffin block (Swedish: "paraffinkloss") + </xsd:documentation></xsd:annotation> + </xsd:enumeration> </xsd:restriction> </xsd:simpleType> |
|
From: Johan T. <jt...@us...> - 2006-10-11 14:11:07
|
Update of /cvsroot/vienti/vienti/.settings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8080/.settings Modified Files: org.eclipse.jdt.core.prefs org.eclipse.jdt.ui.prefs Log Message: MF. Index: org.eclipse.jdt.core.prefs =================================================================== RCS file: /cvsroot/vienti/vienti/.settings/org.eclipse.jdt.core.prefs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org.eclipse.jdt.core.prefs 1 Feb 2006 15:27:36 -0000 1.1 +++ org.eclipse.jdt.core.prefs 11 Oct 2006 14:11:02 -0000 1.2 @@ -1,4 +1,4 @@ -#Fri Jan 27 10:45:19 CET 2006 +#Mon Jun 19 18:13:59 CEST 2006 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 Index: org.eclipse.jdt.ui.prefs =================================================================== RCS file: /cvsroot/vienti/vienti/.settings/org.eclipse.jdt.ui.prefs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org.eclipse.jdt.ui.prefs 1 Feb 2006 15:27:38 -0000 1.1 +++ org.eclipse.jdt.ui.prefs 11 Oct 2006 14:11:02 -0000 1.2 @@ -1,3 +1,4 @@ -#Fri Jan 27 10:45:19 CET 2006 +#Mon Jun 19 17:20:51 CEST 2006 eclipse.preferences.version=1 +formatter_settings_version=8 internal.default.compliance=default |