Example #1
0
def pl_test014(test_suite_details):
    '''This tests the Problem List via CPRS MENU '''
    testname = sys._getframe().f_code.co_name
    test_driver = TestHelper.TestDriver(testname)

    test_driver.pre_test_run(test_suite_details)
    try:
        test_driver.testname = testname + '_01'
        VistA1 = test_driver.connect_VistA(test_suite_details)
        pl = PLActions(VistA1, user='******', code='1Doc!@#$')
        pl.signon()
        pl.rem_all(ssn='656451234')
        pl.addcsv(ssn='656451234',
                  pfile='./Functional/dataFiles/NISTinpatientdata0.csv')
        pl.verplist(
            ssn='656451234',
            vlist=['Essential', 'Chronic', 'Acute myocardial', 'Congestive'])
        pl.signoff()

        test_driver.testname = testname + '_02'
        VistA2 = test_driver.connect_VistA(test_suite_details)
        cp = CPRSActions(VistA2, user='******', code='1Doc!@#$')
        cp.signon()
        cp.cprs_cc_addcomment(ssn='656451234',
                              plnum='2',
                              comment='this is a test')
        cp.cprs_cc_edit(ssn='656451234',
                        plnum='2',
                        loc='VISTA',
                        edititem='4',
                        editvalue='SMITH')
        cp.cprs_cc_verify(ssn='656451234', plnum='2', vtext='Chronic')
        cp.cprs_cc_detdisplay(ssn='656451234',
                              plnum='2',
                              vlist=['Chronic', 'SMITH,MARY'])
        cp.cprs_cc_inactivate(ssn='656451234', plnum='1')
        cp.cprs_cc_remove(ssn='656451234', plnum='4')
        cp.cprs_cc_remove(ssn='656451234', plnum='3')
        cp.cprs_cc_remove(ssn='656451234', plnum='2')
        cp.cprs_cc_remove(ssn='656451234', plnum='1')
        cp.signoff()

        test_driver.post_test_run(test_suite_details)
    except TestHelper.TestError, e:
        test_driver.exception_handling(test_suite_details, e)
Example #2
0
def pl_test014(resultlog, result_dir, namespace):
    '''This tests the Problem List via CPRS MENU '''
    testname = sys._getframe().f_code.co_name
    resultlog.write('\n' + testname + ', '
                    + str(datetime.datetime.today()) + ': ')
    logging.debug('\n' + testname + ', ' + str(datetime.datetime.today()) + ': ')
    try:
        VistA1 = connect_VistA(testname, result_dir, namespace)
        pl = PLActions(VistA1, user='******', code='1Doc!@#$')
        pl.signon()
        pl.rem_all(ssn='656451234')
        pl.addcsv(ssn='656451234', pfile='./Functional/dataFiles/NISTinpatientdata0.csv')
        pl.verplist(ssn='656451234', vlist=['Essential Hypertension',
                                    'Chronic airway obstruction',
                                    'Acute myocardial',
                                    'Congestive Heart Failure'])
        pl.signoff()
        VistA2 = connect_VistA(testname, result_dir, namespace)
        cp = CPRSActions(VistA2, user='******', code='1Doc!@#$')
        cp.signon()
        cp.cprs_cc_addcomment(ssn='656451234', plnum='2', comment='this is a test')
        cp.cprs_cc_edit(ssn='656451234', plnum='2', loc='VISTA', edititem='4', editvalue='SMITH')
        cp.cprs_cc_verify(ssn='656451234', plnum='2', vtext='Chronic airway obstruction')
        cp.cprs_cc_detdisplay(ssn='656451234', plnum='2', vlist=['Chronic airway obstruction', 'SMITH,MARY'])
        cp.cprs_cc_inactivate(ssn='656451234', plnum='1')
        cp.cprs_cc_remove(ssn='656451234', plnum='4')
        cp.cprs_cc_remove(ssn='656451234', plnum='3')
        cp.cprs_cc_remove(ssn='656451234', plnum='2')
        cp.cprs_cc_remove(ssn='656451234', plnum='1')
        cp.signoff()
    except TestHelper.TestError, e:
        resultlog.write(e.value)
        logging.error(testname + ' EXCEPTION ERROR: Unexpected test result')
Example #3
0
def pl_test014(resultlog, result_dir, namespace):
    ''' Test Problem List via CPRS MENU '''
    testname = sys._getframe().f_code.co_name
    resultlog.write('\n' + testname + ', ' + str(datetime.datetime.today()) +
                    ': ')
    logging.debug('\n' + testname + ', ' + str(datetime.datetime.today()) +
                  ': ')
    try:
        VistA1 = connect_VistA(testname, result_dir, namespace)
        pl = PLActions(VistA1, user='******', code='1Doc!@#$')
        pl.signon()
        pl.rem_all(ssn='656451234')
        pl.addcsv(ssn='656451234',
                  pfile='./Functional/dataFiles/NISTinpatientdata0.csv')
        pl.verplist(ssn='656451234',
                    vlist=[
                        'Essential Hypertension', 'Chronic airway obstruction',
                        'Acute myocardial', 'Congestive Heart Failure'
                    ])
        pl.signoff()
        VistA2 = connect_VistA(testname, result_dir, namespace)
        cp = CPRSActions(VistA2, user='******', code='1Doc!@#$')
        cp.signon()
        cp.cprs_cc_addcomment(ssn='656451234',
                              plnum='2',
                              comment='this is a test')
        cp.cprs_cc_edit(ssn='656451234',
                        plnum='2',
                        loc='VISTA',
                        edititem='4',
                        editvalue='SMITH')
        cp.cprs_cc_verify(ssn='656451234',
                          plnum='2',
                          vtext='Chronic airway obstruction')
        cp.cprs_cc_detdisplay(
            ssn='656451234',
            plnum='2',
            vlist=['Chronic airway obstruction', 'SMITH,MARY'])
        cp.cprs_cc_inactivate(ssn='656451234', plnum='1')
        cp.cprs_cc_remove(ssn='656451234', plnum='4')
        cp.cprs_cc_remove(ssn='656451234', plnum='3')
        cp.cprs_cc_remove(ssn='656451234', plnum='2')
        cp.cprs_cc_remove(ssn='656451234', plnum='1')
        cp.signoff()
    except TestHelper.TestError, e:
        resultlog.write(e.value)
        logging.error(testname + ' EXCEPTION ERROR: Unexpected test result')
Example #4
0
def pl_test014(test_suite_details):
    '''This tests the Problem List via CPRS MENU '''
    testname = sys._getframe().f_code.co_name
    test_driver = TestHelper.TestDriver(testname)

    test_driver.pre_test_run(test_suite_details)
    try:
        test_driver.testname = testname + '_01'
        VistA1 = test_driver.connect_VistA(test_suite_details)
        pl = PLActions(VistA1, user='******', code='1Doc!@#$')
        pl.signon()
        pl.rem_all(ssn='656451234')
        pl.addcsv(ssn='656451234', pfile='./Functional/dataFiles/NISTinpatientdata0.csv')
        pl.verplist(ssn='656451234', vlist=['Essential',
                                    'Chronic',
                                    'Acute myocardial',
                                    'Congestive'])
        pl.signoff()

        test_driver.testname = testname + '_02'
        VistA2 = test_driver.connect_VistA(test_suite_details)
        cp = CPRSActions(VistA2, user='******', code='1Doc!@#$')
        cp.signon()
        cp.cprs_cc_addcomment(ssn='656451234', plnum='2', comment='this is a test')
        cp.cprs_cc_edit(ssn='656451234', plnum='2', loc='VISTA', edititem='4', editvalue='SMITH')
        cp.cprs_cc_verify(ssn='656451234', plnum='2', vtext='Chronic')
        cp.cprs_cc_detdisplay(ssn='656451234', plnum='2', vlist=['Chronic', 'SMITH,MARY'])
        cp.cprs_cc_inactivate(ssn='656451234', plnum='1')
        cp.cprs_cc_remove(ssn='656451234', plnum='4')
        cp.cprs_cc_remove(ssn='656451234', plnum='3')
        cp.cprs_cc_remove(ssn='656451234', plnum='2')
        cp.cprs_cc_remove(ssn='656451234', plnum='1')
        cp.signoff()

        test_driver.post_test_run(test_suite_details)
    except TestHelper.TestError, e:
        test_driver.exception_handling(test_suite_details, e)
Example #5
0
def pl_test014(resultlog, result_dir, namespace):
    """ Test Problem List via CPRS MENU """
    testname = sys._getframe().f_code.co_name
    resultlog.write("\n" + testname + ", " + str(datetime.datetime.today()) + ": ")
    logging.debug("\n" + testname + ", " + str(datetime.datetime.today()) + ": ")
    try:
        VistA1 = connect_VistA(testname, result_dir, namespace)
        pl = PLActions(VistA1, user="******", code="1Doc!@#$")
        pl.signon()
        pl.rem_all(ssn="656451234")
        pl.addcsv(ssn="656451234", pfile="./Functional/dataFiles/NISTinpatientdata0.csv")
        pl.verplist(
            ssn="656451234",
            vlist=[
                "Essential Hypertension",
                "Chronic airway obstruction",
                "Acute myocardial",
                "Congestive Heart Failure",
            ],
        )
        pl.signoff()
        VistA2 = connect_VistA(testname, result_dir, namespace)
        cp = CPRSActions(VistA2, user="******", code="1Doc!@#$")
        cp.signon()
        cp.cprs_cc_addcomment(ssn="656451234", plnum="2", comment="this is a test")
        cp.cprs_cc_edit(ssn="656451234", plnum="2", loc="VISTA", edititem="4", editvalue="SMITH")
        cp.cprs_cc_verify(ssn="656451234", plnum="2", vtext="Chronic airway obstruction")
        cp.cprs_cc_detdisplay(ssn="656451234", plnum="2", vlist=["Chronic airway obstruction", "SMITH,MARY"])
        cp.cprs_cc_inactivate(ssn="656451234", plnum="1")
        cp.cprs_cc_remove(ssn="656451234", plnum="4")
        cp.cprs_cc_remove(ssn="656451234", plnum="3")
        cp.cprs_cc_remove(ssn="656451234", plnum="2")
        cp.cprs_cc_remove(ssn="656451234", plnum="1")
        cp.signoff()
    except TestHelper.TestError, e:
        resultlog.write(e.value)
        logging.error(testname + " EXCEPTION ERROR: Unexpected test result")