Documentation
¶
Index ¶
- Constants
- func RegisterChecker(name string, m func() EligibilityChecker)
- type BCBSFhirEligibility
- func (b *BCBSFhirEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (b *BCBSFhirEligibility) GetPluginConfigurationOptions() []string
- func (b *BCBSFhirEligibility) GetPluginName() string
- func (b *BCBSFhirEligibility) GetPluginVersion() string
- func (b *BCBSFhirEligibility) SetContext(ctx context.Context) error
- type DummyEligibility
- func (d *DummyEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (d *DummyEligibility) GetPluginConfigurationOptions() []string
- func (d *DummyEligibility) GetPluginName() string
- func (d *DummyEligibility) GetPluginVersion() string
- func (d *DummyEligibility) SetContext(ctx context.Context) error
- type EligibilityChecker
- type EligibilityRequest
- type EligibilityResponse
- type GatewayEDIEligibility
- func (g *GatewayEDIEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (g *GatewayEDIEligibility) GetPluginConfigurationOptions() []string
- func (g *GatewayEDIEligibility) GetPluginName() string
- func (g *GatewayEDIEligibility) GetPluginVersion() string
- func (g *GatewayEDIEligibility) SetContext(ctx context.Context) error
- type MedicareHETSEligibility
- func (m *MedicareHETSEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (m *MedicareHETSEligibility) GetPluginConfigurationOptions() []string
- func (m *MedicareHETSEligibility) GetPluginName() string
- func (m *MedicareHETSEligibility) GetPluginVersion() string
- func (m *MedicareHETSEligibility) SetContext(ctx context.Context) error
- type NCMedicaidEligibility
- func (c *NCMedicaidEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (c *NCMedicaidEligibility) GetPluginConfigurationOptions() []string
- func (c *NCMedicaidEligibility) GetPluginName() string
- func (c *NCMedicaidEligibility) GetPluginVersion() string
- func (c *NCMedicaidEligibility) SetContext(ctx context.Context) error
- type OptumEligibility
- func (o *OptumEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (o *OptumEligibility) GetPluginConfigurationOptions() []string
- func (o *OptumEligibility) GetPluginName() string
- func (o *OptumEligibility) GetPluginVersion() string
- func (o *OptumEligibility) SetContext(ctx context.Context) error
- type SftpEligibility
- func (s *SftpEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (s *SftpEligibility) GetPluginConfigurationOptions() []string
- func (s *SftpEligibility) GetPluginName() string
- func (s *SftpEligibility) GetPluginVersion() string
- func (s *SftpEligibility) SetContext(ctx context.Context) error
- type StediEligibility
- func (s *StediEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
- func (s *StediEligibility) GetPluginConfigurationOptions() []string
- func (s *StediEligibility) GetPluginName() string
- func (s *StediEligibility) GetPluginVersion() string
- func (s *StediEligibility) SetContext(ctx context.Context) error
Constants ¶
const ( BCBSFhirEligibilityClass = "org.remitt.plugin.eligibility.BCBSFhirEligibility" BCBSFhirEligibilityVersion = "0.1" BCBSFhirEligibilityConfigNS = "eligibility_bcbs_fhir" )
Plugin identifiers for BCBSFhirEligibility.
const ( GatewayEDIEligibilityClass = "org.remitt.plugin.eligibility.GatewayEDIEligibility" GatewayEDIEligibilityVersion = "0.1" GatewayEDIEligibilityKeyName = "GatewayEDI" )
Plugin identifiers for GatewayEDI eligibility checker.
const ( StatusOK = "OK" StatusBad = "BAD" StatusContinuation = "CONTINUATION" StatusServerError = "SERVER_ERROR" StatusProcessing = "PROCESSING" )
Status constants for EligibilityResponse.
These mirror the Java 0.5.x org.remitt.prototype.EligibilityStatus enum — the DB/API contract is fixed, so the Go values must match the Java ones exactly. Only StatusOK was defined before; the other four were missing.
const ( SuccessCodeSuccess = "SUCCESS" SuccessCodeValidationFailure = "VALIDATION_FAILURE" SuccessCodePayerTimeout = "PAYER_TIMEOUT" SuccessCodePayerNotSupported = "PAYER_NOT_SUPPORTED" SuccessCodeSystemError = "SYSTEM_ERROR" SuccessCodePayerEnrollmentRequired = "PAYER_ENROLLMENT_REQUIRED" SuccessCodeProviderEnrollmentRequired = "PROVIDER_ENROLLMENT_REQUIRED" SuccessCodeProductRequired = "PRODUCT_REQUIRED" )
SuccessCode constants.
These mirror the Java 0.5.x org.remitt.prototype.EligibilitySuccessCode enum. Only the first two were defined before; the remaining six are what real payer gateways actually return (see the Java GatewayEDIEligibility response mapping), so a plugin must be able to report them.
const ( MedicareHETSEligibilityClass = "org.remitt.plugin.eligibility.MedicareHETSEligibility" MedicareHETSEligibilityVersion = "0.1" )
Plugin identifiers for the CMS HETS Medicare eligibility checker.
const ( NCMedicaidPluginName = "org.remitt.plugin.eligibility.NCMedicaidEligibility" NCMedicaidPluginVersion = "0.1" NCMedicaidKeyringName = "NCMedicaid" NCMedicaidConfigNS = "eligibility_ncmedicaid" )
const ( // OptumPluginName is the Java-style dotted class name used in the registry // and plugin configuration. OptumPluginName = "org.remitt.plugin.eligibility.OptumEligibility" // OptumPluginVersion tracks the plugin version. OptumPluginVersion = "0.1" // OptumConfigNS is the tUserConfig namespace for Optum eligibility settings. OptumConfigNS = "eligibility_optum" )
const ( StediPluginName = "org.remitt.plugin.eligibility.StediEligibility" StediPluginVersion = "0.1" StediConfigNS = "eligibility_stedi" StediAPIEndpoint = "https://api.stedi.com/change/medicalnetwork/eligibility/v3" StediTimeout = 30 * time.Second )
const SftpEligibilityClass = "org.remitt.plugin.eligibility.SftpEligibility"
Variables ¶
This section is empty.
Functions ¶
func RegisterChecker ¶
func RegisterChecker(name string, m func() EligibilityChecker)
RegisterChecker adds a new EligibilityChecker factory to the registry.
Types ¶
type BCBSFhirEligibility ¶
type BCBSFhirEligibility struct {
// contains filtered or unexported fields
}
BCBSFhirEligibility implements the EligibilityChecker interface for BCBS Tennessee via 1upHealth's FHIR R4 REST API.
Flow: values → buildFhirRequest → OAuth2 token → POST CoverageEligibilityRequest → parseFhirResponse → EligibilityResponse.
func (*BCBSFhirEligibility) CheckEligibility ¶
func (b *BCBSFhirEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
CheckEligibility runs the BCBS FHIR eligibility check.
func (*BCBSFhirEligibility) GetPluginConfigurationOptions ¶
func (b *BCBSFhirEligibility) GetPluginConfigurationOptions() []string
GetPluginConfigurationOptions returns the names of user-configurable options required by this plugin.
func (*BCBSFhirEligibility) GetPluginName ¶
func (b *BCBSFhirEligibility) GetPluginName() string
GetPluginName returns the Java-style dotted class name of this plugin.
func (*BCBSFhirEligibility) GetPluginVersion ¶
func (b *BCBSFhirEligibility) GetPluginVersion() string
GetPluginVersion returns the plugin version.
func (*BCBSFhirEligibility) SetContext ¶
func (b *BCBSFhirEligibility) SetContext(ctx context.Context) error
SetContext stores the execution context for use by this plugin.
type DummyEligibility ¶
type DummyEligibility struct {
// contains filtered or unexported fields
}
func (*DummyEligibility) CheckEligibility ¶
func (d *DummyEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
func (*DummyEligibility) GetPluginConfigurationOptions ¶
func (d *DummyEligibility) GetPluginConfigurationOptions() []string
func (*DummyEligibility) GetPluginName ¶
func (d *DummyEligibility) GetPluginName() string
func (*DummyEligibility) GetPluginVersion ¶
func (d *DummyEligibility) GetPluginVersion() string
func (*DummyEligibility) SetContext ¶
func (d *DummyEligibility) SetContext(ctx context.Context) error
type EligibilityChecker ¶
type EligibilityChecker interface {
CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
GetPluginName() string
GetPluginVersion() string
GetPluginConfigurationOptions() []string
SetContext(context.Context) error
}
EligibilityChecker is the interface for eligibility check plugins.
func InstantiateChecker ¶
func InstantiateChecker(name string) (EligibilityChecker, error)
InstantiateChecker instantiates an EligibilityChecker by name.
type EligibilityRequest ¶
type EligibilityRequest struct {
Plugin string `json:"plugin"`
Request map[string]string `json:"request"`
}
EligibilityRequest is the request payload for eligibility checks.
type EligibilityResponse ¶
type EligibilityResponse struct {
Status string `json:"status"`
SuccessCode string `json:"successCode"`
Messages []string `json:"messages"`
RawResponse string `json:"rawResponse"`
}
EligibilityResponse holds the result of an eligibility check.
RawResponse mirrors the Java 0.5.x org.remitt.prototype.EligibilityResponse contract (status, successCode, rawResponse, messages) and is additive: the field is new, and no existing field was renamed, retyped or reordered.
type GatewayEDIEligibility ¶
type GatewayEDIEligibility struct {
// contains filtered or unexported fields
}
GatewayEDIEligibility implements the EligibilityChecker interface for the GatewayEDI SOAP-based eligibility service.
Flow: values → buildSoapEnvelope (SOAP 1.1 DoInquiry, plain XML) → SOAP HTTP POST to gatewayEdiServiceUri with HTTP Basic credentials → PGP decrypt the response with the user's private key if it is encrypted → parse SOAP response → EligibilityResponse.
The request is not encrypted: the vendor's DoInquiry operation is a plain document/literal SOAP call authenticated with HTTP Basic, exactly as the Java 0.5.x plugin drives the Axis-generated EligibilitySoap stub (GatewayEDIEligibility.java:139-151). PGP is still honoured on the response side, where a gateway that returns an encrypted body can be decrypted with the user's GatewayEDI private key.
The response contract follows the Java 0.5.x reference implementation (org.remitt.plugin.eligibility.GatewayEDIEligibility): the gateway's SuccessCode element decides the outcome, its value is matched case-insensitively against the EligibilitySuccessCode enum names, and the resulting (Status, SuccessCode) pair is fixed by the contract. Every post-request failure (non-2xx HTTP status, undecryptable body, body with no recognised SuccessCode) is reported as Status StatusServerError / SuccessCode SuccessCodeSystemError, exactly as the Java falls through to SERVER_ERROR at line 205 and to SYSTEM_ERROR at line 256. This plugin never reports StatusOK / SuccessCodeSuccess unless an explicit SuccessCode of "Success" was parsed. Failures that happen before the request is sent (empty service URI, unbuildable request, transport error) are Go errors.
func (*GatewayEDIEligibility) CheckEligibility ¶
func (g *GatewayEDIEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
CheckEligibility runs the GatewayEDI eligibility check: it builds the SOAP 1.1 DoInquiry request from the caller's values, POSTs it to the configured gatewayEdiServiceUri with the configured GatewayEDI credentials as HTTP Basic auth, and interprets the SOAP response.
No PGP encryption is applied to the request. The user's GatewayEDI keyring entry is still consulted so that an encrypted response can be decrypted with the private key, but it is no longer required: with ResponseDataType=Xml the gateway answers with plain SOAP XML, and the request itself no longer needs a public key.
func (*GatewayEDIEligibility) GetPluginConfigurationOptions ¶
func (g *GatewayEDIEligibility) GetPluginConfigurationOptions() []string
GetPluginConfigurationOptions returns the names of user-configurable options required by this plugin.
func (*GatewayEDIEligibility) GetPluginName ¶
func (g *GatewayEDIEligibility) GetPluginName() string
GetPluginName returns the Java-style dotted class name of this plugin.
func (*GatewayEDIEligibility) GetPluginVersion ¶
func (g *GatewayEDIEligibility) GetPluginVersion() string
GetPluginVersion returns the plugin version.
func (*GatewayEDIEligibility) SetContext ¶
func (g *GatewayEDIEligibility) SetContext(ctx context.Context) error
SetContext stores the execution context for use by this plugin.
type MedicareHETSEligibility ¶
type MedicareHETSEligibility struct {
// contains filtered or unexported fields
}
MedicareHETSEligibility implements the EligibilityChecker interface for the CMS HIPAA Eligibility Transaction System (HETS).
Intended flow, of which only the first half exists: values → build X12 270 EDI → base64 encode → build CAQH CORE vC2.2.0 SOAP envelope with WS-Security UsernameToken → POST to the configured HETS endpoint → parse SOAP response → extract X12 271 → parse EB segments → EligibilityResponse.
See the package-top note in this file: the CMS side of that flow is not implemented, and every "cannot reach CMS" outcome is reported as StatusServerError / SuccessCodeSystemError rather than as eligibility.
func (*MedicareHETSEligibility) CheckEligibility ¶
func (m *MedicareHETSEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
CheckEligibility executes a Medicare HETS eligibility check.
Required values map keys:
- memberId Medicare beneficiary ID (HICN or MBI)
- firstName Patient first name
- lastName Patient last name
- dateOfBirth Patient date of birth (YYYYMMDD)
- serviceDate Date of service (YYYYMMDD)
This method resolves the user's configuration and then delegates to checkEligibilityWithConfig, which holds the entire decision path. Every failure to actually reach CMS is returned as a non-OK EligibilityResponse (StatusServerError / SuccessCodeSystemError) *and* as a Go error with the same text, so a caller cannot mistake it for an eligibility result whichever of the two it inspects.
func (*MedicareHETSEligibility) GetPluginConfigurationOptions ¶
func (m *MedicareHETSEligibility) GetPluginConfigurationOptions() []string
func (*MedicareHETSEligibility) GetPluginName ¶
func (m *MedicareHETSEligibility) GetPluginName() string
func (*MedicareHETSEligibility) GetPluginVersion ¶
func (m *MedicareHETSEligibility) GetPluginVersion() string
func (*MedicareHETSEligibility) SetContext ¶
func (m *MedicareHETSEligibility) SetContext(ctx context.Context) error
type NCMedicaidEligibility ¶
type NCMedicaidEligibility struct {
// contains filtered or unexported fields
}
NCMedicaidEligibility checks patient eligibility by serializing the request as JSON, PGP-encrypting it with the NCMedicaid key, and uploading the encrypted payload to a configured SFTP server.
func (*NCMedicaidEligibility) CheckEligibility ¶
func (c *NCMedicaidEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
CheckEligibility serializes the request, PGP-encrypts it using the NCMedicaid public key from the keyring, and uploads the result to the configured SFTP server. Configuration is loaded from tUserConfig on first call.
func (*NCMedicaidEligibility) GetPluginConfigurationOptions ¶
func (c *NCMedicaidEligibility) GetPluginConfigurationOptions() []string
func (*NCMedicaidEligibility) GetPluginName ¶
func (c *NCMedicaidEligibility) GetPluginName() string
func (*NCMedicaidEligibility) GetPluginVersion ¶
func (c *NCMedicaidEligibility) GetPluginVersion() string
func (*NCMedicaidEligibility) SetContext ¶
func (c *NCMedicaidEligibility) SetContext(ctx context.Context) error
type OptumEligibility ¶
type OptumEligibility struct {
// contains filtered or unexported fields
}
OptumEligibility checks patient eligibility via the Optum (Change Healthcare) REST API. It authenticates with OAuth2 client credentials, builds a JSON eligibility request matching the Optum /medicalnetwork/eligibility/v3 schema, and parses the response into an EligibilityResponse.
func (*OptumEligibility) CheckEligibility ¶
func (o *OptumEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
CheckEligibility authenticates against the Optum OAuth2 endpoint, builds a JSON eligibility request, POSTs it to the /medicalnetwork/eligibility/v3 endpoint, and returns the result as an EligibilityResponse.
Configuration is loaded lazily from tUserConfig on the first call.
func (*OptumEligibility) GetPluginConfigurationOptions ¶
func (o *OptumEligibility) GetPluginConfigurationOptions() []string
func (*OptumEligibility) GetPluginName ¶
func (o *OptumEligibility) GetPluginName() string
func (*OptumEligibility) GetPluginVersion ¶
func (o *OptumEligibility) GetPluginVersion() string
func (*OptumEligibility) SetContext ¶
func (o *OptumEligibility) SetContext(ctx context.Context) error
type SftpEligibility ¶
type SftpEligibility struct {
// contains filtered or unexported fields
}
SftpEligibility implements the EligibilityChecker interface by serializing eligibility request values to JSON, optionally PGP-encrypting them using a key from the user's keyring, and uploading the result to a configured SFTP server.
Config keys (from tUserConfig):
sftpHost - SFTP server hostname (required) sftpPort - SFTP server port (required) sftpUsername - SFTP username (required) sftpPassword - SFTP password (required) sftpPath - Remote directory path for uploads (required) sftpKeyName - Optional PGP key name in the user's keyring
func (*SftpEligibility) CheckEligibility ¶
func (s *SftpEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
CheckEligibility serializes the eligibility request values to JSON, optionally PGP-encrypts them, and uploads the result to the configured SFTP server. All configuration is read from tUserConfig for the given userName.
func (*SftpEligibility) GetPluginConfigurationOptions ¶
func (s *SftpEligibility) GetPluginConfigurationOptions() []string
GetPluginConfigurationOptions returns the list of config keys expected in tUserConfig for this plugin.
func (*SftpEligibility) GetPluginName ¶
func (s *SftpEligibility) GetPluginName() string
GetPluginName returns the fully-qualified Java-style plugin class name.
func (*SftpEligibility) GetPluginVersion ¶
func (s *SftpEligibility) GetPluginVersion() string
GetPluginVersion returns the plugin version.
func (*SftpEligibility) SetContext ¶
func (s *SftpEligibility) SetContext(ctx context.Context) error
SetContext stores the context for later use.
type StediEligibility ¶
type StediEligibility struct {
// contains filtered or unexported fields
}
StediEligibility checks patient eligibility via the Stedi REST JSON API. It covers BCBS, Medicare, Medicaid, and all commercial payers through a single API endpoint.
func (*StediEligibility) CheckEligibility ¶
func (s *StediEligibility) CheckEligibility(userName string, values map[string]string, resubmission bool, jobID int64) (*EligibilityResponse, error)
CheckEligibility loads configuration, builds a JSON request body, POSTs it to the Stedi API, and returns the parsed eligibility response.
func (*StediEligibility) GetPluginConfigurationOptions ¶
func (s *StediEligibility) GetPluginConfigurationOptions() []string
GetPluginConfigurationOptions returns the names of user-configurable options required by this plugin.
func (*StediEligibility) GetPluginName ¶
func (s *StediEligibility) GetPluginName() string
GetPluginName returns the Java-style dotted class name of this plugin.
func (*StediEligibility) GetPluginVersion ¶
func (s *StediEligibility) GetPluginVersion() string
GetPluginVersion returns the plugin version.
func (*StediEligibility) SetContext ¶
func (s *StediEligibility) SetContext(ctx context.Context) error
SetContext stores the execution context for use by this plugin.