Skip to content

Commit

Permalink
Merge pull request #367 from onc-healthit/add_chpl_list_dec
Browse files Browse the repository at this point in the history
Fix for daily download, endpoint list for dec
  • Loading branch information
pwbarker authored Dec 19, 2023
2 parents 0031f0c + 21a5e43 commit 4238b66
Show file tree
Hide file tree
Showing 47 changed files with 53,117 additions and 16,284 deletions.
2 changes: 1 addition & 1 deletion api/download/restendpoints.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function(res) {
st <- format(Sys.time(), "%Y-%m-%d")
filename <- paste("fhir_endpoints_", st, ".csv", sep = "")
if (!file.exists(filename)) {
write.csv(get_fhir_endpoints_tbl(db_tables), file=filename, row.names=FALSE)
write.csv(download_data(db_tables), file=filename, row.names=FALSE)
}
include_file(filename, res, content_type = "text/csv")
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ var MEDENTURL = "https://www.medent.com/std_api/ServiceBaseURL.csv"
var CarepathsURL = "https://carepaths.com/uploads/org_endpoint_bundle.json"
var athenaClinicalsURL = "https://docs.athenahealth.com/api/guides/base-fhir-urls"
var canvasMedicalURL = "https://docs.canvasmedical.com/api/service-base-urls/"
var veradigmURL = "https://open.platform.veradigm.com/fhirendpoints"

func QueryCHPLEndpointList(chplURL string, fileToWriteTo string) {

Expand Down Expand Up @@ -384,6 +385,8 @@ func QueryCHPLEndpointList(chplURL string, fileToWriteTo string) {
CSVParser(MEDENTURL, fileToWriteTo, "./ServiceBaseURL.csv", 1, 0, true, 1, 0)
} else if URLsEqual(chplURL, canvasMedicalURL) {
CanvasMedicalURLWebscraper(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, veradigmURL) {
BundleQuerierParser("https://open.platform.veradigm.com/fhirendpoints/download/R4", fileToWriteTo)
}
}

Expand Down
2 changes: 1 addition & 1 deletion endpointmanager/pkg/chplquerier/productquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/onc-healthit/lantern-back-end/endpointmanager/pkg/endpointmanager/postgresql"
)

var chplAPICertProdListPath string = "/search/v2"
var chplAPICertProdListPath string = "/search/v3"

type chplEndpointListProductInfo struct {
ListSourceURL string `json:"listSourceURL"`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build integration
// +build integration

package chplquerier
Expand Down Expand Up @@ -407,7 +408,7 @@ func Test_GetCHPLProducts(t *testing.T) {
// also checks what happens when an http request fails

hook := logtest.NewGlobal()
expectedErr := "Got error:\nmaking the GET request to the CHPL server failed: Get \"https://chpl.healthit.gov/rest/search/v2?api_key=tmp_api_key&pageNumber=0&pageSize=100\": context canceled"
expectedErr := "Got error:\nmaking the GET request to the CHPL server failed: Get \"https://chpl.healthit.gov/rest/search/v3?api_key=tmp_api_key&pageNumber=0&pageSize=100\": context canceled"
tc, err = basicTestClient()
th.Assert(t, err == nil, err)
defer tc.Close()
Expand Down
4 changes: 2 additions & 2 deletions endpointmanager/pkg/chplquerier/productquerier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func Test_makeCHPLProductURL(t *testing.T) {
viper.Set("chplapikey", "tmp_api_key")
defer viper.Set("chplapikey", apiKey)

expected := "https://chpl.healthit.gov/rest/search/v2?api_key=tmp_api_key&pageNumber=0&pageSize=100"
expected := "https://chpl.healthit.gov/rest/search/v3?api_key=tmp_api_key&pageNumber=0&pageSize=100"
pageSize := 100
pageNumber := 0

Expand Down Expand Up @@ -619,7 +619,7 @@ func Test_getProductJSON(t *testing.T) {

// test http status != 200

expectedErr = "Got error:\nCHPL request responded with status: 404 Not Found\n\nfrom URL: https://chpl.healthit.gov/rest/search/v2?api_key=tmp_api_key&pageNumber=0&pageSize=100"
expectedErr = "Got error:\nCHPL request responded with status: 404 Not Found\n\nfrom URL: https://chpl.healthit.gov/rest/search/v3?api_key=tmp_api_key&pageNumber=0&pageSize=100"

tc = th.NewTestClientWith404()
defer tc.Close()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"Endpoints": [
{
"URL": "https://scmprodweb.pv0.hos.allscriptscloud.com/fhir",
"OrganizationName": "PV0",
"URL": "https://fhir.colaneph.com/fhir",
"OrganizationName": "Columbia Nephrology Associates",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://scmprodweb.pv0.hos.allscriptscloud.com/R4/open-Prod",
"OrganizationName": "PV0",
"URL": "https://fhir.colaneph.com/R4/fhir-R4",
"OrganizationName": "Columbia Nephrology Associates",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://scmprodweb.pv0.hos.allscriptscloud.com/R4/fhir-Prod",
"OrganizationName": "PV0",
"URL": "https://fhir.colaneph.com/open",
"OrganizationName": "Columbia Nephrology Associates",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://scmprodweb.pv0.hos.allscriptscloud.com/open",
"OrganizationName": "PV0",
"URL": "https://fhir.colaneph.com/R4/open-R4",
"OrganizationName": "Columbia Nephrology Associates",
"NPIID": "",
"OrganizationZipCode": ""
},
Expand Down Expand Up @@ -49,14 +49,14 @@
"OrganizationZipCode": ""
},
{
"URL": "https://fhir.summithealthcare.net/R4/open-Prod",
"OrganizationName": "Summit Healthcare Association - PROD",
"URL": "https://sunexch.cmc-nh.org/R4/fhir-Prod",
"OrganizationName": "Catholic Medical Center - PRODUCTION",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://fhir.summithealthcare.net/R4/fhir-Prod",
"OrganizationName": "Summit Healthcare Association - PROD",
"URL": "https://sunexch.cmc-nh.org/R4/open-Prod",
"OrganizationName": "Catholic Medical Center - PRODUCTION",
"NPIID": "",
"OrganizationZipCode": ""
}
Expand Down
16 changes: 8 additions & 8 deletions resources/dev_resources/Azalea_Health_1_EndpointSources.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
"URL": "https://api.azaleahealth.com/fhir/R4/southernplains",
"OrganizationName": "Valley Community Hospital",
"NPIID": "",
"OrganizationZipCode": ""
"OrganizationZipCode": "73075"
},
{
"URL": "https://api.azaleahealth.com/fhir/R4/brookhaven",
"OrganizationName": "Brookhaven Hospital",
"NPIID": "",
"OrganizationZipCode": "74128"
},
{
"URL": "https://api.azaleahealth.com/fhir/R4/girard",
Expand All @@ -34,7 +40,7 @@
"URL": "https://api.azaleahealth.com/fhir/R4/reeves-memorial-medical-center",
"OrganizationName": "Reeves Memorial Medical Center",
"NPIID": "",
"OrganizationZipCode": ""
"OrganizationZipCode": "71222"
},
{
"URL": "https://api.azaleahealth.com/fhir/R4/testing-client-network",
Expand All @@ -53,12 +59,6 @@
"OrganizationName": "Healthmark Hospital",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://api.azaleahealth.com/fhir/R4/ness",
"OrganizationName": "Ness County Hospital",
"NPIID": "",
"OrganizationZipCode": ""
}
]
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"Endpoints": [
{
"URL": "https://fhir-modernfamilypractice.canvasmedical.com",
"OrganizationName": "modernfamilypractice",
"NPIID": "",
"OrganizationZipCode": ""
}
]
"Endpoints": null
}
10 changes: 10 additions & 0 deletions resources/dev_resources/Carefluence_EndpointSources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Endpoints": [
{
"URL": "https://classic.carefluence.com/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
}
]
}
20 changes: 10 additions & 10 deletions resources/dev_resources/Drchrono_Inc_EndpointSources.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
{
"Endpoints": [
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/practicezero/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/basepractice/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/practiceone/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_328539/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/basepractice/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_423994/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_328539/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_429622/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_423994/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_203668/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_429622/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_321718/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_203668/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_332866/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_321718/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_283444/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_332866/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_290761/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_283444/r4",
"URL": "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/drchrono/drchrono_214260/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
Expand Down
20 changes: 10 additions & 10 deletions resources/dev_resources/Enable_Healthcare_Inc_EndpointSources.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
{
"Endpoints": [
{
"URL": "https://ehifire.ehiconnect.com/fhir/dhit/practicezero/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/basepractice/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/dhit/practiceone/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/dhit/oapi-test1/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/basepractice/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/dhit/ambulatorypracticeexample1/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/dhit/oapi-test1/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/oapi-test2/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/dhit/ambulatorypracticeexample1/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2002/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/oapi-test2/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2031/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2002/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2036/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2031/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2042/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2036/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2047/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2042/r4",
"URL": "https://ehifire.ehiconnect.com/fhir/ehi/2074/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
{
"Endpoints": [
{
"URL": "https://uat.minerva.integracloud.com/webconnect/#/auth",
"OrganizationName": "Integra – UAT",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://portal.minerva.integracloud.com/minerva/fhir/r4/us-core",
"OrganizationName": "Integra – PROD",
"NPIID": "",
"OrganizationZipCode": ""
}
]
"Endpoints": null
}
12 changes: 6 additions & 6 deletions resources/dev_resources/MEDHOST_EndpointSources.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
"NPIID": "1851946909",
"OrganizationZipCode": ""
},
{
"URL": "https://fhir.yourcareuniverse.net/tenant/e0ca59d7-14ad-4f50-b84d-217ff7cce107",
"OrganizationName": "Alliance Health Woodward",
"NPIID": "1558312553",
"OrganizationZipCode": ""
},
{
"URL": "https://fhir.yourcareuniverse.net/tenant/8e208ec0-3c40-457e-92b1-d5bc8bed18c3",
"OrganizationName": "Alta Vista Regional Hospital",
Expand Down Expand Up @@ -59,6 +53,12 @@
"OrganizationName": "Baptist Beaumont Hospital",
"NPIID": "1093744187",
"OrganizationZipCode": ""
},
{
"URL": "https://fhir.yourcareuniverse.net/tenant/a8c1e524-7a98-4b94-ac39-c13550cd1af2",
"OrganizationName": "Barstow Community Hospital",
"NPIID": "1780655670",
"OrganizationZipCode": ""
}
]
}
12 changes: 0 additions & 12 deletions resources/dev_resources/MedConnect_Inc_EndpointSources.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"Endpoints": [
{
"URL": "https://api.medconnecthealth.com/fhir/dhit/practicezero/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://api.medconnecthealth.com/fhir/dhit/practiceone/r4",
"OrganizationName": "",
"NPIID": "",
"OrganizationZipCode": ""
},
{
"URL": "https://api.medconnecthealth.com/fhir/medconnect/basepractice/r4",
"OrganizationName": "",
Expand Down
Loading

0 comments on commit 4238b66

Please sign in to comment.