def get_person_by_params(param_dict): """Returns person by its id. Args: person_id (int): corresponds to personId in db Returns: dict: info about person as dict """ return db.get_db_item_by_params(models.Person, schemas.person.ma_schema, param_dict)
def get_lab_contact_by_params(param_dict): """ Returns lab contacts by params. Args: param_dict ([type]): [description] Returns: [type]: [description] """ return db.get_db_item_by_params(models.LabContact, schemas.lab_contact.ma_schema, param_dict)
def get_loaded_sample_by_id(loaded_sample_id): """Returns loaded_sample by its loaded_sampleId. Args: loaded_sample_id (int): corresponds to loaded_sampleId in db Returns: dict: info about loaded_sample as dict """ id_dict = {"loaded_sampleId": loaded_sample_id} return db.get_db_item_by_params(models.LoadedSample, schemas.loaded_sample.ma_schema, id_dict)
def get_auto_proc_by_id(auto_proc_id): """ Returns auto_proc by its id Args: auto_proc_id (int): corresponds to autoProcId in db Returns: dict: info about auto_proc as dict """ data_dict = {"autoProcId": auto_proc_id} return db.get_db_item_by_params(models.AutoProc, schemas.auto_proc.ma_schema, data_dict)
def get_proposal_by_id(proposal_id): """ Returns proposal by its proposalId. Args: proposal_id (int): corresponds to proposalId in db Returns: dict: info about proposal as dict """ id_dict = {"proposalId": proposal_id} return db.get_db_item_by_params(models.Proposal, schemas.proposal.ma_schema, id_dict)
def get_sample_by_id(sample_id): """ Returns sample by its sampleId. Args: sample (int): corresponds to sampleId in db Returns: dict: info about sample as dict """ data_dict = {"blSampleId": sample_id} return db.get_db_item_by_params(models.BLSample, schemas.sample.ma_schema, data_dict)
def get_container_by_id(container_id): """ Returns container by its container_id. Args: container_id (int): corresponds to containerId in db Returns: dict: info about container as dict """ id_dict = {"containerId": container_id} return db.get_db_item_by_params(models.Container, schemas.container.ma_schema, id_dict)
def get_dewar_by_id(dewar_id): """ Returns dewar by its dewar_id. Args: dewar_id (int): corresponds to dewarId in db Returns: dict: info about dewar as dict """ id_dict = {"dewarId": dewar_id} return db.get_db_item_by_params(models.Dewar, schemas.dewar.ma_schema, id_dict)
def get_laboratory_by_id(laboratory_id): """ Returns laboratory info by its laboratoryId. Args: laboratory_id (int): corresponds to laboratoryId in db Returns: dict: info about laboratory as dict """ data_dict = {"laboratoryId": laboratory_id} return db.get_db_item_by_params(models.Laboratory, schemas.laboratory.ma_schema, data_dict)
def get_detector_by_id(detector_id): """ Returns detector by its detectorId. Args: detector_id (int): corresponds to detectorId in db Returns: dict: info about detector as dict """ data_dict = {"detectorId": detector_id} return db.get_db_item_by_params(models.Detector, schemas.detector.ma_schema, data_dict)
def get_crystal_by_id(crystal_id): """ Returns crystal by its crystalId. Args: crystal_id (int): corresponds to crystalId in db Returns: dict: info about crystal as dict """ data_dict = {"crystalId": crystal_id} return db.get_db_item_by_params(models.Crystal, schemas.crystal.ma_schema, data_dict)
def get_robot_action_by_id(robot_action_id): """ Returns robot_action by its robot_actionId. Args: robot_action_id (int): corresponds to beamlineSetupId in db Returns: dict: info about robot_action as dict """ data_dict = {"robotActionId": robot_action_id} return db.get_db_item_by_params(models.RobotAction, schemas.robot_action.ma_schema, data_dict)
def get_beam_calendar_by_id(beam_calendar_id): """ Returns beam_calendar by its beam_calendarId. Args: beam_calendar_id (int): corresponds to beamlineSetupId in db Returns: dict: info about beam_calendar as dict """ data_dict = {"beamCalendarId": beam_calendar_id} return db.get_db_item_by_params( models.BeamCalendar, schemas.beam_calendar.ma_schema, data_dict )
def get_session_by_id(session_id): """ Returns session info by its sessionId. Args: session_id (int): corresponds to sessionId in db Returns: dict: info about session as dict """ data_dict = {"sessionId": session_id} return db.get_db_item_by_params( models.BLSession, schemas.session.ma_schema, data_dict )
def get_auto_proc_status_by_id(auto_proc_status_id): """ Returns auto_proc_status by its auto_proc_statusId. Args: auto_proc_status (int): corresponds to auto_proc_statusId in db Returns: dict: info about auto_proc_status as dict """ data_dict = {"auto_proc_statusId": auto_proc_status_id} return db.get_db_item_by_params(models.AutoProcStatus, schemas.auto_proc_status.ma_schema, data_dict)
def get_protein_by_id(protein_id): """ Returns protein by its proteinId. Args: protein (int): corresponds to proteinId in db Returns: dict: info about protein as dict """ data_dict = {"proteinId": protein_id} return db.get_db_item_by_params( models.Protein, schemas.protein.ma_schema, data_dict )
def get_diffraction_plan_by_id(diffraction_plan_id): """ Returns diffraction_plan by its diffraction_planId. Args: diffraction_plan_id (int): corresponds to diffraction_planId in db Returns: dict: info about diffraction_plan as dict """ data_dict = {"diffractionPlanId": diffraction_plan_id} return db.get_db_item_by_params(models.DiffractionPlan, schemas.diffraction_plan.ma_schema, data_dict)
def get_auto_proc_program_by_id(auto_proc_program_id): """ Returns auto_proc_program by its auto_proc_programId. Args: auto_proc_program (int): corresponds to auto_proc_programId in db Returns: dict: info about auto_proc_program as dict """ data_dict = {"autoProcProgramId": auto_proc_program_id} return db.get_db_item_by_params(models.AutoProcProgram, schemas.auto_proc_program.ma_schema, data_dict)
def get_component_type_by_id(component_type_id): """ Returns component_type by its component_typeId. Args: component_type_id (int): corresponds to component_typeId in db Returns: dict: info about component_type as dict """ data_dict = {"componentTypeId": component_type_id} return db.get_db_item_by_params( models.ComponentType, schemas.component_type.ma_schema, data_dict )
def get_motion_correction_by_id(motion_correction_id): """ Returns motion_correction info by its motion_correctionId. Args: motion_correction_id (int): corresponds to motion_correctionId in db Returns: dict: info about motion_correction as dict """ data_dict = {"motionCorrectionId": motion_correction_id} return db.get_db_item_by_params( models.MotionCorrection, schemas.motion_correction.ma_schema, data_dict )
def get_data_collection_by_id(data_collection_id): """ Returns data_collection by its id. Args: data_collection_id (int): corresponds to dataCollectionId in db Returns: dict: info about data_collection as dict """ data_dict = {"dataCollectionId": data_collection_id} return db.get_db_item_by_params( models.DataCollection, schemas.data_collection.ma_schema, data_dict )
def get_shipment_by_id(shipment_id): """ Returns shipment by its shipmentId. Args: shipment_id (int): corresponds to shipmentId in db Returns: dict: info about shipment as dict """ id_dict = {"shippingId": shipment_id} return db.get_db_item_by_params( models.Shipping, schemas.shipping.ma_schema, id_dict )
def get_beamline_setup_by_id(beamline_setup_id): """ Returns beamline_setup by its beamline_setupId. Args: beamline_setup_id (int): corresponds to beamlineSetupId in db Returns: dict: info about beamline_setup as dict """ data_dict = {"beamLineSetupId": beamline_setup_id} return db.get_db_item_by_params(models.BeamLineSetup, schemas.beamline_setup.ma_schema, data_dict)
def get_data_collection_group_by_id(data_collection_group_id): """ Returns data collection group by its id. Args: data_collection_group_id (int): corresponds to dataCollectionGroupId Returns: dict: info about data collection group as dict """ data_dict = {"dataCollectionGroupId": data_collection_group_id} return db.get_db_item_by_params( models.DataCollectionGroup, schemas.data_collection_group.ma_schema, data_dict )
def get_auto_proc_program_message_by_id(auto_proc_program_message_id): """ Returns auto_proc_program_message by its autoProcProgramMessageId. Args: auto_proc_program_message (int): corresponds to autoProcProgramMessageId Returns: dict: info about auto_proc_program_message as dict """ data_dict = {"autoProcProgramMessageId": auto_proc_program_message_id} return db.get_db_item_by_params( models.AutoProcProgramMessage, schemas.auto_proc_program_message.ma_schema, data_dict, )
def get_auto_proc_program_attachment_by_id(auto_proc_program_attachment_id): """ Returns auto_proc_program_attachment by its auto_proc_program_attachmentId. Args: auto_proc_program_attachment (int): corresponds to autoProcProgramAttachmentId Returns: dict: info about auto_proc_program_attachment as dict """ data_dict = { "autoProcProgramAttachmentId": auto_proc_program_attachment_id } return db.get_db_item_by_params( models.AutoProcProgramAttachment, schemas.auto_proc_program_attachment.ma_schema, data_dict, )