Exemplo n.º 1
0
def gem():
    forward = request.args.get("forward") == "1"
    diagnosis = request.args.get("diagnosis")
    q = request.args.get("q")
    valid_code = True
    matches = []

    try:
        matches = Mapper.get_mapped_codes(code=q, forward=forward, diagnosis=diagnosis)
    except Mapper.InvalidIcdCode:
        valid_code = False

    return render_template(
        "gem.html", q=q, matches=matches, forward=forward, diagnosis=diagnosis, valid_code=valid_code
    )
Exemplo n.º 2
0
def gem():
    forward = request.args.get('forward') == "1"
    diagnosis = request.args.get('diagnosis')
    q = request.args.get('q')
    valid_code = True
    matches = []

    try:
        matches = Mapper.get_mapped_codes(
                code=q,
                forward=forward,
                diagnosis=diagnosis)
    except Mapper.InvalidIcdCode:
        valid_code = False

    return render_template('gem.html',
            q=q,
            matches=matches,
            forward=forward,
            diagnosis=diagnosis,
            valid_code=valid_code,
            )
Exemplo n.º 3
0
 def test_get_mapped_codes(self):
     self.assertEqual(len(Mapper.get_mapped_codes(code='015.20', forward=True, diagnosis=True)), 1)