Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that new "Ok?" prompts are accounted for #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions Testing/Functional/RAS/lib/PLActions.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ def addcsv(self, ssn, pfile=None, getrow=None, slist=None):
else:
self.VistA.write("")
break
self.VistA.wait('PROBLEM')
index = self.VistA.multiwait(['O[Kk]','PROBLEM'])
if index == 0:
self.VistA.write('')
self.VistA.wait('PROBLEM')
self.VistA.write('')
self.VistA.wait('Select Action')
self.VistA.write('QUIT')
Expand Down Expand Up @@ -228,8 +231,8 @@ def add(self, ssn, clinic, comment, onsetdate, status, acutechronic,
else:
self.VistA.write('')
while True:
index = self.VistA.multiwait(["PROBLEM:","Select Item",'Select Action'])
if index == 2:
index = self.VistA.multiwait(["O[Kk]","PROBLEM:","Select Item",'Select Action'])
if index == 3:
break
self.VistA.write('')
# optionally, check to make sure user entering the data can't also verify it
Expand Down Expand Up @@ -281,7 +284,10 @@ def addspec(self, ssn, clinic, comment, onsetdate, status, acutechronic,
self.VistA.write('Save')
elif rval == 1:
self.VistA.write('Save')
self.VistA.wait('PROBLEM')
index = self.VistA.multiwait(['O[Kk]','PROBLEM'])
if index == 0:
self.VistA.write('')
self.VistA.wait('PROBLEM')
self.VistA.write('')
if vlist is not None:
while True:
Expand Down Expand Up @@ -335,7 +341,10 @@ def dataentry(self, ssn, provider, clinic, problem, comment, onsetdate, status,
self.VistA.write('Save')
elif rval == 1:
self.VistA.write('Save')
self.VistA.wait('PROBLEM:')
index = self.VistA.multiwait(['O[Kk]','PROBLEM'])
if index == 0:
self.VistA.write('')
self.VistA.wait('PROBLEM')
self.VistA.write('')
self.VistA.wait('Select Action')
self.VistA.write('QUIT')
Expand All @@ -359,7 +368,7 @@ def editsimple(self, ssn, probnum, itemnum, chgval,icd10='',snomed=''):
valIndex=0
valList = [icd10,snomed]
while True:
rval = self.VistA.multiwait(['Select Item', 'Ok','A suitable term','STOP or Select'])
rval = self.VistA.multiwait(['Select Item', 'O[Kk]','A suitable term','STOP or Select'])
if rval == 0:
self.VistA.write('SC')
break
Expand All @@ -370,7 +379,10 @@ def editsimple(self, ssn, probnum, itemnum, chgval,icd10='',snomed=''):
valIndex +=1
elif rval == 3:
self.VistA.write('1')
self.VistA.wait('Select Action')
index = self.VistA.multiwait(['O[Kk]','Select Action'])
if index == 0:
self.VistA.write('')
self.VistA.wait('Select Action')
self.VistA.write('QUIT')
self.VistA.wait('Print a new problem list')
self.VistA.write('N')
Expand All @@ -393,7 +405,10 @@ def editinactivate (self, ssn, probnum, resdate):
self.VistA.write(resdate)
self.VistA.wait('Select Item')
self.VistA.write('SC')
self.VistA.wait('Select Action')
index = self.VistA.multiwait(['O[Kk]','Select Action'])
if index == 0:
self.VistA.write('')
self.VistA.wait('Select Action')
self.VistA.write('QUIT')
self.VistA.wait('Print a new problem list')
self.VistA.write('N')
Expand All @@ -416,7 +431,10 @@ def editactivate (self, ssn, probnum, acutechronic):
self.VistA.write(acutechronic)
self.VistA.wait('Select Item')
self.VistA.write('SC')
self.VistA.wait('Select Action')
index = self.VistA.multiwait(['O[Kk]','Select Action'])
if index == 0:
self.VistA.write('')
self.VistA.wait('Select Action')
self.VistA.write('QUIT')
self.VistA.wait('Print a new problem list')
self.VistA.write('N')
Expand Down Expand Up @@ -1218,7 +1236,7 @@ def editpart2(self, ssn, probnum, itemnum, chgval, icd10='',snomed=''):
probList=[chgval,icd10,snomed]
probIndex = 0
while True:
rval = self.VistA.multiwait(['Select Item', 'Ok','A suitable term'])
rval = self.VistA.multiwait(['Select Item', 'O[kK]','A suitable term'])
if rval == 0:
self.VistA.write('SC')
break
Expand Down