Add support for multi-page main menu
This commit is contained in:
@@ -77,7 +77,14 @@ async def cmd_entries(proc, mrn, alpha, omega):
|
||||
break
|
||||
case _: assert False
|
||||
proc.sendline('^Patient information AND OE/RR')
|
||||
assert await expect.endswith('\r\nSelect Patient Information and OE/RR Option: ', '\r\nSelect Patient Information and OE/RR <TEST ACCOUNT> Option: ')
|
||||
#assert await expect.endswith('\r\nSelect Patient Information and OE/RR Option: ', '\r\nSelect Patient Information and OE/RR <TEST ACCOUNT> Option: ')
|
||||
async for prompt, response in expect.promptmatches((
|
||||
(re.compile(r' Press \'RETURN\' to continue, \'\^\' to stop: $'), None),
|
||||
('Select Patient Information and OE/RR Option: ', None, True),
|
||||
('Select Patient Information and OE/RR <TEST ACCOUNT> Option: ', None, True),
|
||||
), throw=True):
|
||||
if prompt.index == 0:
|
||||
proc.sendline(response)
|
||||
expect.clear()
|
||||
prev = None
|
||||
for m in re.finditer(r'\b\d{2}/\d{2}/\d{2}.*?\r\n\r\n', '\r\n'.join(pages).replace('\x1b[1m', '').replace('\x1b[m', ''), re.DOTALL):
|
||||
|
Reference in New Issue
Block a user