Skip to content

Commit

Permalink
Ingesting Sep23 endpoint list
Browse files Browse the repository at this point in the history
  • Loading branch information
svginc committed Oct 10, 2023
1 parent e3c26b7 commit 2a4c232
Show file tree
Hide file tree
Showing 57 changed files with 63,388 additions and 34,719 deletions.
52 changes: 50 additions & 2 deletions endpointmanager/pkg/chplendpointquerier/chplendpointquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var modernizingmedicineURL = "https://mm-fhir-endpoint-display.qa.fhir.ema-api.c
var doc_torURL = "https://hag-fhir.amazingcharts.com/pc/endpoints"
var azaleahealthURL = "https://api.azaleahealth.com/fhir/R4/Endpoint"
var cloudcraftURL = "https://fhirapitest.naiacorp.net/fhir/r4/endpoints/"
var darenasolutionsURL = "https://hub.meldrx.com"
var darenasolutionsURL = "https://api.meldrx.com/Directories/fhir/endpoints"
var glenwoodsystemsURL = "https://static.glaceemr.com/endpoints/urls.json"
var practicefusionURL = "https://www.practicefusion.com/assets/static_files/ServiceBaseURLs.json"
var universalEHRURL = "https://appstudio.interopengine.com/partner/fhirR4endpoints-universalehr.json"
Expand Down Expand Up @@ -119,6 +119,22 @@ var nextechURL = "https://www.nextech.com/hubfs/Nextech%20FHIR%20Base%20URL.csv"
var novomediciURL = "https://www.novomedici.com/api-documents/"
var patientpatternURL = "https://patientpattern-static.s3.us-west-2.amazonaws.com/static/documents/fhir-base-urls.csv"
var pcisgoldURL = "https://fhir.pcisgold.com/fhirdocs/practices.json"
var healthieURL = "https://app-52512.on-aptible.com/service-base-urls"
var medConnectURL = "https://api.medconnecthealth.com/fhir/r4/endpoints"
var citiusTechURL = "https://8759937.fs1.hubspotusercontent-na1.net/hubfs/8759937/assets/pdfs/Perform+ConnectServerEndpoints.json"
var enableHealthcareURL = "https://ehifire.ehiconnect.com/fhir/r4/endpoints"
var drchronoURL = "https://drchrono-fhirpresentation.everhealthsoftware.com/fhir/r4/endpoints"
var visionWebURL = "https://dhpresentation.youruprise.com/fhir/r4/endpoints"
var streamlineURL = "https://dhfhirpresentation.smartcarenet.com/fhir/r4/endpoints"
var procentiveURL = "https://fhir-dev.procentive.com/fhir/r4/endpoints"
var tenElevenURL = "https://fhir-dev.10e11.com/fhir/r4/endpoints"
var henryScheinURL = "https://micromddev.dynamicfhir.com/fhir/r4/endpoints"
var iSALUSURL = "https://isalus-fhirpresentation.everhealthsoftware.com/fhir/r4/endpoints"
var healthInnovationURL = "https://revolutionehrdev.dynamicfhir.com/fhir/r4/endpoints"
var mPNSoftwareURL = "https://mpnproxyfhirstore.blob.core.windows.net/serviceurl/ServiceBaseURLs.csv"
var NexusURL = "https://www.nexusclinical.net/nexusehr-fhirapi-base-urls.csv"
var MEDENTURL = "https://www.medent.com/std_api/ServiceBaseURL.csv"
var tenzingURL = "https://tenzing.docs.apiary.io/#introduction/fhir-endpoints"

func QueryCHPLEndpointList(chplURL string, fileToWriteTo string) {

Expand Down Expand Up @@ -229,7 +245,7 @@ func QueryCHPLEndpointList(chplURL string, fileToWriteTo string) {
} else if URLsEqual(chplURL, cloudcraftURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, darenasolutionsURL) {
BundleQuerierParser("https://api.meldrx.com/Directories/fhir/endpoints", fileToWriteTo)
BundleQuerierParser(darenasolutionsURL, fileToWriteTo)
} else if URLsEqual(chplURL, glenwoodsystemsURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, practicefusionURL) {
Expand Down Expand Up @@ -330,6 +346,38 @@ func QueryCHPLEndpointList(chplURL string, fileToWriteTo string) {
PatientpatternURLCSVParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, pcisgoldURL) {
PCISgoldURLWebscraper(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, healthieURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, medConnectURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, citiusTechURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, enableHealthcareURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, drchronoURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, visionWebURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, streamlineURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, procentiveURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, tenElevenURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, henryScheinURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, iSALUSURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, healthInnovationURL) {
BundleQuerierParser(chplURL, fileToWriteTo)
} else if URLsEqual(chplURL, mPNSoftwareURL) {
CSVParser("https://mpnproxyfhirstore.blob.core.windows.net/serviceurl/ServiceBaseURLs.csv", fileToWriteTo, "./ServiceBaseURLs.csv", 1, 0, true, 3, 2)
} else if URLsEqual(chplURL, NexusURL) {
CSVParser("https://www.nexusclinical.net/nexusehr-fhirapi-base-urls.csv", fileToWriteTo, "./nexusehr-fhirapi-base-urls.csv", 1, 0, true, 2, 1)
} else if URLsEqual(chplURL, MEDENTURL) {
CSVParser(MEDENTURL, fileToWriteTo, "./ServiceBaseURL.csv", 1, 0, true, 1, 0)
// } else if URLsEqual(chplURL, tenzingURL) {
// TenzingURLWebscraper("https://tenzing.docs.apiary.io/#introduction/terms-and-conditions/fhir-endpoints", fileToWriteTo)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func DssIncWebscraper(CHPLURL string, fileToWriteTo string) {
doc.Find("#Api_Urls").Each(func(index int, tableElems *goquery.Selection) {
tableElems.Find("div").Each(func(index1 int, divElems *goquery.Selection) {
divElems.Find("p").Each(func(indextr int, phtml *goquery.Selection) {
if strings.HasPrefix(phtml.Text(), "The FHIR API Base URL") {
if strings.Contains(phtml.Text(), "API Base URL") {
aElems := phtml.Find("a")
if aElems.Length() > 0 {
hrefText, exists := aElems.Eq(0).Attr("href")
Expand Down
52 changes: 52 additions & 0 deletions endpointmanager/pkg/chplendpointquerier/tenzingwebscraper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package chplendpointquerier

import (
"strings"

"fmt"
"github.com/PuerkitoBio/goquery"
"github.com/onc-healthit/lantern-back-end/endpointmanager/pkg/helpers"
log "github.com/sirupsen/logrus"
)

func TenzingURLWebscraper(chplURL string, fileToWriteTo string) {

var lanternEntryList []LanternEntry
var endpointEntryList EndpointList
doc, err := helpers.ChromedpQueryEndpointList(chplURL, "main")
if err != nil {
log.Fatal(err)
}

fhirEndpointsHeaderElem := doc.Find("#introduction/terms-and-conditions/fhir-endpoints")
if fhirEndpointsHeaderElem.Length() > 0 {
spanElem := fhirEndpointsHeaderElem.Eq(0).Next()
spanElem.Find("ul").Each(func(index int, ulElems *goquery.Selection) {
ulElems.Find("li").Each(func(index int, liElems *goquery.Selection) {
liElems.Find("p").Each(func(index int, pElems *goquery.Selection) {
if strings.HasPrefix(pElems.Text(), "FHIR ") {
aElems := pElems.Find("a")
if aElems.Length() > 0 {
hrefText, exists := aElems.Eq(0).Attr("href")
if exists {
var entry LanternEntry

fhirURL := strings.TrimSpace(hrefText)
entry.URL = fhirURL
lanternEntryList = append(lanternEntryList, entry)
}
}
}
})
})
})
}

endpointEntryList.Endpoints = lanternEntryList

err = WriteCHPLFile(endpointEntryList, fileToWriteTo)
if err != nil {
log.Fatal(err)
}

}
Loading

0 comments on commit 2a4c232

Please sign in to comment.