Skip to content

Commit

Permalink
Merge pull request #9 from laszlo462/develop
Browse files Browse the repository at this point in the history
Beta v0.2.0 release PR
  • Loading branch information
laszlo462 authored Mar 14, 2019
2 parents 1f2e0ed + 790359d commit cdf7ace
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 20 deletions.
70 changes: 70 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"port": 5678,
"host": "localhost",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
},
{
"name": "Python: Module",
"type": "python",
"request": "launch",
"module": "enter-your-module-name-here",
"console": "integratedTerminal"
},
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"console": "integratedTerminal",
"args": [
"runserver",
"--noreload",
"--nothreading"
],
"django": true
},
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py"
},
"args": [
"run",
"--no-debugger",
"--no-reload"
],
"jinja": true
},
{
"name": "Python: Current File (External Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "externalTerminal"
}
]
}
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# IBE-RESTester

[![Tagged Release](https://img.shields.io/badge/release-v0.1.0-blue.svg?longCache=true)](CHANGELOG.md)
[![Development Status](https://img.shields.io/badge/status-alpha-yellow.svg?longCache=true)](ROADMAP.md)
[![Tagged Release](https://img.shields.io/badge/release-v0.2.0-blue.svg?longCache=true)](CHANGELOG.md)
[![Development Status](https://img.shields.io/badge/status-beta-brightgreen.svg?longCache=true)](ROADMAP.md)
[![Build Status](https://img.shields.io/badge/build-unknown-lightgrey.svg?longCache=true)](https://travis-ci.org)
[![Build Status](https://img.shields.io/badge/build-pending-lightgrey.svg?longCache=true)](https://www.appveyor.com)
[![Build Coverage](https://img.shields.io/badge/coverage-0%25-lightgrey.svg?longCache=true)](https://codecov.io)
Expand All @@ -27,19 +27,27 @@ The IBE-RESTester project aims to facilitate easy testing of DLL to IBE particip
## Features

- Simple verification of the DynaLync participant queries of the IBE database.
- Query against a patient MRN, EnterpriseID, Name, or Date of Birth.
- Query types availabe:
- [x] Patient MRN
- [x] Enterprise ID
- [x] Name
- [x] Date of Birth
- [ ] CT Orders (_comming soon_)

## Requirements

Currently the only requirement is Python3.
Python 3 should only be required for development.

## Usage

Ensure Python 3.x is installed via `python -V`
See [RELEASES](https://github.com/laszlo462/IBE-RESTester/releases) to download the standalone .exe application.

Open command prompt to ./src directory and execute the script via `python ibequery.py`.
## Usage

Input the IP Address of the IBE, then the Participant MRN as prompted. The JSON response from IBE will be displayed.
- Download the Windows executable package from [RELEASES](https://github.com/laszlo462/IBE-RESTester/releases)
- Double click on **ibequery.exe** to launch the application
- Input the IBE's IP Address if required (will attempt to auto-detect)
- Select the query type
- Input your query parameters and hit enter
- The JSON response from IBE will be displayed

## Development

Expand Down
6 changes: 4 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- [x] ![Development Status](https://img.shields.io/badge/status-planning-lightgrey.svg?longCache=true)
- [x] ![Development Status](https://img.shields.io/badge/status-pre--alpha-red.svg?longCache=true)
- [x] ![Development Status](https://img.shields.io/badge/status-alpha-yellow.svg?longCache=true)
- [ ] ![Development Status](https://img.shields.io/badge/status-beta-brightgreen.svg?longCache=true)
- [x] ![Development Status](https://img.shields.io/badge/status-beta-brightgreen.svg?longCache=true)
- [ ] ![Development Status](https://img.shields.io/badge/status-stable-blue.svg?longCache=true)
- [ ] ![Development Status](https://img.shields.io/badge/status-mature-8A2BE2.svg?longCache=true)
- [ ] ![Development Status](https://img.shields.io/badge/status-inactive-lightgrey.svg?longCache=true)
Expand All @@ -14,6 +14,8 @@

- [x] Release Version 0.1.0 (Pre-Alpha)
- [x] Release Version 0.1.0 (Alpha)
- [ ] Release Version 0.x.0 (Beta)
- [x] Release Version 0.2.0 (Beta)
- Project is now in a distributable state as a native .exe console application.
- PyInstaller being used to build executable.
- [ ] Release Version 1.0.0 (Stable)
- [ ] Release Version x.0.0 (Mature)
32 changes: 23 additions & 9 deletions src/ibequery.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import json
import logging
import os
import re
import ipaddress
import socket

logging.basicConfig(level=logging.DEBUG,
Expand Down Expand Up @@ -50,14 +50,28 @@ def query_select(qmenu):

def ibe_address():
# Obtain the local IP address for default, ask user to input IP address.
local_ip = get_ip()
logging.debug("Obtained a local IP of " + local_ip)
print("Please enter IBE IP address, or press Enter to accept default shown:")
ibehost = input("[" + local_ip + "]: ")

# TODO: Regex IP validation
# ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
# TODO: If Rhapsody service is present, execute get_ip(). If IBE_HOST ENV variable is present, use that.
# Now also checking for IBE_HOST environment variable on a DynaLync system
while True:
try:
if os.environ.get("IBE_HOST") is not None:
print("DynaLync IBE_HOST env variable detected")
local_ip = os.environ["IBE_HOST"]
else:
local_ip = get_ip()

logging.debug("Obtained IP address: " + local_ip)
print(
"Please enter IBE IP address, or press Enter to accept the detected address:")
ibehost = input("[" + local_ip + "]: ")
if not ibehost:
ibehost = local_ip
# Verify legitimate IP address
ibehostvalidate = ipaddress.ip_address(ibehost)
except ValueError:
print("Invalid IP address! Please double-check the IP.")
continue
break

return ibehost


Expand Down

0 comments on commit cdf7ace

Please sign in to comment.