| | 169 | |
| | 170 | == PDO Version 1.1 |
| | 171 | |
| | 172 | === Document XSD |
| | 173 | |
| | 174 | {{{#!xml |
| | 175 | <?xml version="1.0" encoding="UTF-8"?> |
| | 176 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| | 177 | xmlns:pdo="http://www.i2b2.org/xsd/hive/pdo/1.1/" |
| | 178 | targetNamespace="http://www.i2b2.org/xsd/hive/pdo/1.1/" > |
| | 179 | <xs:include schemaLocation="./i2b2_PDODataType.xsd"/> |
| | 180 | |
| | 181 | <xs:element name="patient_data" type="pdo:patient_dataType"/> |
| | 182 | |
| | 183 | <!-- PatientDataType (Top level type) --> |
| | 184 | <xs:complexType name="patient_dataType"> |
| | 185 | <xs:sequence> |
| | 186 | <xs:element ref="pdo:event_set" /> |
| | 187 | <xs:element ref="pdo:concept_set"/> |
| | 188 | <xs:element ref="pdo:modifier_set"/> |
| | 189 | <xs:element ref="pdo:observer_set" /> |
| | 190 | <xs:element ref="pdo:pid_set" /> |
| | 191 | <xs:element ref="pdo:eid_set" /> |
| | 192 | <xs:element ref="pdo:patient_set"/> |
| | 193 | <xs:element ref="pdo:observation_set" maxOccurs="unbounded"/> |
| | 194 | </xs:sequence> |
| | 195 | </xs:complexType> |
| | 196 | |
| | 197 | </xs:schema> |
| | 198 | }}} |
| | 199 | |
| | 200 | === Types XSD |
| | 201 | |
| | 202 | {{{#!xml |
| | 203 | <?xml version="1.0" encoding="UTF-8"?> |
| | 204 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| | 205 | xmlns:pdo="http://www.i2b2.org/xsd/hive/pdo/1.1/" |
| | 206 | xmlns:jxb="http://java.sun.com/xml/ns/jaxb" |
| | 207 | targetNamespace="http://www.i2b2.org/xsd/hive/pdo/1.1/" |
| | 208 | jxb:version="1.0"> |
| | 209 | |
| | 210 | <xs:element name="event_set"> |
| | 211 | <xs:complexType> |
| | 212 | <xs:sequence> |
| | 213 | <xs:element name="event" maxOccurs="unbounded" |
| | 214 | type="pdo:eventType" /> |
| | 215 | </xs:sequence> |
| | 216 | </xs:complexType> |
| | 217 | </xs:element> |
| | 218 | |
| | 219 | <xs:element name="concept_set"> |
| | 220 | <xs:complexType> |
| | 221 | <xs:sequence> |
| | 222 | <xs:element name="concept" maxOccurs="unbounded" |
| | 223 | type="pdo:conceptType" /> |
| | 224 | </xs:sequence> |
| | 225 | </xs:complexType> |
| | 226 | </xs:element> |
| | 227 | |
| | 228 | <xs:element name="modifier_set"> |
| | 229 | <xs:complexType> |
| | 230 | <xs:sequence> |
| | 231 | <xs:element name="modifier" maxOccurs="unbounded" |
| | 232 | type="pdo:modifierType" /> |
| | 233 | </xs:sequence> |
| | 234 | </xs:complexType> |
| | 235 | </xs:element> |
| | 236 | |
| | 237 | <xs:element name="observer_set"> |
| | 238 | <xs:complexType> |
| | 239 | <xs:sequence> |
| | 240 | <xs:element name="observer" maxOccurs="unbounded" |
| | 241 | type="pdo:observerType" /> |
| | 242 | </xs:sequence> |
| | 243 | </xs:complexType> |
| | 244 | </xs:element> |
| | 245 | |
| | 246 | <xs:element name="pid_set"> |
| | 247 | <xs:complexType> |
| | 248 | <xs:sequence> |
| | 249 | <xs:element name="pid" maxOccurs="unbounded" |
| | 250 | type="pdo:pidType" /> |
| | 251 | </xs:sequence> |
| | 252 | </xs:complexType> |
| | 253 | </xs:element> |
| | 254 | |
| | 255 | <xs:element name="eid_set"> |
| | 256 | <xs:complexType> |
| | 257 | <xs:sequence> |
| | 258 | <xs:element name="eid" maxOccurs="unbounded" |
| | 259 | type="pdo:eidType" /> |
| | 260 | </xs:sequence> |
| | 261 | </xs:complexType> |
| | 262 | </xs:element> |
| | 263 | |
| | 264 | <xs:element name="patient_set"> |
| | 265 | <xs:complexType> |
| | 266 | <xs:sequence> |
| | 267 | <xs:element name="patient" maxOccurs="unbounded" |
| | 268 | type="pdo:patientType" /> |
| | 269 | </xs:sequence> |
| | 270 | </xs:complexType> |
| | 271 | </xs:element> |
| | 272 | |
| | 273 | <xs:element name="observation_set"> |
| | 274 | <xs:complexType> |
| | 275 | <xs:sequence> |
| | 276 | <xs:element name="observation" maxOccurs="unbounded" |
| | 277 | type="pdo:observationType" /> |
| | 278 | </xs:sequence> |
| | 279 | <xs:attribute name="panel_name" type="xs:string" |
| | 280 | use="optional" /> |
| | 281 | </xs:complexType> |
| | 282 | </xs:element> |
| | 283 | |
| | 284 | <!-- Reused types starts here--> |
| | 285 | <!-- EventType --> |
| | 286 | <xs:complexType name="eventType"> |
| | 287 | <xs:annotation> |
| | 288 | <xs:documentation> |
| | 289 | One row of data from the visit_dimension table. |
| | 290 | </xs:documentation> |
| | 291 | </xs:annotation> |
| | 292 | <xs:sequence> |
| | 293 | <xs:element name="event_id" minOccurs="1" > |
| | 294 | <xs:complexType > |
| | 295 | <xs:simpleContent> |
| | 296 | <xs:extension base="xs:string"> |
| | 297 | <xs:attribute name="source" type="xs:string" |
| | 298 | default="HIVE" /> |
| | 299 | </xs:extension> |
| | 300 | </xs:simpleContent> |
| | 301 | </xs:complexType> |
| | 302 | </xs:element> |
| | 303 | <xs:element name="patient_id" minOccurs="1" type="pdo:patientIdType"> |
| | 304 | </xs:element> |
| | 305 | <xs:element name="param" type="pdo:paramType" minOccurs="0" |
| | 306 | maxOccurs="unbounded" /> |
| | 307 | <xs:element name="start_date" type="xs:dateTime" /> |
| | 308 | <xs:element name="end_date" type="xs:dateTime" /> |
| | 309 | <xs:element name="event_blob" type="pdo:blobType" |
| | 310 | minOccurs="0" /> |
| | 311 | </xs:sequence> |
| | 312 | <xs:attributeGroup ref="pdo:techDataAttributeGroup" /> |
| | 313 | </xs:complexType> |
| | 314 | <!-- ConceptType --> |
| | 315 | <xs:complexType name="conceptType"> |
| | 316 | <xs:sequence> |
| | 317 | <xs:element name="concept_path" type="xs:string" |
| | 318 | minOccurs="1" /> |
| | 319 | <xs:element name="concept_cd" type="xs:string" |
| | 320 | minOccurs="1" /> |
| | 321 | <xs:element name="name_char" type="xs:string" /> |
| | 322 | <xs:element name="concept_blob" type="pdo:blobType" |
| | 323 | minOccurs="0" /> |
| | 324 | </xs:sequence> |
| | 325 | <xs:attributeGroup ref="pdo:techDataAttributeGroup" /> |
| | 326 | </xs:complexType> |
| | 327 | <!-- ModifierType --> |
| | 328 | <xs:complexType name="modifierType"> |
| | 329 | <xs:sequence> |
| | 330 | <xs:element name="modifier_path" type="xs:string" |
| | 331 | minOccurs="1" /> |
| | 332 | <xs:element name="modifier_cd" type="xs:string" |
| | 333 | minOccurs="1" /> |
| | 334 | <xs:element name="name_char" type="xs:string" /> |
| | 335 | <xs:element name="modifier_blob" type="pdo:blobType" |
| | 336 | minOccurs="0" /> |
| | 337 | </xs:sequence> |
| | 338 | <xs:attributeGroup ref="pdo:techDataAttributeGroup" /> |
| | 339 | </xs:complexType> |
| | 340 | <!-- ObserverType --> |
| | 341 | <xs:complexType name="observerType"> |
| | 342 | <xs:sequence> |
| | 343 | <xs:element name="observer_path" type="xs:string" |
| | 344 | minOccurs="1" /> |
| | 345 | <xs:element name="observer_cd" type="xs:string" |
| | 346 | minOccurs="1" /> |
| | 347 | <xs:element name="name_char" type="xs:string" /> |
| | 348 | <xs:element name="observer_blob" type="pdo:blobType" |
| | 349 | minOccurs="0" /> |
| | 350 | </xs:sequence> |
| | 351 | <xs:attributeGroup ref="pdo:techDataAttributeGroup" /> |
| | 352 | </xs:complexType> |
| | 353 | <!-- PIDType --> |
| | 354 | <xs:complexType name="pidType"> |
| | 355 | <xs:sequence> |
| | 356 | <!-- |
| | 357 | <xs:element name="patient_id" type="pdo:patientIdType" |
| | 358 | minOccurs="1" /> |
| | 359 | --> |
| | 360 | <xs:element name="patient_id" |
| | 361 | minOccurs="1" > |
| | 362 | <xs:complexType> |
| | 363 | <xs:simpleContent> |
| | 364 | <xs:extension base="pdo:patientIdType"> |
| | 365 | <xs:attribute name="status" type="xs:string" |
| | 366 | use="optional" /> |
| | 367 | <xs:attributeGroup |
| | 368 | ref="pdo:techDataAttributeGroup" /> |
| | 369 | </xs:extension> |
| | 370 | </xs:simpleContent> |
| | 371 | </xs:complexType> |
| | 372 | </xs:element> |
| | 373 | <xs:element name="patient_map_id" minOccurs="0" |
| | 374 | maxOccurs="unbounded"> |
| | 375 | <xs:complexType> |
| | 376 | <xs:simpleContent> |
| | 377 | <xs:extension base="xs:string"> |
| | 378 | <xs:attribute name="source" type="xs:string" |
| | 379 | default="HIVE" /> |
| | 380 | <xs:attribute name="status" type="xs:string" |
| | 381 | use="optional" /> |
| | 382 | <xs:attributeGroup |
| | 383 | ref="pdo:techDataAttributeGroup" /> |
| | 384 | </xs:extension> |
| | 385 | </xs:simpleContent> |
| | 386 | </xs:complexType> |
| | 387 | </xs:element> |
| | 388 | </xs:sequence> |
| | 389 | </xs:complexType> |
| | 390 | |
| | 391 | <!-- EIDType --> |
| | 392 | <xs:complexType name="eidType"> |
| | 393 | <xs:sequence> |
| | 394 | <xs:element name="event_id" minOccurs="1"> |
| | 395 | <xs:complexType > |
| | 396 | <xs:simpleContent> |
| | 397 | <xs:extension base="xs:string"> |
| | 398 | <xs:attribute name="source" type="xs:string" |
| | 399 | default="HIVE"/> |
| | 400 | <xs:attribute name="patient_id" type="xs:string" |
| | 401 | /> |
| | 402 | <xs:attribute name="patient_id_source" type="xs:string" |
| | 403 | default="HIVE"/> |
| | 404 | <xs:attribute name="status" type="xs:string" |
| | 405 | use="optional" /> |
| | 406 | <xs:attributeGroup |
| | 407 | ref="pdo:techDataAttributeGroup" /> |
| | 408 | </xs:extension> |
| | 409 | </xs:simpleContent> |
| | 410 | </xs:complexType> |
| | 411 | </xs:element> |
| | 412 | <xs:element name="event_map_id" minOccurs="0" |
| | 413 | maxOccurs="unbounded"> |
| | 414 | <xs:complexType> |
| | 415 | <xs:simpleContent> |
| | 416 | <xs:extension base="xs:string"> |
| | 417 | <xs:attribute name="source" type="xs:string" |
| | 418 | default="HIVE" /> |
| | 419 | <xs:attribute name="patient_id" type="xs:string" |
| | 420 | /> |
| | 421 | <xs:attribute name="patient_id_source" type="xs:string" |
| | 422 | default="HIVE"/> |
| | 423 | <xs:attribute name="status" type="xs:string" |
| | 424 | use="optional" /> |
| | 425 | <xs:attributeGroup |
| | 426 | ref="pdo:techDataAttributeGroup" /> |
| | 427 | </xs:extension> |
| | 428 | </xs:simpleContent> |
| | 429 | </xs:complexType> |
| | 430 | </xs:element> |
| | 431 | </xs:sequence> |
| | 432 | </xs:complexType> |
| | 433 | |
| | 434 | <!-- PatientType --> |
| | 435 | <xs:complexType name="patientType"> |
| | 436 | <xs:sequence> |
| | 437 | <xs:element name="patient_id" type="pdo:patientIdType" |
| | 438 | minOccurs="1" /> |
| | 439 | <xs:element name="param" type="pdo:paramType" minOccurs="0" |
| | 440 | maxOccurs="unbounded" /> |
| | 441 | <xs:element name="patient_blob" type="pdo:blobType" |
| | 442 | minOccurs="0" /> |
| | 443 | </xs:sequence> |
| | 444 | <xs:attributeGroup ref="pdo:techDataAttributeGroup" /> |
| | 445 | </xs:complexType> |
| | 446 | <!-- ObservationType --> |
| | 447 | <xs:complexType name="observationType"> |
| | 448 | <xs:sequence> |
| | 449 | <xs:element name="event_id"> |
| | 450 | <xs:complexType> |
| | 451 | <xs:simpleContent> |
| | 452 | <xs:extension base="xs:string"> |
| | 453 | <xs:attribute name="source" type="xs:string" |
| | 454 | default="HIVE" /> |
| | 455 | </xs:extension> |
| | 456 | </xs:simpleContent> |
| | 457 | </xs:complexType> |
| | 458 | </xs:element> |
| | 459 | <xs:element name="patient_id" type="pdo:patientIdType" |
| | 460 | minOccurs="1" /> |
| | 461 | <xs:element name="concept_cd"> |
| | 462 | <xs:complexType> |
| | 463 | <xs:simpleContent> |
| | 464 | <xs:extension base="xs:string"> |
| | 465 | <xs:attribute name="name" type="xs:string" |
| | 466 | use="required" /> |
| | 467 | </xs:extension> |
| | 468 | </xs:simpleContent> |
| | 469 | </xs:complexType> |
| | 470 | </xs:element> |
| | 471 | <xs:element name="observer_cd"> |
| | 472 | <xs:complexType> |
| | 473 | <xs:simpleContent> |
| | 474 | <xs:extension base="xs:string"> |
| | 475 | <xs:attribute name="name" type="xs:string" |
| | 476 | use="required" /> |
| | 477 | </xs:extension> |
| | 478 | </xs:simpleContent> |
| | 479 | </xs:complexType> |
| | 480 | </xs:element> |
| | 481 | <xs:element name="start_date" type="xs:dateTime" /> |
| | 482 | <xs:element name="modifier_cd"> |
| | 483 | <xs:complexType> |
| | 484 | <xs:simpleContent> |
| | 485 | <xs:extension base="xs:string"> |
| | 486 | <xs:attribute name="name" type="xs:string" |
| | 487 | use="required" /> |
| | 488 | </xs:extension> |
| | 489 | </xs:simpleContent> |
| | 490 | </xs:complexType> |
| | 491 | </xs:element> |
| | 492 | <xs:element name="instance_num"> |
| | 493 | <xs:complexType> |
| | 494 | <xs:simpleContent> |
| | 495 | <xs:extension base="xs:string"> |
| | 496 | </xs:extension> |
| | 497 | </xs:simpleContent> |
| | 498 | </xs:complexType> |
| | 499 | </xs:element> |
| | 500 | <xs:element name="valuetype_cd" type="xs:string" /> |
| | 501 | <xs:element name="tval_char" type="xs:string" /> |
| | 502 | <xs:element name="nval_num"> |
| | 503 | <xs:complexType> |
| | 504 | <xs:simpleContent> |
| | 505 | <xs:extension base="xs:decimal"> |
| | 506 | <xs:attribute name="units" type="xs:string" |
| | 507 | use="required" /> |
| | 508 | </xs:extension> |
| | 509 | </xs:simpleContent> |
| | 510 | </xs:complexType> |
| | 511 | </xs:element> |
| | 512 | <xs:element name="valueflag_cd"> |
| | 513 | <xs:complexType> |
| | 514 | <xs:simpleContent> |
| | 515 | <xs:extension base="xs:string"> |
| | 516 | <xs:attribute name="name" type="xs:string" |
| | 517 | use="required" /> |
| | 518 | </xs:extension> |
| | 519 | </xs:simpleContent> |
| | 520 | </xs:complexType> |
| | 521 | </xs:element> |
| | 522 | <xs:element name="quantity_num" type="xs:decimal" /> |
| | 523 | <xs:element name="units_cd" type="xs:string" /> |
| | 524 | <xs:element name="end_date" type="xs:dateTime" /> |
| | 525 | <xs:element name="location_cd"> |
| | 526 | <xs:complexType> |
| | 527 | <xs:simpleContent> |
| | 528 | <xs:extension base="xs:string"> |
| | 529 | <xs:attribute name="name" type="xs:string" |
| | 530 | use="required" /> |
| | 531 | </xs:extension> |
| | 532 | </xs:simpleContent> |
| | 533 | </xs:complexType> |
| | 534 | </xs:element> |
| | 535 | <xs:element name="confidence_num" type="xs:decimal" /> |
| | 536 | <xs:element name="observation_blob" type="pdo:blobType" |
| | 537 | minOccurs="0" /> |
| | 538 | </xs:sequence> |
| | 539 | <xs:attributeGroup ref="pdo:techDataAttributeGroup" /> |
| | 540 | </xs:complexType> |
| | 541 | |
| | 542 | |
| | 543 | |
| | 544 | <!-- Patient Type --> |
| | 545 | <xs:complexType name="patientIdType"> |
| | 546 | <xs:simpleContent> |
| | 547 | <xs:extension base="xs:string"> |
| | 548 | <xs:attribute name="source" type="xs:string" |
| | 549 | default="HIVE"> |
| | 550 | <xs:annotation> |
| | 551 | <xs:appinfo> |
| | 552 | <jxb:property name="Source" /> |
| | 553 | </xs:appinfo> |
| | 554 | </xs:annotation> |
| | 555 | </xs:attribute> |
| | 556 | </xs:extension> |
| | 557 | </xs:simpleContent> |
| | 558 | </xs:complexType> |
| | 559 | |
| | 560 | <!-- ParamType --> |
| | 561 | <xs:complexType name="paramType"> |
| | 562 | <xs:simpleContent> |
| | 563 | <xs:extension base="xs:string"> |
| | 564 | <xs:attribute name="column" type="xs:string" |
| | 565 | use="optional" /> |
| | 566 | <xs:attribute name="column_descriptor" type="xs:string" |
| | 567 | use="optional" /> |
| | 568 | <xs:attribute name="name" type="xs:string" |
| | 569 | use="optional" /> |
| | 570 | <xs:attribute name="type" type="xs:string" |
| | 571 | use="optional" /> |
| | 572 | </xs:extension> |
| | 573 | </xs:simpleContent> |
| | 574 | </xs:complexType> |
| | 575 | |
| | 576 | <!-- BlobType --> |
| | 577 | <xs:complexType name="blobType" mixed="true"> |
| | 578 | <xs:annotation> |
| | 579 | <xs:documentation> |
| | 580 | A string with all whitespace preserved. This string |
| | 581 | could also contain xml so the type is anyType in order |
| | 582 | for complex element content to be valid. |
| | 583 | </xs:documentation> |
| | 584 | </xs:annotation> |
| | 585 | <xs:complexContent> |
| | 586 | <xs:restriction base="xs:anyType"> |
| | 587 | <xs:sequence> |
| | 588 | <xs:any minOccurs="0" maxOccurs="unbounded" /> |
| | 589 | </xs:sequence> |
| | 590 | </xs:restriction> |
| | 591 | </xs:complexContent> |
| | 592 | </xs:complexType> |
| | 593 | |
| | 594 | <!-- tech data attribute group --> |
| | 595 | <xs:attributeGroup name="techDataAttributeGroup"> |
| | 596 | <xs:annotation> |
| | 597 | <xs:documentation> |
| | 598 | A group of fields that always appear together at the end |
| | 599 | of a table and store annotation or administrative |
| | 600 | information. |
| | 601 | </xs:documentation> |
| | 602 | </xs:annotation> |
| | 603 | <xs:attribute name="update_date" type="xs:dateTime" |
| | 604 | use="optional" /> |
| | 605 | <xs:attribute name="download_date" type="xs:dateTime" |
| | 606 | use="optional" /> |
| | 607 | <xs:attribute name="import_date" type="xs:dateTime" |
| | 608 | use="optional" /> |
| | 609 | <xs:attribute name="sourcesystem_cd" type="xs:string" |
| | 610 | use="optional" /> |
| | 611 | <xs:attribute name="upload_id" type="xs:string" use="optional" /> |
| | 612 | </xs:attributeGroup> |
| | 613 | |
| | 614 | </xs:schema> |
| | 615 | }}} |