scout/adapter/mongo/clinvar.py
def get_open_clinvar_submission(self, user_id, institute_id):
        """Retrieve the database id of an open clinvar submission for a user and institute,
           if none is available then create a new submission and return it

           Args:
                user_id(str): a user ID
                institute_id(str): an institute ID

           Returns:
                submission(obj) : an open clinvar submission object
        """

        LOG.info("Retrieving an open clinvar submission for user '%s' and institute %s", user_id, institute_id)
        query = dict(user_id=user_id, institute_id=institute_id, status='open')
        submission = self.clinvar_submission_collection.find_one(query)

        # If there is no open submission for this user and institute, create one
        if submission is None:
            submission_id = self.create_submission(user_id, institute_id)
            submission = self.clinvar_submission_collection.find_one({'_id':submission_id})

        return submission
def get_open_clinvar_submission(self, user_id, institute_id):
        LOG.info("Retrieving an open clinvar submission for user '%s' and institute %s", user_id, institute_id)
        query = dict(user_id=user_id, institute_id=institute_id, status='open')
        submission = self.clinvar_submission_collection.find_one(query)

        # If there is no open submission for this user and institute, create one
        if submission is None:
            submission_id = self.create_submission(user_id, institute_id)
            submission = self.clinvar_submission_collection.find_one({'_id':submission_id})

        return submission
def get_open_clinvar_submission ( self , user_id , institute_id ) : LOG . info ( "Retrieving an open clinvar submission for user '%s' and institute %s" , user_id , institute_id ) query = dict ( user_id = user_id , institute_id = institute_id , status = 'open' ) submission = self . clinvar_submission_collection . find_one ( query ) # If there is no open submission for this user and institute, create one if submission is None : submission_id = self . create_submission ( user_id , institute_id ) submission = self . clinvar_submission_collection . find_one ( { '_id' : submission_id } ) return submission
Retrieve the database id of an open clinvar submission for a user and institute,
           if none is available then create a new submission and return it

           Args:
                user_id(str): a user ID
                institute_id(str): an institute ID

           Returns:
                submission(obj) : an open clinvar submission object
Retrieve the database id of an open clinvar submission for a user and institute if none is available then create a new submission and return it