scout/adapter/mongo/acmg.py
def submit_evaluation(self, variant_obj, user_obj, institute_obj, case_obj, link, criteria):
        """Submit an evaluation to the database

        Get all the relevant information, build a evaluation_obj

        Args:
            variant_obj(dict)
            user_obj(dict)
            institute_obj(dict)
            case_obj(dict)
            link(str): variant url
            criteria(list(dict)):

                [
            {
            'term': str,
            'comment': str,
            'links': list(str)
            },
            .
            .
        ]
        """
        variant_specific = variant_obj['_id']
        variant_id = variant_obj['variant_id']
        user_id = user_obj['_id']
        user_name = user_obj.get('name', user_obj['_id'])
        institute_id = institute_obj['_id']
        case_id = case_obj['_id']

        evaluation_terms = [evluation_info['term'] for evluation_info in criteria]

        classification = get_acmg(evaluation_terms)

        evaluation_obj = build_evaluation(
            variant_specific=variant_specific,
            variant_id=variant_id,
            user_id=user_id,
            user_name=user_name,
            institute_id=institute_id,
            case_id=case_id,
            classification=classification,
            criteria=criteria
        )

        self._load_evaluation(evaluation_obj)

        # Update the acmg classification for the variant:
        self.update_acmg(institute_obj, case_obj, user_obj, link, variant_obj, classification)
        return classification
def submit_evaluation(self, variant_obj, user_obj, institute_obj, case_obj, link, criteria):
        """Submit an evaluation to the database

        Get all the relevant information, build a evaluation_obj

        Args:
            variant_obj(dict)
            user_obj(dict)
            institute_obj(dict)
            case_obj(dict)
            link(str): variant url
            criteria(list(dict)):

                [
            {
            'term': str,
            'comment': str,
            'links': list(str)
            },
            .
            .
        ]
        """
        variant_specific = variant_obj['_id']
        variant_id = variant_obj['variant_id']
        user_id = user_obj['_id']
        user_name = user_obj.get('name', user_obj['_id'])
        institute_id = institute_obj['_id']
        case_id = case_obj['_id']

        evaluation_terms = [evluation_info['term'] for evluation_info in criteria]

        classification = get_acmg(evaluation_terms)

        evaluation_obj = build_evaluation(
            variant_specific=variant_specific,
            variant_id=variant_id,
            user_id=user_id,
            user_name=user_name,
            institute_id=institute_id,
            case_id=case_id,
            classification=classification,
            criteria=criteria
        )

        self._load_evaluation(evaluation_obj)

        # Update the acmg classification for the variant:
        self.update_acmg(institute_obj, case_obj, user_obj, link, variant_obj, classification)
        return classification
Submit an evaluation to the database

        Get all the relevant information, build a evaluation_obj

        Args:
            variant_obj(dict)
            user_obj(dict)
            institute_obj(dict)
            case_obj(dict)
            link(str): variant url
            criteria(list(dict)):

                [
            {
            'term': str,
            'comment': str,
            'links': list(str)
            },
            .
            .
        ]