Specimen
- class fhir_biobank.specimen.SpecimenResource(specimen_id: str, identifier: str, specimen_material_code: str, subject: fhir_biobank.patient.PatientResource, collected_date: datetime.date, quantity: float, body_site_collection_code: Optional[str] = None, quantity_unit: Optional[str] = None, quantity_unit_code: Optional[str] = None, extensions: Optional[List[Union[fhir_biobank.diagnosis.Diagnosis, fhir_biobank.custodian.Custodian, fhir_biobank.storageTemperature.StorageTemperature]]] = None, identifier_type: str = 'ACSN')[source]
Bases:
objectThis class represents all the necessary information needed for a sample to be used for analysis.
- Parameters
specimen_id (string) – Internal id that represents unique specimen, and is used for references to other resources
identifier (string) – used to uniquely identify specimen inside the transactions between biobanks.
specimen_material_code (string) – Type of material that forms the specimen. Correct values are: “whole-blood”, “bone-marrow”, “buffy-coat”, “dried-whole-blood”, “peripheral-blood-cells-vital”, “blood-plasma”, “plasma-edta”, “plasma-citrat”, “plasma-heparin”, “plasma-cell-free”, “plasma-other”, “blood-serum”, “ascites”, “csf-liquor”, “saliva”, “stool-faeces”,”urine”, “swab”, “liquid-other”, “tissue-ffpe”, “tumor-tissue-ffpe”, “normal-tissue-ffpe”, “other-tissue-ffpe”, “tissue-frozen”, “tumor-tissue-frozen”, “normal-tissue-frozen”, “other-tissue-frozen”, “tissue-other”, “dna”, “cf-dna”, “g-dna”, “rna”, “derivative-other”
subject (PatientResource) – class “PatientResource” representing patient from which the specimen was taken.
body_site_collection_code (string) – Code of the location that the specimen was collected from. Code comes from SNOMED CT
collected_date (date) – Time when specimen was collected from patient.
quantity (float) – quantity of specimen.
quantity_unit (string) – Unit of measure for quantity.
quantity_unit_code (string) – UCUM code of the quantity unit
extensions (List[Union[Diagnosis, Custodian, StorageTemperature]]) – List of extensions that provide addition information about the specimen. For example StorageTemperature provides additional info about how the specimen is stored
identifier_type (Optional[string]) – a coded type for the identifier that can be used to determine specific purpose of the identifier. default value is “ACSN” correct values are : “DL”, “PPN”, “BRN”, “MR”, “MCN”, “EN”, “TAX”, “NIIP”,”PRN”, “MD”, “DR”, “ACSN”, “UDI”, “SNO”, “SB”, “PLAC”, “FILL”, “JHN”. For more info see https://simplifier.net/packages/hl7.fhir.r4.core/4.0.1/files/82653
- Raises
TypeError – This exception is raised when incorrect types of arguments are provided
ValueError – This exception is raised when incorrect value in argument is provided
- property FHIRInterpretation
Getter for a FHIR object that is created from this class.
- Returns
Specimen in a correct FHIR interpretation
- property bodySiteCollectionCode
Getter for a body site collection code - code that defines from which part of the body the specimen was taken from.
- Returns
Code of the body site
- property collectedDateTime
Getter for a collected date. Indicates date which the specimen was taken.
- Returns
date of the specimen collection
- property extensions
Getter for list of extensions - additional information about the specimen.
- Returns
List of extensions.
- property identifier
Getter for identifier of the specimen.
- Returns
Identifier of the specimen
- property identifierType
Getter for a type of the indentifier that identifies the specimen.
- Returns
code for the type of identifier
- property quantity
Getter for a quantity of the specimen.
- Returns
quantity of the specimen
- property quantityUnit
Getter for a unit that the quantity is measured with.
- Returns
unit that the quantity is measured with
- property quantityUnitCode
Getter for a code that defines the quantityUnit.
- Returns
code of the unit that the quantity is measured with
- property specimenId
Getter for a internal id that represents unique Specimen.
- Returns
str internal id used for references to other resources
- specimenJSON()[source]
Method that creates JSON representation of a Specimen Resource.
- Returns
FHIR Specimen resource represented in a json format.
- property specimenMaterialCode
Getter for specimen material code - code that defines type of material which forms specimen.
- Returns
Code of the material
- property subject
Getter for a subject - PatientResource that the specimen comes from.
- Returns
PatientResource indicating patient from which the specimen comes from