From b39d3894ede4038175d44059766dc8556497229c Mon Sep 17 00:00:00 2001 From: Rick Hays Date: Wed, 25 Sep 2019 17:47:10 -0500 Subject: [PATCH 1/3] Update 'README.md' --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cc50433..8745c83 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,26 @@ application. closest pharmacy to the input latitude/longitude. 2. The API will return the closest pharmacy (with name and address) in a consumable response packet. 3. The API will include the distance (in miles) between the input latitude/longitude and the selected closest pharmacy -in the response packet. \ No newline at end of file +in the response packet. + + + +----- + + +Database is a SQLite + +Table Schema + +``` +create table pharmacies +( + Pharmacy TEXT not null, + Address TEXT, + City TEXT, + State TEXT, + Zip TEXT, + Latitude REAL not null, + Longitude REAL not null +); +``` From b30090d6e597ff8f9d7359d5b62a89e79067106c Mon Sep 17 00:00:00 2001 From: Rick Hays Date: Wed, 25 Sep 2019 20:55:29 -0500 Subject: [PATCH 2/3] Update 'README.md' Finished basic readme.md file for project. --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8745c83..547a9ac 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ application. ### Business Requirements 1. The API will receive a latitude/longitude, using the provided list in pharmacies.csv the API will calculate the closest pharmacy to the input latitude/longitude. -2. The API will return the closest pharmacy (with name and address) in a consumable response packet. 3. The -API will include the distance (in miles) between the input latitude/longitude and the selected closest pharmacy +2. The API will return the closest pharmacy (with name and address) in a consumable response packet. +3. The API will include the distance (in miles) between the input latitude/longitude and the selected closest pharmacy in the response packet. @@ -38,3 +38,15 @@ create table pharmacies Longitude REAL not null ); ``` + +----- + +Call: https://rhays.us/Examples/RX_API_Call/RX.php?K=RLH1234&Latitude=39.1030&Longitude=-95.3222 + +This is a basic lookup system to find the closest pharmacy to a given Lat/Lon + +My assumptions: +1) No clear request for distance, options are drive distance or straight line distance, I chose: straight line distance. +2) No request trap errors, I added a few, validation, key check, request check, and a basic DB check. +3) Output was requested as a packet but not the type, so I just passed the requested data back as text and not JSON. + From 9938f98aabedb592b52cb833dd95089ef733e77b Mon Sep 17 00:00:00 2001 From: Rick Hays Date: Wed, 25 Sep 2019 20:57:16 -0500 Subject: [PATCH 3/3] Update 'README.md' fixed a few oops I saw. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 547a9ac..170b09a 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Call: https://rhays.us/Examples/RX_API_Call/RX.php?K=RLH1234&Latitude=39.1030&Lo This is a basic lookup system to find the closest pharmacy to a given Lat/Lon My assumptions: -1) No clear request for distance, options are drive distance or straight line distance, I chose: straight line distance. -2) No request trap errors, I added a few, validation, key check, request check, and a basic DB check. -3) Output was requested as a packet but not the type, so I just passed the requested data back as text and not JSON. +1. No clear request for distance, options are drive distance or straight line distance, I chose: straight line distance. +2. No request for trap errors, I added a few, validation, key check, request check, and a basic DB check. +3. Output was requested as a packet but not the type, so I just passed the requested data back as text and not JSON.