endpointmanager

package
v0.0.0-...-ee148e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeEndpointURL

func NormalizeEndpointURL(url string) string

Prepends url with https:// and appends with metadata/ if needed

func NormalizeURL

func NormalizeURL(url string) string

Prepends url with https:// if needed

func NormalizeVersionsURL

func NormalizeVersionsURL(url string) string

Prepends url with https:// and appends with $versions if needed

func NormalizeWellKnownURL

func NormalizeWellKnownURL(url string) string

Prepends url with https:// and appends with .well-know/smart-configuration/ if needed

func OrganizationListEquals

func OrganizationListEquals(orgList1 []*FHIREndpointOrganization, orgList2 []*FHIREndpointOrganization) bool

Checks if the two lists of organizations are equal

Types

type CertificationCriteria

type CertificationCriteria struct {
	ID                     int
	CertificationID        int
	CertificationNumber    string
	Title                  string
	CertificationEditionID int
	CertificationEdition   string
	Description            string
	Removed                bool
	CreatedAt              time.Time
	UpdatedAt              time.Time
}

CertificationCriteria represents a certification criteria's metadata. This information is gathered from the Certified Health IT Products List (CHPL).

func (*CertificationCriteria) Equal

func (certCri *CertificationCriteria) Equal(certCri2 *CertificationCriteria) bool

Equal checks each field of the two CertificationCriteria except for the database ID, CreatedAt and UpdatedAt fields to see if they are equal.

func (*CertificationCriteria) Update

func (certCri *CertificationCriteria) Update(certCri2 *CertificationCriteria) error

Update updates the received CertificationCriteria with entries from the provided CertificationCriteria.

type FHIREndpoint

type FHIREndpoint struct {
	ID               int
	URL              string
	OrganizationList []*FHIREndpointOrganization
	ListSource       string
	VersionsResponse versionsoperatorparser.VersionsResponse
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

FHIREndpoint represents a fielded FHIR API endpoint hosted by a HealthITProduct and populated by a ProviderOrganization. Information about the FHIR API endpoint is populated by the FHIR capability statement found at that endpoint as well as information discovered about the IP address of the endpoint.

func (*FHIREndpoint) Equal

func (e *FHIREndpoint) Equal(e2 *FHIREndpoint) bool

Equal checks each field of the two FHIREndpoints except for the database ID, CreatedAt and UpdatedAt fields to see if they are equal.

func (*FHIREndpoint) GetNPIIDs

func (e *FHIREndpoint) GetNPIIDs() []string

Gets all the NPI IDs for an endpoint

func (*FHIREndpoint) GetOrganizationNames

func (e *FHIREndpoint) GetOrganizationNames() []string

Gets all the organization names for an endpoint

type FHIREndpointInfo

type FHIREndpointInfo struct {
	ID                       int
	HealthITProductID        int
	URL                      string
	TLSVersion               string
	MIMETypes                []string
	VendorID                 int
	CapabilityStatement      capabilityparser.CapabilityStatement // the JSON representation of the FHIR capability statement
	CapabilityStatementBytes []byte
	ValidationID             int
	CreatedAt                time.Time
	UpdatedAt                time.Time
	SMARTResponse            smartparser.SMARTResponse
	SMARTResponseBytes       []byte
	IncludedFields           []IncludedField
	OperationResource        map[string][]string
	Metadata                 *FHIREndpointMetadata
	RequestedFhirVersion     string
	CapabilityFhirVersion    string
	SupportedProfiles        []SupportedProfile
}

FHIREndpointInfo represents a fielded FHIR API endpoint hosted by a HealthITProduct and populated by a ProviderOrganization. Information about the FHIR API endpoint is populated by the FHIR capability statement found at that endpoint.

func (*FHIREndpointInfo) Equal

func (e *FHIREndpointInfo) Equal(e2 *FHIREndpointInfo) bool

Equal checks each field of the two FHIREndpointInfos except for the database ID, CreatedAt and UpdatedAt fields to see if they are equal.

func (*FHIREndpointInfo) EqualExcludeMetadata

func (e *FHIREndpointInfo) EqualExcludeMetadata(e2 *FHIREndpointInfo) bool

EqualExcludeMetadata checks each field of the two FHIREndpointInfos except for metadata fields to see if they are equal.

type FHIREndpointMetadata

type FHIREndpointMetadata struct {
	ID                   int
	URL                  string
	HTTPResponse         int
	Errors               string
	CreatedAt            time.Time
	UpdatedAt            time.Time
	SMARTHTTPResponse    int
	ResponseTime         float64
	Availability         float64
	RequestedFhirVersion string
}

FHIREndpointMetadata represents information about the request made to the FHIR endpoint's capability statement and it's SMART on FHIR well-known configuration

func (*FHIREndpointMetadata) Equal

Equal checks each field of the two FHIREndpointMetadatass except for the database ID, CreatedAt and UpdatedAt fields to see if they are equal.

type FHIREndpointOrganization

type FHIREndpointOrganization struct {
	ID                  int
	OrganizationName    string
	OrganizationZipCode string
	OrganizationNPIID   string
	UpdatedAt           time.Time
}

func (*FHIREndpointOrganization) Equal

Equal checks each field of the two FHIREndpointOrganizations except for the database ID to see if they are equal.

type HealthITProduct

type HealthITProduct struct {
	ID                    int
	Name                  string
	Version               string
	VendorID              int       // the id of the vendor that creates the product.
	Location              *Location // the address listed in CHPL for the Developer.
	AuthorizationStandard string    // examples: OAuth 2.0, Basic, etc.
	APISyntax             string    // the format of the information provided by the API, for example, REST, FHIR STU3, etc.
	APIURL                string    // the URL to the API documentation for the product.
	CertificationCriteria []int     // the IDs to the ONC criteria that the product was certified to, for example, [21, ...] where 21 is associated to "170.315 (g)(7)"
	CertificationStatus   string    // the ONC certification status, for example, "Active", "Retired", "Suspended by ONC", etc.
	CertificationDate     time.Time
	CertificationEdition  string // the product's certification edition for the ONC Health IT certification program, for example, "2014", "2015".
	LastModifiedInCHPL    time.Time
	CHPLID                string // the product's unique ID within the CHPL system.
	CreatedAt             time.Time
	UpdatedAt             time.Time
	PracticeType          string
	ACB                   string
}

HealthITProduct represents a health IT vendor product such as an EHR. This information is gathered from the Certified Health IT Products List (CHPL).

func (*HealthITProduct) Equal

func (hitp *HealthITProduct) Equal(hitp2 *HealthITProduct) bool

Equal checks each field of the two HealthITProducts except for the database ID, CHPL ID, CreatedAt and UpdatedAt fields to see if they are equal.

func (*HealthITProduct) Update

func (hitp *HealthITProduct) Update(hitp2 *HealthITProduct) error

Update updates the receiver HealthITIProduct with entries from the provided HealthITProduct.

type IncludedField

type IncludedField struct {
	Field     string
	Exists    bool
	Extension bool
}

IncludedField is a struct used to keep track of all of the fields in the capability statement

type Location

type Location struct {
	Address1 string `json:"address1"` // the first line of the address. For example, "123 Governors Ln".
	Address2 string `json:"address2"` // the second line of the address, if it exists. For example, "Suite 123".
	Address3 string `json:"address3"` // the third line of the address, if it exists. For example, "MailStop 123".
	City     string `json:"city"`
	State    string `json:"state"`   // the two-letter state or posession abbreviation as defined in https://pe.usps.com/text/pub28/28apb.htm.
	ZipCode  string `json:"zipcode"` // the five-digit zip code.
}

Location represents a US postal address.

func (*Location) Equal

func (l *Location) Equal(l2 *Location) bool

Equal checks if the location is equal to the given location.

type NPIContact

type NPIContact struct {
	ID                           int
	NPI_ID                       string
	EndpointType                 string
	EndpointTypeDescription      string
	Endpoint                     string
	ValidURL                     bool
	Affiliation                  string
	EndpointDescription          string
	AffiliationLegalBusinessName string
	UseCode                      string
	UseDescription               string
	OtherUseDescription          string
	ContentType                  string
	ContentDescription           string
	OtherContentDescription      string
	Location                     *Location
	CreatedAt                    time.Time
	UpdatedAt                    time.Time
}

NPIContact represents the digitial contact information for an NPI Contact provided by the NPPES database

type NPIOrganization

type NPIOrganization struct {
	ID                      int
	NPI_ID                  string
	Name                    string
	SecondaryName           string
	Location                *Location
	Taxonomy                string // Taxonomy code mapping: http://www.wpc-edi.com/reference/codelists/healthcare/health-care-provider-taxonomy-code-set/
	NormalizedName          string
	NormalizedSecondaryName string
	CreatedAt               time.Time
	UpdatedAt               time.Time
}

NPIOrganization represents a hospital Group, Corporation or Partnership From https://data.medicare.gov/Hospital-Compare/Hospital-General-Information/xubh-q36u

func (*NPIOrganization) Equal

func (org *NPIOrganization) Equal(org2 *NPIOrganization) bool

Equal checks each field of the two NPIOrganizations except for the database ID, CreatedAt and UpdatedAt fields to see if they are equal.

type Rule

type Rule struct {
	RuleName  RuleOption
	Valid     bool
	Expected  string
	Actual    string
	Comment   string
	Reference string
	ImplGuide string
}

Rule is the information returned from running the validation rule given by RuleName

type RuleOption

type RuleOption string

RuleOption is an enum of the names given to the rule validation checks

const (
	CapStatExistRule     RuleOption = "capStatExist"
	TLSVersion           RuleOption = "tlsVersion"
	PatResourceExists    RuleOption = "patResourceExists"
	OtherResourceExists  RuleOption = "otherResourceExists"
	SmartRespExistsRule  RuleOption = "smartResponse"
	KindRule             RuleOption = "kindRule"
	InstanceRule         RuleOption = "instanceRule"
	MessagingEndptRule   RuleOption = "messagingEndptRule"
	EndptFunctionRule    RuleOption = "endpointFunctionRule"
	DescribeEndptRule    RuleOption = "describeEndpointRule"
	DocumentValidRule    RuleOption = "documentValidRule"
	UniqueResourcesRule  RuleOption = "uniqueResourcesRule"
	SearchParamsRule     RuleOption = "searchParamsRule"
	VersionsResponseRule RuleOption = "versionsResponseRule"
)

type SupportedProfile

type SupportedProfile struct {
	ProfileURL  string
	ProfileName string
	Resource    string
}

SupportedProfile is a struct used to keep track of all of the profiles in the capability statement

type Validation

type Validation struct {
	Results []Rule
}

Validation holds all of the validation results from running the validation checks

type Vendor

type Vendor struct {
	ID                 int
	Name               string
	DeveloperCode      string
	URL                string
	Location           *Location // the address listed in CHPL for the Developer.
	Status             string
	LastModifiedInCHPL time.Time
	CHPLID             int // the product's unique ID within the CHPL system.
	CreatedAt          time.Time
	UpdatedAt          time.Time
}

Vendor represents a Health IT vendor. This information is gathered from the Certified Health IT Products List (CHPL).

func (*Vendor) Equal

func (v *Vendor) Equal(v2 *Vendor) bool

Equal checks each field of the two Vendors except for the database ID, CreatedAt and UpdatedAt fields to see if they are equal.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL