scout/adapter/mongo/variant_events.py
def order_verification(self, institute, case, user, link, variant):
        """Create an event for a variant verification for a variant
        and an event for a variant verification for a case

        Arguments:
            institute (dict): A Institute object
            case (dict): Case object
            user (dict): A User object
            link (str): The url to be used in the event
            variant (dict): A variant object

        Returns:
            updated_variant(dict)
        """
        LOG.info("Creating event for ordering validation for variant" \
                    " {0}".format(variant['display_name']))

        updated_variant = self.variant_collection.find_one_and_update(
            {'_id': variant['_id']},
            {'$set': {'sanger_ordered': True}},
            return_document=pymongo.ReturnDocument.AFTER
        )

        self.create_event(
            institute=institute,
            case=case,
            user=user,
            link=link,
            category='variant',
            verb='sanger',
            variant=variant,
            subject=variant['display_name'],
        )

        LOG.info("Creating event for ordering sanger for case" \
                    " {0}".format(case['display_name']))

        self.create_event(
            institute=institute,
            case=case,
            user=user,
            link=link,
            category='case',
            verb='sanger',
            variant=variant,
            subject=variant['display_name'],
        )
        return updated_variant
def order_verification(self, institute, case, user, link, variant):
        LOG.info("Creating event for ordering validation for variant" \
                    " {0}".format(variant['display_name']))

        updated_variant = self.variant_collection.find_one_and_update(
            {'_id': variant['_id']},
            {'$set': {'sanger_ordered': True}},
            return_document=pymongo.ReturnDocument.AFTER
        )

        self.create_event(
            institute=institute,
            case=case,
            user=user,
            link=link,
            category='variant',
            verb='sanger',
            variant=variant,
            subject=variant['display_name'],
        )

        LOG.info("Creating event for ordering sanger for case" \
                    " {0}".format(case['display_name']))

        self.create_event(
            institute=institute,
            case=case,
            user=user,
            link=link,
            category='case',
            verb='sanger',
            variant=variant,
            subject=variant['display_name'],
        )
        return updated_variant
def order_verification ( self , institute , case , user , link , variant ) : LOG . info ( "Creating event for ordering validation for variant" " {0}" . format ( variant [ 'display_name' ] ) ) updated_variant = self . variant_collection . find_one_and_update ( { '_id' : variant [ '_id' ] } , { '$set' : { 'sanger_ordered' : True } } , return_document = pymongo . ReturnDocument . AFTER ) self . create_event ( institute = institute , case = case , user = user , link = link , category = 'variant' , verb = 'sanger' , variant = variant , subject = variant [ 'display_name' ] , ) LOG . info ( "Creating event for ordering sanger for case" " {0}" . format ( case [ 'display_name' ] ) ) self . create_event ( institute = institute , case = case , user = user , link = link , category = 'case' , verb = 'sanger' , variant = variant , subject = variant [ 'display_name' ] , ) return updated_variant
Create an event for a variant verification for a variant
        and an event for a variant verification for a case

        Arguments:
            institute (dict): A Institute object
            case (dict): Case object
            user (dict): A User object
            link (str): The url to be used in the event
            variant (dict): A variant object

        Returns:
            updated_variant(dict)
Create an event for a variant verification for a variant and an event for a variant verification for a case