Add support for multi-page main menu
This commit is contained in:
@@ -74,7 +74,14 @@ async def cmd_reports(proc, mrn, alpha, omega):
|
||||
else:
|
||||
print(repr(before))
|
||||
assert False
|
||||
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()
|
||||
text = re.sub(r'\r\n\s+>> CONTINUATION OF .+? <<(?:(?:\r\n)|(?:\s+page \d+))', '', '\r\n'.join(pages))
|
||||
positions = [m.start() for m in re.finditer(r'(?:(?:[ ]+----MICROBIOLOGY----[ ]+page \d+\r\n\r\n)|(?:[ ]+))Reporting Lab:', text)]
|
||||
|
Reference in New Issue
Block a user