diff --git a/.dockerignore b/.dockerignore index 2c7b1d54..4a5acccb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -42,7 +42,6 @@ serviceAPIs/ test/ docs/ internal/test/ -**/*_test.go Taskfile.yml scripts/ .gitattributes diff --git a/.gitignore b/.gitignore index 760c6e1e..ed804f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ **/*.http **/*.cast -assets/ # Ignore the binary files generated by `go build` /main diff --git a/.golangci.yml b/.golangci.yml index ece51689..575f5777 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -50,5 +50,13 @@ issues: linters: - gosec text: "G306" + - path: internal/serviceconfig/objectstore/config.go + linters: + - gosec + text: "G401" + - path: internal/serviceconfig/objectstore/config.go + linters: + - gosec + text: "G501" max-issues-per-linter: 0 max-same-issues: 0 diff --git a/.mockery.yml b/.mockery.yml index b0261908..0f9acd8e 100644 --- a/.mockery.yml +++ b/.mockery.yml @@ -9,6 +9,9 @@ packages: queryorchestration/internal/serviceconfig/objectstore: interfaces: S3Client: + queryorchestration/internal/serviceconfig/textract: + interfaces: + TextractClient: queryorchestration/internal/server/runner: interfaces: Controller: diff --git a/api/clientSyncRunner/runner.go b/api/clientSyncRunner/runner.go index f77a36c2..5234e698 100644 --- a/api/clientSyncRunner/runner.go +++ b/api/clientSyncRunner/runner.go @@ -2,15 +2,11 @@ package clientsyncrunner import ( "context" - "encoding/json" "log/slog" clientsync "queryorchestration/internal/client/sync" "github.com/go-playground/validator/v10" - "github.com/google/uuid" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "clientSyncRunner" @@ -32,24 +28,11 @@ func New(validator *validator.Validate, svc *Services) Runner { } type Body struct { - ID uuid.UUID `json:"id" validate:"required,uuid"` + ClientID string `json:"id" validate:"required"` } -func (s *Runner) Process(ctx context.Context, req *types.Message) bool { - var body Body - err := json.Unmarshal([]byte(*req.Body), &body) - if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - err = s.svc.ClientSync.Sync(ctx, body.ID) +func (s *Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.ClientSync.Sync(ctx, body.ClientID) if err != nil { slog.Error("unable to process", "error", err) return false diff --git a/api/clientSyncRunner/runner_test.go b/api/clientSyncRunner/runner_test.go index 13179e0d..bd059e3a 100644 --- a/api/clientSyncRunner/runner_test.go +++ b/api/clientSyncRunner/runner_test.go @@ -2,7 +2,6 @@ package clientsyncrunner_test import ( "context" - "encoding/json" "fmt" "testing" @@ -14,7 +13,6 @@ import ( queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -24,7 +22,7 @@ import ( ) type ClientSyncConfig struct { - runner.BaseConfig + runner.BaseConfig[clientsyncrunner.Body] documentsync.DocSyncConfig } @@ -50,19 +48,13 @@ func TestQueryRunner(t *testing.T) { t.Run("valid", func(t *testing.T) { bod := clientsyncrunner.Body{ - ID: uuid.New(), - } - bodyBytes, err := json.Marshal(bod) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, + ClientID: "hello", } docId := uuid.New() total := int64(1) - pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(bod.ID, int32(100), int32(0)). + pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(bod.ClientID, int32(100), int32(0)). WillReturnRows( pgxmock.NewRows([]string{"id", "totalCount"}). AddRow(&docId, &total), @@ -77,16 +69,6 @@ func TestQueryRunner(t *testing.T) { ). Return(&sqs.SendMessageOutput{}, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } - - assert.True(t, runner.Process(ctx, msg)) + assert.True(t, runner.Process(ctx, bod)) }) } diff --git a/api/docCleanRunner/runner.go b/api/docCleanRunner/runner.go index 9836166f..c5828cbe 100644 --- a/api/docCleanRunner/runner.go +++ b/api/docCleanRunner/runner.go @@ -2,15 +2,12 @@ package doccleanrunner import ( "context" - "encoding/json" "log/slog" documentclean "queryorchestration/internal/document/clean" "github.com/go-playground/validator/v10" "github.com/google/uuid" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "docCleanRunner" @@ -32,24 +29,11 @@ func New(validator *validator.Validate, svc *Services) Runner { } type Body struct { - ID uuid.UUID `json:"id" validate:"required,uuid"` + DocumentID uuid.UUID `json:"id" validate:"required,uuid"` } -func (s Runner) Process(ctx context.Context, req *types.Message) bool { - var body Body - err := json.Unmarshal([]byte(*req.Body), &body) - if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - err = s.svc.Clean.Clean(ctx, body.ID) +func (s Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.Clean.Clean(ctx, body.DocumentID) if err != nil { slog.Error("unable to process", "error", err) return false diff --git a/api/docCleanRunner/runner_test.go b/api/docCleanRunner/runner_test.go index 08ba0b6c..760177db 100644 --- a/api/docCleanRunner/runner_test.go +++ b/api/docCleanRunner/runner_test.go @@ -2,7 +2,6 @@ package doccleanrunner_test import ( "context" - "encoding/json" "fmt" "io" "strings" @@ -12,15 +11,14 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/document" documentclean "queryorchestration/internal/document/clean" - "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/server/runner" "queryorchestration/internal/serviceconfig/objectstore" - "queryorchestration/internal/serviceconfig/queue/documenttext" + "queryorchestration/internal/serviceconfig/queue/documenttexttrigger" objectstoremock "queryorchestration/mocks/objectstore" queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -30,8 +28,8 @@ import ( ) type DocCleanConfig struct { - serviceconfig.BaseConfig - documenttext.DocTextConfig + runner.BaseConfig[doccleanrunner.Body] + documenttexttrigger.DocTextTriggerConfig objectstore.ObjectStoreConfig } @@ -48,7 +46,7 @@ func TestDocCleanRunner(t *testing.T) { cfg.StoreClient = mockStore mockSQS := queuemock.NewMockSQSClient(t) cfg.QueueClient = mockSQS - cfg.DocumentTextURL = "/i/am/here" + cfg.DocumentTextTriggerURL = "/i/am/here" runner := doccleanrunner.New(validator.New(), &doccleanrunner.Services{ Clean: documentclean.New(cfg), @@ -57,18 +55,12 @@ func TestDocCleanRunner(t *testing.T) { t.Run("valid", func(t *testing.T) { bod := doccleanrunner.Body{ - ID: uuid.New(), - } - bodyBytes, err := json.Marshal(bod) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, + DocumentID: uuid.New(), } doc := document.DocumentSummary{ - ID: bod.ID, - ClientID: uuid.New(), + ID: bod.DocumentID, + ClientID: "hello", Hash: "example_hash", } inloc := document.Location{ @@ -99,9 +91,9 @@ func TestDocCleanRunner(t *testing.T) { cleanid := uuid.New() pool.ExpectQuery("name: GetMostRecentDocumentCleanEntry :one").WithArgs(dbid). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}), + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail"}), ) - pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, dbmimetype, repository.NullCleanfailtype{}). + pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, &doc.Hash, dbmimetype, repository.NullCleanfailtype{}). WillReturnRows( pgxmock.NewRows([]string{"id"}). AddRow(cleanid), @@ -114,7 +106,7 @@ func TestDocCleanRunner(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.DocumentTextURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", doc.ID.String()) + return *in.QueueUrl == cfg.DocumentTextTriggerURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", doc.ID.String()) }), mock.Anything, ). @@ -145,17 +137,7 @@ func TestDocCleanRunner(t *testing.T) { Body: bodyMsg, }, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } - - assert.True(t, runner.Process(ctx, msg)) + assert.True(t, runner.Process(ctx, bod)) }) } diff --git a/api/docInitRunner/runner.go b/api/docInitRunner/runner.go index d77227d9..51ce4fea 100644 --- a/api/docInitRunner/runner.go +++ b/api/docInitRunner/runner.go @@ -2,15 +2,12 @@ package docinitrunner import ( "context" - "encoding/json" "log/slog" "queryorchestration/internal/document" documentinit "queryorchestration/internal/document/init" "github.com/go-playground/validator/v10" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "docInitRunner" @@ -31,93 +28,26 @@ func New(validator *validator.Validate, svc *Services) Runner { } } -type S3Bucket struct { - Name string `json:"name"` - Arn string `json:"arn"` +type Body struct { + Bucket string `json:"bucket" validate:"required"` + Key string `json:"key" validate:"required"` + Hash string `json:"hash" validate:"required"` + ClientID string `json:"clientId" validate:"required"` } -type S3Object struct { - Key string `json:"key"` - Size int64 `json:"size"` - ETag string `json:"eTag"` - VersionId string `json:"versionId"` -} - -type S3EventRecordDetails struct { - Bucket S3Bucket `json:"bucket"` - Object S3Object `json:"object"` -} - -type S3EventRecord struct { - EventVersion string `json:"eventVersion"` - EventSource string `json:"eventSource"` - AwsRegion string `json:"awsRegion"` - EventTime string `json:"eventTime"` - EventName EventS3 `json:"eventName"` - S3 S3EventRecordDetails `json:"s3"` -} -type S3EventNotification struct { - Records []S3EventRecord `json:"Records"` -} - -type EventS3 string - -const ( - EventS3ObjectCreatedPut = "ObjectCreated:Put" -) - -func (s Runner) Process(ctx context.Context, req *types.Message) bool { - var body S3EventNotification - err := json.Unmarshal([]byte(*req.Body), &body) +func (s Runner) Process(ctx context.Context, body Body) bool { + id, err := s.svc.Document.Create(ctx, &documentinit.Create{ + ClientID: body.ClientID, + Location: document.Location{ + Bucket: body.Bucket, + Key: body.Key, + }, + Hash: body.Hash, + }) if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - for _, record := range body.Records { - err := s.processRecord(ctx, record) - if err != nil { - slog.Error("unable to process", "error", err) - return false - } + return false } + slog.Debug("created document", "id", id) return true } - -func (s Runner) processRecord(ctx context.Context, record S3EventRecord) error { - if !s.isSupportedEvent(record.EventName) { - slog.Warn("unsupported event", "name", record.EventName) - return nil - } - - clientID, err := s.svc.Document.GetClientIDFromKey(record.S3.Object.Key) - if err != nil { - slog.Error("unable to find client id", "key", record.S3.Object.Key, "error", err) - return nil - } - - _, err = s.svc.Document.Create(ctx, &documentinit.Create{ - ClientID: clientID, - Location: document.Location{ - Bucket: record.S3.Bucket.Name, - Key: record.S3.Object.Key, - }, - Hash: record.S3.Object.ETag, - }) - if err != nil { - return err - } - - return nil -} - -func (s Runner) isSupportedEvent(name EventS3) bool { - return name == EventS3ObjectCreatedPut -} diff --git a/api/docInitRunner/runner_test.go b/api/docInitRunner/runner_test.go index ce47d727..556321a2 100644 --- a/api/docInitRunner/runner_test.go +++ b/api/docInitRunner/runner_test.go @@ -1,21 +1,19 @@ -package docinitrunner +package docinitrunner_test import ( "context" - "encoding/json" "fmt" "testing" - "queryorchestration/internal/client" + docinitrunner "queryorchestration/api/docInitRunner" "queryorchestration/internal/database/repository" "queryorchestration/internal/document" documentinit "queryorchestration/internal/document/init" - "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/server/runner" "queryorchestration/internal/serviceconfig/queue/documentsync" queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -25,7 +23,7 @@ import ( ) type DocInitConfig struct { - serviceconfig.BaseConfig + runner.BaseConfig[docinitrunner.Body] documentsync.DocSyncConfig } @@ -41,41 +39,25 @@ func TestDocInitRunner(t *testing.T) { mockSQS := queuemock.NewMockSQSClient(t) cfg.QueueClient = mockSQS - runner := New(validator.New(), &Services{ + runner := docinitrunner.New(validator.New(), &docinitrunner.Services{ Document: documentinit.New(cfg), }) assert.NotNil(t, runner) t.Run("valid", func(t *testing.T) { - clientId := uuid.New() + clientId := "clientid" bucketName := "bucketName" - location := fmt.Sprintf("%s/aaa", clientId) + location := fmt.Sprintf("%s/import/aaa", clientId) docinfo := document.DocumentSummary{ ID: uuid.New(), - ClientID: clientId, + ClientID: "hello", Hash: "example_hash", } - doc := S3EventNotification{ - Records: []S3EventRecord{ - { - EventName: EventS3ObjectCreatedPut, - S3: S3EventRecordDetails{ - Bucket: S3Bucket{ - Name: bucketName, - }, - Object: S3Object{ - Key: location, - ETag: docinfo.Hash, - }, - }, - }, - }, - } - bodyBytes, err := json.Marshal(doc) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, + doc := docinitrunner.Body{ + Bucket: bucketName, + Key: location, + Hash: docinfo.Hash, + ClientID: clientId, } pool.ExpectQuery("name: GetDocumentIDByHash :one").WithArgs(docinfo.Hash, clientId).WillReturnRows( @@ -106,123 +88,6 @@ func TestDocInitRunner(t *testing.T) { ). Return(&sqs.SendMessageOutput{}, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } - - assert.True(t, runner.Process(ctx, msg)) - }) -} - -func TestProcessRecord(t *testing.T) { - ctx := context.Background() - - pool, err := pgxmock.NewPool() - require.NoError(t, err) - - cfg := &DocInitConfig{} - cfg.DBPool = pool - cfg.DBQueries = repository.New(pool) - mockSQS := queuemock.NewMockSQSClient(t) - cfg.QueueClient = mockSQS - - runner := New(validator.New(), &Services{ - Document: documentinit.New(cfg), - }) - assert.NotNil(t, runner) - - t.Run("valid", func(t *testing.T) { - j := client.Client{ - ID: uuid.New(), - } - bucketName := "bucketName" - location := fmt.Sprintf("%s/aaa", j.ID.String()) - docinfo := document.DocumentSummary{ - ID: uuid.New(), - ClientID: j.ID, - Hash: "example_hash", - } - record := S3EventRecord{ - EventName: EventS3ObjectCreatedPut, - S3: S3EventRecordDetails{ - Bucket: S3Bucket{ - Name: bucketName, - }, - Object: S3Object{ - Key: location, - ETag: docinfo.Hash, - }, - }, - } - - pool.ExpectQuery("name: GetDocumentIDByHash :one").WithArgs(docinfo.Hash, j.ID).WillReturnRows( - pgxmock.NewRows([]string{"id"}), - ) - pool.ExpectBegin() - pool.ExpectQuery("name: CreateDocument :one").WithArgs(j.ID, docinfo.Hash). - WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(docinfo.ID), - ) - pool.ExpectExec("name: AddDocumentEntry :exec").WithArgs(docinfo.ID, bucketName, location). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectCommit() - pool.ExpectQuery("name: GetDocumentSummary :one").WithArgs(docinfo.ID). - WillReturnRows( - pgxmock.NewRows([]string{"id", "clientId", "hash"}). - AddRow(docinfo.ID, docinfo.ClientID, "example"), - ) - - mockSQS.EXPECT(). - SendMessage( - mock.Anything, - mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.DocumentSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", docinfo.ID.String()) - }), - mock.Anything, - ). - Return(&sqs.SendMessageOutput{}, nil) - - err = runner.processRecord(ctx, record) - require.NoError(t, err) - }) - t.Run("invalid_event", func(t *testing.T) { - record := S3EventRecord{ - EventName: "invalid_event", - } - - err = runner.processRecord(ctx, record) - require.NoError(t, err) - }) - t.Run("invalid id", func(t *testing.T) { - location := "cc/aaa" - record := S3EventRecord{ - EventName: EventS3ObjectCreatedPut, - S3: S3EventRecordDetails{ - Object: S3Object{ - Key: location, - }, - }, - } - - err = runner.processRecord(ctx, record) - require.NoError(t, err) - }) -} - -func TestIsSupportedEvent(t *testing.T) { - runner := Runner{} - - t.Run("put", func(t *testing.T) { - assert.True(t, runner.isSupportedEvent(EventS3ObjectCreatedPut)) - }) - t.Run("invalid", func(t *testing.T) { - assert.False(t, runner.isSupportedEvent("invalid")) + assert.True(t, runner.Process(ctx, doc)) }) } diff --git a/api/docSyncRunner/runner.go b/api/docSyncRunner/runner.go index d3d99d35..3d065eeb 100644 --- a/api/docSyncRunner/runner.go +++ b/api/docSyncRunner/runner.go @@ -2,15 +2,12 @@ package docsyncrunner import ( "context" - "encoding/json" "log/slog" documentsync "queryorchestration/internal/document/sync" "github.com/go-playground/validator/v10" "github.com/google/uuid" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "docSyncRunner" @@ -32,24 +29,11 @@ func New(validator *validator.Validate, svc *Services) Runner { } type Body struct { - ID uuid.UUID `json:"id" validate:"required,uuid"` + DocumentID uuid.UUID `json:"id" validate:"required,uuid"` } -func (s Runner) Process(ctx context.Context, req *types.Message) bool { - var body Body - err := json.Unmarshal([]byte(*req.Body), &body) - if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - err = s.svc.Document.Sync(ctx, body.ID) +func (s Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.Document.Sync(ctx, body.DocumentID) if err != nil { slog.Error("unable to process", "error", err) return false diff --git a/api/docSyncRunner/runner_test.go b/api/docSyncRunner/runner_test.go index 1b088a37..bcb3d16b 100644 --- a/api/docSyncRunner/runner_test.go +++ b/api/docSyncRunner/runner_test.go @@ -2,7 +2,6 @@ package docsyncrunner_test import ( "context" - "encoding/json" "fmt" "testing" @@ -11,12 +10,11 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/document" documentsync "queryorchestration/internal/document/sync" - "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/server/runner" "queryorchestration/internal/serviceconfig/queue/documentclean" queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -26,7 +24,7 @@ import ( ) type DocSyncConfig struct { - serviceconfig.BaseConfig + runner.BaseConfig[docsyncrunner.Body] documentclean.DocCleanConfig } @@ -52,20 +50,14 @@ func TestDocInitRunner(t *testing.T) { t.Run("valid", func(t *testing.T) { j := client.Client{ - ID: uuid.New(), + ID: "hello", } docinfo := document.DocumentSummary{ ID: uuid.New(), ClientID: j.ID, } doc := docsyncrunner.Body{ - ID: docinfo.ID, - } - bodyBytes, err := json.Marshal(doc) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, + DocumentID: docinfo.ID, } pool.ExpectQuery("name: GetDocumentSummary :one").WithArgs(docinfo.ID). @@ -75,30 +67,20 @@ func TestDocInitRunner(t *testing.T) { ) pool.ExpectQuery("name: GetClient :one").WithArgs(j.ID). WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(j.ID, "client_id", "client_name", true), + pgxmock.NewRows([]string{"id", "name", "canSync"}). + AddRow(j.ID, "client_name", true), ) mockSQS.EXPECT(). SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.DocumentCleanURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", doc.ID) + return *in.QueueUrl == cfg.DocumentCleanURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", doc.DocumentID) }), mock.Anything, ). Return(&sqs.SendMessageOutput{}, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } - - assert.True(t, runner.Process(ctx, msg)) + assert.True(t, runner.Process(ctx, doc)) }) } diff --git a/api/docTextProcessRunner/runner.go b/api/docTextProcessRunner/runner.go new file mode 100644 index 00000000..b64a454f --- /dev/null +++ b/api/docTextProcessRunner/runner.go @@ -0,0 +1,50 @@ +package doctextprocessrunner + +import ( + "context" + "log/slog" + + documenttext "queryorchestration/internal/document/text" + + "github.com/go-playground/validator/v10" +) + +const Name = "docTextProcessRunner" + +type Services struct { + Text *documenttext.Service +} + +type Runner struct { + validator *validator.Validate + svc *Services +} + +func New(validator *validator.Validate, svc *Services) Runner { + return Runner{ + validator: validator, + svc: svc, + } +} + +type Body struct { + Bucket string `json:"bucket" validate:"required"` + Key string `json:"key" validate:"required"` + Hash string `json:"hash" validate:"required"` + ClientID string `json:"clientId" validate:"required"` +} + +func (s Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.Text.Process(ctx, &documenttext.ProcessParams{ + Bucket: body.Bucket, + Key: body.Key, + Hash: body.Hash, + ClientID: body.ClientID, + }) + if err != nil { + slog.Error("unable to process", "bucket", body.Bucket, "key", body.Key, "hash", body.Hash, "error", err) + return false + } + + return true +} diff --git a/api/docTextProcessRunner/runner_test.go b/api/docTextProcessRunner/runner_test.go new file mode 100644 index 00000000..dcc888ef --- /dev/null +++ b/api/docTextProcessRunner/runner_test.go @@ -0,0 +1,116 @@ +package doctextprocessrunner + +import ( + "context" + "fmt" + "io" + "strings" + "testing" + + "queryorchestration/internal/database/repository" + "queryorchestration/internal/document" + documenttext "queryorchestration/internal/document/text" + "queryorchestration/internal/server/runner" + "queryorchestration/internal/serviceconfig/aws" + "queryorchestration/internal/serviceconfig/objectstore" + "queryorchestration/internal/serviceconfig/queue/querysync" + "queryorchestration/internal/serviceconfig/textract" + objectstoremock "queryorchestration/mocks/objectstore" + queuemock "queryorchestration/mocks/queue" + + "github.com/aws/aws-sdk-go-v2/service/s3" + "github.com/aws/aws-sdk-go-v2/service/sqs" + "github.com/go-playground/validator/v10" + "github.com/google/uuid" + "github.com/pashagolub/pgxmock/v3" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +type DocInitConfig struct { + runner.BaseConfig[Body] + aws.AWSConfig + textract.TextractConfig + querysync.QuerySyncConfig + objectstore.ObjectStoreConfig +} + +func TestDocTextProcessRunner(t *testing.T) { + ctx := context.Background() + + pool, err := pgxmock.NewPool() + require.NoError(t, err) + + cfg := &DocInitConfig{} + cfg.DBPool = pool + cfg.DBQueries = repository.New(pool) + mockSQS := queuemock.NewMockSQSClient(t) + cfg.QueueClient = mockSQS + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + + runner := New(validator.New(), &Services{ + Text: documenttext.New(cfg), + }) + assert.NotNil(t, runner) + + t.Run("valid", func(t *testing.T) { + triggerId := uuid.New() + docId := uuid.New() + textractId := "heeloo" + textId := uuid.New() + cleanId := uuid.New() + bucketName := "bucketName" + docinfo := document.DocumentSummary{ + ID: uuid.New(), + ClientID: "hello", + Hash: `"5d41402abc4b2a76b9719d911017c592"`, + } + location := fmt.Sprintf("%s/text/textract/%s", docinfo.ClientID, triggerId) + doc := Body{ + Bucket: bucketName, + Key: location, + Hash: docinfo.Hash, + ClientID: docinfo.ClientID, + } + + pool.ExpectQuery("name: GetDocumentTextTrigger :one").WithArgs(triggerId).WillReturnRows( + pgxmock.NewRows([]string{"id", "cleanId", "version", "textractJobId", "documentId"}). + AddRow(triggerId, cleanId, int64(123), &textractId, docId), + ) + pool.ExpectBegin() + pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(cleanId, docinfo.Hash).WillReturnRows( + pgxmock.NewRows([]string{"id"}). + AddRow(textId), + ) + pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, triggerId, pgxmock.AnyArg()). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() + + body := io.NopCloser(strings.NewReader("hello")) + mockS3.EXPECT(). + GetObject( + mock.Anything, + mock.MatchedBy(func(in *s3.GetObjectInput) bool { + return *in.IfMatch == `"5d41402abc4b2a76b9719d911017c592"` + }), + mock.Anything, + ). + Return(&s3.GetObjectOutput{ + Body: body, + }, nil) + + mockSQS.EXPECT(). + SendMessage( + mock.Anything, + mock.MatchedBy(func(in *sqs.SendMessageInput) bool { + return *in.QueueUrl == cfg.QuerySyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", docId.String()) + }), + mock.Anything, + ). + Return(&sqs.SendMessageOutput{}, nil) + + assert.True(t, runner.Process(ctx, doc)) + }) +} diff --git a/api/docTextRunner/runner.go b/api/docTextRunner/runner.go index 3cc8ec75..8d1aa60c 100644 --- a/api/docTextRunner/runner.go +++ b/api/docTextRunner/runner.go @@ -2,15 +2,12 @@ package doctextrunner import ( "context" - "encoding/json" "log/slog" documenttext "queryorchestration/internal/document/text" "github.com/go-playground/validator/v10" "github.com/google/uuid" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "docTextRunner" @@ -32,24 +29,11 @@ func New(validator *validator.Validate, svc *Services) Runner { } type Body struct { - ID uuid.UUID `json:"id" validate:"required,uuid"` + DocumentID uuid.UUID `json:"id" validate:"required,uuid"` } -func (s Runner) Process(ctx context.Context, req *types.Message) bool { - var body Body - err := json.Unmarshal([]byte(*req.Body), &body) - if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - err = s.svc.Text.Extract(ctx, body.ID) +func (s Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.Text.Extract(ctx, body.DocumentID) if err != nil { slog.Error("unable to process", "error", err) return false diff --git a/api/docTextRunner/runner_test.go b/api/docTextRunner/runner_test.go index b9a6728d..7a9542f4 100644 --- a/api/docTextRunner/runner_test.go +++ b/api/docTextRunner/runner_test.go @@ -2,21 +2,22 @@ package doctextrunner_test import ( "context" - "encoding/json" - "fmt" "testing" doctextrunner "queryorchestration/api/docTextRunner" "queryorchestration/internal/database/repository" "queryorchestration/internal/document" documenttext "queryorchestration/internal/document/text" - "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/server/runner" + "queryorchestration/internal/serviceconfig/aws" + "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/serviceconfig/queue/querysync" "queryorchestration/internal/serviceconfig/textract" + objectstoremock "queryorchestration/mocks/objectstore" queuemock "queryorchestration/mocks/queue" + textractmock "queryorchestration/mocks/textract" - "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" + awstextract "github.com/aws/aws-sdk-go-v2/service/textract" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -26,9 +27,11 @@ import ( ) type DocTextConfig struct { - serviceconfig.BaseConfig + runner.BaseConfig[doctextrunner.Body] + aws.AWSConfig querysync.QuerySyncConfig textract.TextractConfig + objectstore.ObjectStoreConfig } func TestDocCleanRunner(t *testing.T) { @@ -43,6 +46,10 @@ func TestDocCleanRunner(t *testing.T) { mockSQS := queuemock.NewMockSQSClient(t) cfg.QueueClient = mockSQS cfg.QuerySyncURL = "/i/am/here" + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + mockTextract := textractmock.NewMockTextractClient(t) + cfg.TextractClient = mockTextract runner := doctextrunner.New(validator.New(), &doctextrunner.Services{ Text: documenttext.New(cfg), @@ -51,72 +58,52 @@ func TestDocCleanRunner(t *testing.T) { t.Run("valid", func(t *testing.T) { doc := doctextrunner.Body{ - ID: uuid.New(), - } - bodyBytes, err := json.Marshal(doc) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, + DocumentID: uuid.New(), } + cleanId := uuid.New() inloc := document.Location{ Bucket: "bucket_name", Key: "/i/am/here", } + hash := "example" - pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(doc.ID).WillReturnRows( + pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(doc.DocumentID).WillReturnRows( pgxmock.NewRows([]string{"isextracted"}). AddRow(false), ) - cleanId := uuid.New() mimeType := "application/pdf" dbmimetype := repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.Cleanmimetype(mimeType), } - pool.ExpectQuery("name: GetCleanEntryByDocId :one").WithArgs(doc.ID).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(cleanId, doc.ID, &inloc.Bucket, &inloc.Key, int64(1), dbmimetype, repository.NullCleanfailtype{}), + pool.ExpectQuery("name: GetCleanEntryByDocId :one").WithArgs(doc.DocumentID).WillReturnRows( + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail", "externalClientId"}). + AddRow(cleanId, doc.DocumentID, &inloc.Bucket, &inloc.Key, int64(1), &hash, dbmimetype, repository.NullCleanfailtype{}, "clientId"), ) - pool.ExpectQuery("name: GetCleanEntry :one").WithArgs(cleanId).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(cleanId, doc.ID, &inloc.Bucket, &inloc.Key, int64(1), dbmimetype, repository.NullCleanfailtype{}), - ) - textId := uuid.New() + jobId := "hello" + triggerId := uuid.New() pool.ExpectBegin() - pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(cleanId, "example").WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "cleanEntryId"}), + pool.ExpectQuery("name: AddDocumentTextTrigger :one").WithArgs(cleanId, pgxmock.AnyArg()).WillReturnRows( + pgxmock.NewRows([]string{"id"}).AddRow(triggerId), ) - pool.ExpectQuery("name: AddDocumentText :one").WithArgs(inloc.Bucket, inloc.Key, cleanId, "example"). - WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(textId), - ) - pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, pgxmock.AnyArg()). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectCommit() - mockSQS.EXPECT(). - SendMessage( + mockTextract.EXPECT(). + StartDocumentTextDetection( mock.Anything, - mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.QuerySyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", doc.ID.String()) + mock.MatchedBy(func(in *awstextract.StartDocumentTextDetectionInput) bool { + return true }), mock.Anything, ). - Return(&sqs.SendMessageOutput{}, nil) + Return(&awstextract.StartDocumentTextDetectionOutput{ + JobId: &jobId, + }, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } + pool.ExpectExec("name: AddDocumentTextTriggerJobId :exec").WithArgs(&jobId, triggerId). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() - assert.True(t, runner.Process(ctx, msg)) + assert.True(t, runner.Process(ctx, doc)) }) } diff --git a/api/queryAPI/api.gen.go b/api/queryAPI/api.gen.go index a95fefc6..7f363e42 100644 --- a/api/queryAPI/api.gen.go +++ b/api/queryAPI/api.gen.go @@ -89,9 +89,6 @@ type ClientStatusBody struct { Status ClientStatus `json:"status"` } -// ClientUID The client internal unique id -type ClientUID = openapi_types.UUID - // ClientUpdate The properties that may be updated. type ClientUpdate struct { // CanSync If the client is allowing active syncs @@ -165,9 +162,6 @@ type DocClient struct { // Name The client name Name ClientName `json:"name"` - - // Uid The client internal unique id - Uid ClientUID `json:"uid"` } // Document The document properties. @@ -729,68 +723,66 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xc63PbRnD/V27QfGr4JiVS6nSmjOQ4bG3ZkeROOpbKOQJL8lIAR90dJDMe/u+de+EN", - "EqRJJR804w8CcY/dvd3f7u0u/N1xabCiIYSCO5ffnSVgD5j68xYL+EACIuSDB9xlZCUIDZ1L9Qr58h0i", - "4ZyyAMsXiIRIP6AHR739txcSevTl3wUJoKn/fnCchgPfcLDywbl0up2OHdTtOA2Hu0sIsNyxdMy5HBPg", - "bx8gXIilc9nvNZwVFgKYJOt/v3aaF48/28H66Sen4Yj1Si7EBSPhwtlsNnIWwwEIw+uVTyAUk+siq/dL", - "QK56iybXLafhEPnrCoul03BCHMh1iec0HAZPEWHgOZeCRZDm5CcGc+fS+Zd2Iuq2fsvb8caSpmvqRsEW", - "Ojzz/iSUpDaXtLz7tqKskhJQb09CR7yxpOL3CNi6iojJNaJzJJaAnuSw45Nid1cKw4CvaMhB6csklCqH", - "/XeMUSZ/cGkoIFSmglcrn7jKItp/cknt97qsy9U+Aud4AXrTLNN2V8SBPQNDIMdLtqustmwzM7adDFQ7", - "TcJn7BPvFp4i4OIVWVLbIqb3RTPqrY/E0T2lH3G4NhzxV2Pp1igKilY0RIJSFOBwbTnkR+Cu4dyCYOvm", - "eC6AFW3jJgpmwKRtcHBp6HE0gzllgARbk3CB8AKTsJWG4W6vk7YJDeLSdkLR72nEJUEUOJej80Gn03AC", - "EurnToytJBSwACYFsmk4X0IciSVl5C9pc68t+JclhChKkXAUjdpYEaU8xhUO79ahWzyDiQYm4zkIR9j3", - "6YuSvivIMyC+Dl2euKYZpT7gUJ6tWZkBFlAOfCtGV8AEAS79LXLlUELVkSav5FTi1fc/FjDrjL+RIzUo", - "Wlz9qoFWrfEYs0Vnf4IrEq52eFj4ZgBOrZVEAOPxOOf3zzN+v1Xm5ZM9f6Heeuu+xPsx2RUlUS2CGyPl", - "SmKUCLPcMxCQFUDvbA8J3AksIl7c9G4FLplLNZK6ytUoCRvYkKIwIpR2/tWZ3Ezv/ufmymk4N5/u1Z/v", - "rlMPk5v3KZ7LCSg/hrHl2+yfDii17Ipnw2OGdp+PYT5/RmaJ6nP6skNXiXXGUUieIsirbKd7cTY667vN", - "0dzzmsOh6zVn/XO32Ts76w26M8/z+n2nkUBtFKkFcjpeIc8vK68OOIglFijAazSTzkhOKdFzF4dTbjBs", - "tzQt4B0GF0VRUw/+Gxgn2g+UhLzA5Ykhl3qAnvXIVlpuJBTng7SLuuj1+v1hr9M/H50NhsPzTsZhdYsO", - "S1Lh++AKWuJL41cooB74RfFpOJ8+J0xsk4flddNwtBpN94PoOQHf2634luhf9fBNw/GxAC4OINNIbupK", - "9wSs7grpg02tIuCbOGiJnPUmwotlUk1qxfYFoTTyh1kKDhnZliutoijvpVU4YCcX9aiWNWX21lbVcNTl", - "p4YeJbeZrCyNv4mX2c11tQujkVhFwghALtw6zG3lFLhaytJfFEVLBAR7WonSUvxtomcqOg1ZmDG8zlB1", - "ByU5kc947VPsqbNWYKuCPXRVfeQHQ8fBKPDPMeaChl1TVwPdTq+WC1CO5M1OGyo3nKjuBl/KA0q9QsNa", - "a8znY7ksVSpnRxYpkVyJHH/MO1VaKw49Za7P2I8gxkVLUjqC+m4pWndjbNDTEmLXPedy0Ese+za/Y384", - "cy6/dhu9Rv+xTOeWmC938febHFNLP3IJtML5pX2W2jkW2LYz3JkL1HeXXODZ8ebNWX8+ag77g1HzAs+6", - "zS6cnc368+4IvOEBgael5y4KAszWO4jietRWFXtd6avdygSdySoUuLpOniTwqIxbVksDO9VZ0wgFEZdX", - "A9ePPEAY2ZebPPNB1YaGEqR/nUmlV+4NRxyyBx1vtyDPgAJAC0q99PXpANebk5ylslRuKk97DQITn293", - "hyZbLBhZLIAhm0k9EuromGPqU51UKtdM+1aGCy9L4i6VVA1hf5EVmhMf0AvxfXlZmtMozJkV71+223jm", - "tsfjdq/TO+v0uv22srUhdpudYX/WHHYuRs3RoHfenGHvYtiZj9yL4aDl8ufcSXQGo8xRqLVbP8t/qmbx", - "fbRpt35+eJBTS+OjevdffUIV9980Gm25C9cqA1RAEDQH3lm3Oez23ebFCKA5OB/AqD/qdufdQ+6+GX7K", - "owTKOZn5MWGSMQ09No0hxeSDAE8VC6YrRhcMuLw9zDHxwStNYuiN77X6bld1o+Mq9gsNGUU9V7g/nRPf", - "1p+yC/6qXuikjEtXgGaYg4doaAJrE2UrZ8hrx7sqDNRL1wh2SbgALuk5hMx4MkrKbEUpQOhNq/MYPuYC", - "ydcSd+MFM3d/+bYpSADFomCZyTBRuR3haE7YETcshhtlAUj6SCrEq28RLvWjICziJQ09ImqE36mNruI5", - "NmKbHn731CpYfoD6HYo4zCMfCaoURStTRmf3vx4mqtvtdPKqm8O5FIeNlLxi0h+3H8tVWsJbAEcb5jw+", - "sninDPr4wPlULLHcf6ES/Mw+uj7l4E1VVvEZ+07DoSsI088+zMW0OIyRxbLsdxOEKGDWf5VB228mCNsS", - "y5lYdZsDqziniVcZV40RJ+HCBySxvyr5np3yxeZZIRRkToDp2CIURKxbe7uTein7D4QLG1ny7XJKMhHx", - "1bQWLOcD693QLIn6PQJGyixvjDgIiWBPekRRtk9VU+W6uZm1OFCJpSzdZ93eDru0VJRJXS9YwppPF8RF", - "UUgUnfAN3Ki88HV4VpaGc7KoxfGVHlrrdhLn3n4gE2ulN00d4Lapt2a82VslgLSoa9B6LweWXqTUEoVU", - "aYGvynO9iiWcz7TL3yOmw3SbGYg7O7bBz8PD99a/PjxsSkFIb7qtmhqHKMgyK72VqqrKO1xMQsH37q8p", - "f/8ZqtmVh1MV6CsZVKcaYH5+1hyeD8+bIw8umheDQf8MX/T7/SE+IM7XxAMXqWaUnUVwc05IKqHttSge", - "mgXr6X4JBZsd39doc7JP755fsvJItCD0jblcEvY+jeaMBhlBFAWgE2jFhj7gkS8y7VTxAns7/hzXestq", - "/ow6bytNy5mFXi8bVP3n3aeb6bs/7m/HV/efbp2Gc/Xp5v7dH/fTX798+FAa9Kh9D6+hpvXt73Y9Pw4o", - "ZfeSwqjKWCFGTK0zk+s9wwZtXTsCnloV4oricLZ/qdcdDAej/vlguKOJqeFwcCNGxPpOkqsFu/KxC0vq", - "e8DGkSiJmz8nA5CdjxS/Otc9j0TEABGJnxIIbJpOtS3qpqOkcfGP5vjzpPlfsE4sDK+IfFa9SCScU9ta", - "hV0FkhBg4juXThC4i4iEIXD+HxgzENByaZCs/JG4Sww++ui+N8OchhMxOdWj7l9rNbrQXjX+PImD3ayT", - "VieJPjF3CVwYB86BPRNXR5E+ccGgl6EgCs1vXrzzy8tLy7gWu78gQvmZsvXHnyfyEmc1w+m0Oq2uSgeu", - "IMQr4lw6/Van1XcUXi3V+bXduMK0omV+RYcJHGEUwott9HghQmcLV4w+Ew885OmkZ0tf0jRBEy+eb+pY", - "2jiBC9v3cpQmuEx3WEkTnDYJRV95OOOmqUt6YvMdrr1O98g0mz6sEpr1e0Oih3jkusD5PPL9Y/WCDjqd", - "qhkx1+1cC6ya1t09LdPrKCf1LnZPyjenbhrOWT0a043HaZxyLr+WINTXx81jw+G2aGM0NKPgEl7wgktX", - "ajqmtOk6j3J5YzPt78TbSPIWZbXvWxCMwLOyHK49t2vNZ7ZGRHDTKp41l/cgUraSUb7O0ZQvKSxXa17K", - "oN+U7XjK9h5EDDhSDybXW3Qt+0nG13LakiGpEtCjgni3xB/rGI/rVDzhqiUjjerSCCrBXE9+BTA3kegO", - "MBfUxJ81oLtT4to02zaEfcPY06m9Ps+0q62Jr2033Yi4B9LGTYoGbDMfLBUx1w7/ZW2MyDslACfdlWUA", - "HJP+hsGnxOC0hsTakdbMpLftlIB8B8Jun5C0G4rvqpX2BKCcbvPbDcozUBn30hbPXTg92NZwLFd9g+nT", - "WcZd1jK2G0Meqb10UWgHUku18E2+JKkWzdbpL4TKoDpTfHodrM7Wu7YEzDEbkrE3zTyuZqrkmsjUFnXK", - "sRBQxGd1FNjOK7luX1Hpkh/wBKWZlklIBFGxeaoPa8WoRLuiJZjWG92HcyLYzzb5VOC+IdTgupJ861VT", - "KUlJvYTCd5k+u7co/6RGajQlafNKmaXpVKv0Hkn/Xg3Xwdehaz+OqxXfm6/tXie4z3/fV+0zDAtvcf7J", - "4nz7IWWiMKfJt0h1tq6pbmJQpKJm9QVH3F9kdFoXlwvKfJ18GnDKFKHeo0R57bs3vT2d3no5GScqcdxQ", - "J13SV0qsgXu7Cl8twf0/rb9uxJhFMlWPzrT4ZlU3aVaGU6putgu/OiZYYo5mACGKG6DfFPnIlRWpJ5nG", - "89aWiGBf1U3+VxyluE+2Q25nktDPNvWlW8lV97bLiABGcPn107YZnvjKabcp0d9xnoM3vT3BZfMpPmer", - "sKrmPv480bpao1quG0D2LpbrXs/TXOnSrX+HlMqfUrT9A653ug3irUr+ylVyqwUllhFD8QHlcW0v26vj", - "iXGcCHxN63aVrr3FvCesycQKkCnEZHF3rxghbqjbryCeAu4a9fCT4/X2ariuX9tvi+Lvx00PYNySeUCB", - "XGv8W338FevjtZG1LUwb+A8YRGkI8059QqKAWTeOR6HOTlRFM9nvGXNZauDi5OaR7ouvsJFcI/w+ierO", - "KYg1vetl1GoaeeS/1ZCOnZ6Wot1uYmpN9myNKdfKzKgXuXErr2pM1o26SyFW/LLdjluF289dZWJmj/xK", - "n6yRyCjbV+gqg2yVTuRJU3I2P7lp1FzGlmrTK+XLt3UXS4q68VqFrFPdtZIblVkplnzdFXQqIbVCNoew", - "edz8fwAAAP//YgULir1ZAAA=", + "H4sIAAAAAAAC/+xcW3PbRrL+K1M4eTrhndT11KlaRnIc7tqyI8lb2bK0rCHQJCcLYKiZgWRGxf++NTfc", + "QYI0qeSBVX4QiLl093R/3dPd8Kvj0mBBQwgFdy5fnTlgD5j68xYL+EACIuSDB9xlZCEIDZ1L9Qr58h0i", + "4ZSyAMsXiIRIP6AHR739vxcSevTl/wUJoKn/fnCchgPfcLDwwbl0up2OHdTtOA2Hu3MIsNyxdMypHBPg", + "bx8gnIm5c9nvNZwFFgKYJOvfXzvNi8cf7WD99IPTcMRyIRfigpFw5qxWKzmL4QCE4fXKJxCK0XWR1fs5", + "IFe9RaPrltNwiPx1gcXcaTghDuS6xHMaDoOniDDwnEvBIkhz8gODqXPp/E87EXVbv+XteGNJ0zV1o2AN", + "HZ55fxBKUptLWt59W1BWSQmotwehI95YUvFrBGxZRcToGtEpEnNAT3LY/kmxuyuFYcAXNOSg9GUUSpXD", + "/jvGKJM/uDQUECpTwYuFT1xlEe3fuaT2tS7rcrWPwDmegd40y7TdFXFgz8AQyPGS7SqrLdvMjG0nA9VO", + "o/AZ+8S7hacIuHhDltS2iOl90YR6yz1xdE/pRxwuDUf8zVi6NYqCogUNkaAUBThcWg75HrhrOLcg2LI5", + "nApgRdu4iYIJMGkbHFwaehxNYEoZIMGWJJwhPMMkbKVhuNvrpG1Cg7i0nVD0expxSRAFzuX56aDTaTgB", + "CfVzJ8ZWEgqYAZMCWTWcLyGOxJwy8oe0ubcW/MscQhSlSNiLRq2siFIe4wqHd8vQLZ7BSAOT8RyEI+z7", + "9EVJ3xXkGRBfhi5PXNOEUh9wKM/WrMwACygHvgWjC2CCAJf+FrlyKKHqSJNXcirx6vsfC5h1xt/IkRoU", + "La5+1UCr1niM2aKT38EVCVcbPCx8MwCn1koigOFwmPP7pxm/3yrz8smeP1FvuXZf4n2f7IqSqBbBjZFy", + "JTFKhFnuGQjICqB3soUE7gQWES9uercAl0ylGkld5WqUhA1sSFEYEUo7/+qMbsZ3/7q5chrOzad79ee7", + "69TD6OZ9iudyAsqPYWj5NvunA0otu+LZ8JihzedjmM+fkVmi+py+LLw6BijmWKAAL9FEAr6cUqJLLg7H", + "3ODEZootqOxmkkV2qAf/BMaJxtqSsBK4lApyqQfoWY+UPKTdwOkg7QYuer1+/6zX6Z+enwzOzk47GafQ", + "LToFSYXvgytoib+KX6GAeuAXxachc/ycMLFOHpbXVcPRmjXeDganBHxvs3JZon/Ww1cNx8cCuNiBTCO5", + "sStdALC6K6QPNrWKgG9ipyVyFpIIL5ZJNakV2xeE0sgfZqkBZmRbrrSKorwnVC7XTi7qUS1ryuytrarh", + "qAtGDT1KbgxZWRpMj5fZzHW1m6CRWETCCEAu3NrNNeQUuFrKEpOLoiUCgi2tRGkp/jbSMxWdhizMGF5m", + "qLqDkrzDZ7z0KfbUWSuwVQEVuqo+8p2hY2cU+OsYc0HDrqmrgW6jV8sFAXvyZn9SONpIKH4sl4pKfGzI", + "uSQyKJHI9/mZSrvDoacM7xn7EcQIZ0lKB4mvlqJlN7ZyPS0hdtlzLge95LFvsyH2hxPn8mu30Wv0H8u0", + "Z475fBN/v8gxtU46l24qnFza+6idY4GtO8ONmTMd6Sexdad7cXLe8abNSX963jzrD86bF3jSbXbh5GTS", + "n3bPwTtLh0JRpCjKXUUK4GrpuYuCALPlBqK4HrVWxd5W+mq3MkFn7uAFrq6TJwkhKj+V1dLATnWWNEJB", + "xAUioetHHiCM7MtVnvmgakNDCdK/TqTSK0eFIw7Zg463m8nbdwBoRqmXvmzs4ERzkrNUlspNZTWvQWDi", + "8/WOzeRWBSOzGTBk8457Qh0dPYx9qlMw5Zpp30rH/zIn7lxJ1RD2B1mgKfEBvRDfl9eeKY3CnFnx/mW7", + "jdvDtp7T7nV6J51et9+W9tNy+XNO2p3BeUbcan7rR/nPrKCS+a/nq3brx4cHuUJpUFPvYqgPo+JimAae", + "NZfEWvnxCrSB5sA76TbPun23eXEO0BycDuC8f97tTrv9HdAmw0+5a6eck4kfEyYZ0yhj7/dSTD4I8FQW", + "fbxgdMaAy5B/iokPXuntXm98rzV1vVYbdVYBW2jIKKq0gvjxlPi2MJNd8Gf1QmcrXLoANMEcPERDEw2b", + "0Fj5PV47SFWxm166RoRKwhlwSc8uZMaTUVJ/KkoBQm9cnXzwMRdIvpYQGy+YubDLt01BAihWy8pMhonK", + "7QhHU8L2uGExsiiLNdJHUiFeHfq71I+CsAiNNPSIqBEzpza6iufY4Gy8+4VRq2D5Aep3KOIwjXwkqFIU", + "rUwZnd3+TpeobrfTyatuDudSHDZS8opJf1x/LFdpCa8BHG2Y0/jI4p0y6OMD52Mxx3L/mcp8M/vo+pSD", + "NyahAPaMfafh0AWE6WcfpmJcHMbIbF72u4k3FDDrv8qg7RcTb60J20xYus6PVZzTyKsMoYaIk3DmA1Ke", + "siIrnZ3yJSRPESDiQSjIlADTYUQoiFi2tnYn9XLZHwgXNojk6+WUpA/i+2QtWM7H0JuhWRL1awSMlFne", + "EHEQEsGe9IiibJ+qpsp1czNrcaCyQVm6T7q9DXZpqSiTul6whDWfzoiLopAoOuEbuFF5RWj3VCoNp2RW", + "i+MrPbTWRSROmH1H+tRKb5w6wHVTb814s7fK2mhR16D1Xg4svTOpJQr5zQJfled6FUs4nx6Xv0dMR+Q2", + "CRC3PKyDn4eH19b/PjysSkFIb7quzBiHKMgyK72VKjfK61pMQsH3bq8pf/4ZqtmVh1MV6CsZVGcVYHp6", + "0jw7PTttnntw0bwYDPon+KLf75/hHeJ8TTxwkerS2FgdNueEpBLaJoTioVmwHm+XO7Ap7W2NNif79O75", + "JSuPRAtCX47LJWGvzmjKaJARRFEAOldW7HQDHvki02cUL7C1489xrbes5s+o87qarZxZaIKyQdXf7z7d", + "jN/9dn87vLr/dOs0nKtPN/fvfrsf//zlw4fSoEftu3vhM61vf7br+X5AKbuXFEZVxgoxYmqdGV1vGTZo", + "69oQ8NQq61ZUdLONPb3u4Gxw3j8dnG3o7mk4HNyIEbG8k+RqwS587MKc+h6wYSRK4ubPyQBk5yPFr05r", + "TyMRMUBE4qcEApuRU/18uhsn6ej7rTn8PGr+A5aJheEFkc+qSYeEU2p7jrCrQBICTHzn0gkCdxaRMATO", + "/4YxAwEtlwbJyh+JO8fgo4/uezPMaTgRk1M96v6xVKMLfUfDz6M42M06aXWS6BNz58CFceAc2DNxdRTp", + "ExcMehkKotD85sU7v7y8tIxrsfsLIpSfKVt/+HkkL3FWM5xOq9PqqszfAkK8IM6l0291Wn1H4dVcnV/b", + "jctCC1rmV3SYwBFGIbzYho0XInRicMHoM/HAQ57Ob7b0JU0TNPLi+ab4pI0TuLANIXvpDsu0TZV0h2mT", + "UPSVhzNumrqkWTTf+tnrdPdMs2lQKqFZvzckeohHrgucTyPf31eT5KDTqZoRc93O9Yaqad3N0zJNgHJS", + "72LzpHzX5qrhnNSjMd2Rm8Yp5/JrCUJ9fVw9Nhxu6zNGQzMKLuEFz7h0paaVSJuu8yiXNzbTfiXeSpI3", + "KytY34JgBJ6V5XDtuV1rPpMlIoKbHuqsubwHkbKVjPJ19qZ8STW4WvNSBn1Utv0p23sQMeBIPRhdr9G1", + "7LcKX8tpS4akqj2PCuLdEn+sYzyuU/GEqz6KNKpLI6gEcz35DcDcRKIbwFxQE3/WgO5OiWvTbNsQ9oix", + "h1N7fZ5pV1sTX9tuuntwC6SNOwsN2Ga+5Clirh3+09IYkXdIAE5aIssAOCb9iMGHxOC0hsTakdbMpCHt", + "kIB8B8Jun5C0GYrvqpX2AKCc7s3bDMoTUBn30r7MTTg9WNclLFc9wvThLOMuaxnrjSGP1F66KLQBqaVa", + "+CZfklSLJsv0pzNlUJ0pPr0NVmfrXWsC5pgNydhRM/ermSq5JjK1RZ1yLAQU8VntBbbzSq7bV1S65Ds8", + "QWmmZRQSQVRsnmq5WjAq0a5oCab1RvfhHAj2s00+FbhvCDW4riTfetNUSlJSL6HwXaal7hjlH9RIjaYk", + "bV4pszSdapXeI+nfq+E6+DJ07VdjteJ78xna2wT3+Q/fqn2GYeEY5x8szrdfGCYKc5h8i1Rn65rqJgZF", + "KmpWn13E/UVGp3VxuaDM18lXAIdMEeo9SpTXvjvq7eH01svJOFGJ/YY66ZK+UmLTdL1Wha/m4P5H668b", + "MWaRTNWjMy2+WdVNmpXhkKqbbbivjgnmmKMJQIjiBuijIu+5siL1JNN43loTEWyrusl/F6MU98l2yG1M", + "EvrZpr50K7nq3nYZEcAILr9+2jbDA1857TYl+jvMc3DU2wNcNp/ic7YKq2ruw88jras1quW6AWTrYrnu", + "9TzMlS7d+rdLqfwpRdtf4Hqn2yCOVfI3rpJbLSixjBiKdyiPa3tZXx1PjONA4Gtat6t07RjzHrAmEytA", + "phCTxd2tYoS4oW67gngKuGvUww+O1+ur4bp+bb8tij8VNz2AcUvmDgVyrfHH+vgb1sdrI2tbmDbw7zCI", + "0hDmnfqERAGzbhyPQp2dqIpmst8z5rLUwMXBzSPdF19hI7lG+G0S1Z1DEGt618uo1TTyyD/WkPadnpai", + "XW9iak32bI0p18rMqBe5cSuvakzWjbpzIRb8st2OW4Xbz11lYmaP/EqfrJHIKNtX6CqDbJVO5ElTcjY/", + "uWrUXMaWatMr5cu3dRdLirrxWoWsU921khuVWSmWfN0VdCohtUI2h7B6XP03AAD//4XAhtjWWAAA", } // GetSwagger returns the content of the embedded swagger specification file diff --git a/api/queryAPI/client.go b/api/queryAPI/client.go index 65713ed3..83526222 100644 --- a/api/queryAPI/client.go +++ b/api/queryAPI/client.go @@ -16,8 +16,8 @@ func (s *Controllers) CreateClient(ctx echo.Context) error { } _, err := s.svc.Client.Create(ctx.Request().Context(), client.CreateParams{ - Name: req.Name, - ExternalId: req.Id, + Name: req.Name, + ID: req.Id, }) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unable to create client: %s", err)) @@ -29,14 +29,13 @@ func (s *Controllers) CreateClient(ctx echo.Context) error { } func (s *Controllers) GetClient(ctx echo.Context, id ClientID) error { - client, err := s.svc.Client.GetByExternalId(ctx.Request().Context(), id) + client, err := s.svc.Client.Get(ctx.Request().Context(), id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unable to get client: %s", err)) } return ctx.JSON(http.StatusOK, DocClient{ - Id: client.ExternalID, - Uid: client.ID, + Id: client.ID, Name: client.Name, CanSync: client.CanSync, }) @@ -48,7 +47,7 @@ func (s *Controllers) UpdateClient(ctx echo.Context, id ClientID) error { return echo.NewHTTPError(http.StatusBadRequest, err) } - err := s.svc.Client.UpdateByExternalId(ctx.Request().Context(), id, &client.Update{ + err := s.svc.Client.Update(ctx.Request().Context(), id, &client.Update{ Name: req.Name, CanSync: req.CanSync, }) diff --git a/api/queryAPI/client_test.go b/api/queryAPI/client_test.go index a462c117..1bd6c83e 100644 --- a/api/queryAPI/client_test.go +++ b/api/queryAPI/client_test.go @@ -13,7 +13,6 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig" - "github.com/google/uuid" "github.com/labstack/echo/v4" "github.com/pashagolub/pgxmock/v3" "github.com/stretchr/testify/assert" @@ -45,10 +44,8 @@ func TestCreateClient(t *testing.T) { rec := httptest.NewRecorder() ctx := e.NewContext(req, rec) - pool.ExpectQuery("name: CreateClient :one").WithArgs(body.Id, body.Name).WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(uuid.New()), - ) + pool.ExpectExec("name: CreateClient :exec").WithArgs(body.Id, body.Name). + WillReturnResult(pgxmock.NewResult("", 1)) err = cons.CreateClient(ctx) require.NoError(t, err) @@ -74,13 +71,12 @@ func TestGetClient(t *testing.T) { ctx := e.NewContext(req, rec) id := "client_id" - clientUid := uuid.New() ctx.Set("id", id) - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(clientUid, "client_id", "client_name", true), + pool.ExpectQuery("name: GetClient :one").WithArgs(id).WillReturnRows( + pgxmock.NewRows([]string{"id", "name", "canSync"}). + AddRow("client_id", "client_name", true), ) err = cons.GetClient(ctx, id) @@ -92,7 +88,6 @@ func TestGetClient(t *testing.T) { require.NoError(t, err) assert.EqualExportedValues(t, queryapi.DocClient{ Id: id, - Uid: clientUid, Name: "client_name", CanSync: true, }, res) @@ -127,18 +122,12 @@ func TestUpdateClient(t *testing.T) { ctx.Set("id", id) - intid := uuid.New() - - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(intid, "clientid", "client_name", true), - ) - pool.ExpectQuery("name: GetClient :one").WithArgs(intid).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(intid, "clientid", "client_name", true), + pool.ExpectQuery("name: GetClient :one").WithArgs(id).WillReturnRows( + pgxmock.NewRows([]string{"id", "name", "canSync"}). + AddRow("clientid", "client_name", true), ) pool.ExpectBegin() - pool.ExpectExec("name: AddClientCanSync :exec").WithArgs(*body.CanSync, intid). + pool.ExpectExec("name: AddClientCanSync :exec").WithArgs(*body.CanSync, id). WillReturnResult(pgxmock.NewResult("", 1)) pool.ExpectCommit() diff --git a/api/queryAPI/collector.go b/api/queryAPI/collector.go index 4eb7b620..8e350e46 100644 --- a/api/queryAPI/collector.go +++ b/api/queryAPI/collector.go @@ -11,7 +11,7 @@ import ( ) func (s *Controllers) GetCollectorByClientId(ctx echo.Context, clientId ClientID) error { - coll, err := s.svc.Collector.GetByClientExternalID(ctx.Request().Context(), clientId) + coll, err := s.svc.Collector.GetByClientID(ctx.Request().Context(), clientId) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unable to get collector: %s", err)) } @@ -51,7 +51,7 @@ func (s *Controllers) SetCollectorByClientId(ctx echo.Context, clientId ClientID fields = &fs } - err := s.svc.CollectorSet.SetByClientExternalId(ctx.Request().Context(), clientId, &collectorset.SetParams{ + err := s.svc.CollectorSet.SetByClientId(ctx.Request().Context(), clientId, &collectorset.SetParams{ ActiveVersion: req.ActiveVersion, MinCleanVersion: req.MinimumCleanerVersion, MinTextVersion: req.MinimumTextVersion, diff --git a/api/queryAPI/collector_test.go b/api/queryAPI/collector_test.go index 13c63f71..a8903b57 100644 --- a/api/queryAPI/collector_test.go +++ b/api/queryAPI/collector_test.go @@ -38,8 +38,9 @@ func TestSetCollector(t *testing.T) { mockSQS := queuemock.NewMockSQSClient(t) cfg.QueueClient = mockSQS + id := "clientid" current := collector.Collector{ - ClientID: uuid.New(), + ClientID: id, ActiveVersion: 1, LatestVersion: 4, } @@ -71,14 +72,8 @@ func TestSetCollector(t *testing.T) { }), }) - id := "clientid" - ctx.Set("id", id) - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "can_sync"}). - AddRow(current.ClientID, id, "name", true), - ) pool.ExpectQuery("name: GetCollectorByClientID :one").WithArgs(current.ClientID). WillReturnRows( pgxmock.NewRows([]string{"clientId", "minCleanVersion", "minTextVersion", "activeVersion", "latestVersion", "fields"}). @@ -106,7 +101,7 @@ func TestSetCollector(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID.String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID) }), mock.Anything, ). @@ -136,14 +131,14 @@ func TestGetCollectorByclientId(t *testing.T) { }) coll := collector.Collector{ - ClientID: uuid.New(), + ClientID: "hello", MinCleanVersion: 1, MinTextVersion: 2, } id := "clientid" - pool.ExpectQuery("name: GetCollectorByClientExternalID :one").WithArgs(id). + pool.ExpectQuery("name: GetCollectorByClientID :one").WithArgs(id). WillReturnRows( pgxmock.NewRows([]string{"clientId", "minCleanVersion", "minTextVersion", "activeVersion", "latestVersion", "fields"}). AddRow(coll.ClientID, coll.MinCleanVersion, coll.MinTextVersion, int32(1), int32(2), []byte("")), diff --git a/api/queryAPI/documents.go b/api/queryAPI/documents.go index bff48154..3aded9aa 100644 --- a/api/queryAPI/documents.go +++ b/api/queryAPI/documents.go @@ -8,7 +8,7 @@ import ( ) func (s *Controllers) ListDocumentsByClientId(ctx echo.Context, clientId ClientID) error { - documents, err := s.svc.Document.ListByClientExternalId(ctx.Request().Context(), clientId) + documents, err := s.svc.Document.ListByClient(ctx.Request().Context(), clientId) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unable to list documents: %s", err)) } diff --git a/api/queryAPI/documents_test.go b/api/queryAPI/documents_test.go index 6081d85d..0848f6eb 100644 --- a/api/queryAPI/documents_test.go +++ b/api/queryAPI/documents_test.go @@ -53,7 +53,7 @@ func TestListDocumentsByClientId(t *testing.T) { }, } - pool.ExpectQuery("name: ListDocumentsByClientExternalId :many").WithArgs(clientId). + pool.ExpectQuery("name: ListDocumentsByClient :many").WithArgs(clientId). WillReturnRows( pgxmock.NewRows([]string{"id", "hash"}). AddRow(doc[0].Id, "hash"), @@ -103,7 +103,7 @@ func TestGetDocument(t *testing.T) { }, } - pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(&docId). + pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(docId). WillReturnRows( pgxmock.NewRows([]string{"id", "clientId", "hash", "fields"}). AddRow(doc.Id, "externalID", "example", []byte(`{"json": "hello"}`)), diff --git a/api/queryAPI/status.go b/api/queryAPI/status.go index 24e320a3..07662bd8 100644 --- a/api/queryAPI/status.go +++ b/api/queryAPI/status.go @@ -8,7 +8,7 @@ import ( ) func (s *Controllers) GetStatusByClientId(ctx echo.Context, id ClientID) error { - status, err := s.svc.Client.GetStatusByExternalId(ctx.Request().Context(), id) + status, err := s.svc.Client.GetStatus(ctx.Request().Context(), id) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unable to find client: %s", err)) } diff --git a/api/queryAPI/status_test.go b/api/queryAPI/status_test.go index 97c9f360..b32e7314 100644 --- a/api/queryAPI/status_test.go +++ b/api/queryAPI/status_test.go @@ -12,7 +12,6 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig" - "github.com/google/uuid" "github.com/labstack/echo/v4" "github.com/pashagolub/pgxmock/v3" "github.com/stretchr/testify/assert" @@ -35,19 +34,18 @@ func TestGetClientStatus(t *testing.T) { rec := httptest.NewRecorder() ctx := e.NewContext(req, rec) - clientId := uuid.New() - id := "clientid" + clientId := "clientid" - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "can_sync"}). - AddRow(clientId, id, "name", true), + pool.ExpectQuery("name: GetClient :one").WithArgs(clientId).WillReturnRows( + pgxmock.NewRows([]string{"id", "name", "can_sync"}). + AddRow(clientId, "name", true), ) pool.ExpectQuery("name: IsClientSynced :one").WithArgs(&clientId).WillReturnRows( pgxmock.NewRows([]string{"issynced"}). AddRow(true), ) - err = cons.GetStatusByClientId(ctx, id) + err = cons.GetStatusByClientId(ctx, clientId) require.NoError(t, err) assert.Equal(t, http.StatusOK, rec.Code) diff --git a/api/queryRunner/runner.go b/api/queryRunner/runner.go index e79e3889..0656c025 100644 --- a/api/queryRunner/runner.go +++ b/api/queryRunner/runner.go @@ -2,15 +2,12 @@ package queryrunner import ( "context" - "encoding/json" "log/slog" resultset "queryorchestration/internal/query/result/set" "github.com/go-playground/validator/v10" "github.com/google/uuid" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "queryRunner" @@ -36,21 +33,8 @@ type Body struct { QueryID uuid.UUID `json:"query_id" validate:"required,uuid"` } -func (s *Runner) Process(ctx context.Context, req *types.Message) bool { - var body Body - err := json.Unmarshal([]byte(*req.Body), &body) - if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - err = s.svc.ResultSet.Set(ctx, &resultset.Set{ +func (s *Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.ResultSet.Set(ctx, &resultset.Set{ DocumentID: body.DocumentID, QueryID: body.QueryID, }) diff --git a/api/queryRunner/runner_test.go b/api/queryRunner/runner_test.go index 44f9e830..69020fd4 100644 --- a/api/queryRunner/runner_test.go +++ b/api/queryRunner/runner_test.go @@ -2,7 +2,6 @@ package queryrunner_test import ( "context" - "encoding/json" "fmt" "testing" @@ -18,7 +17,6 @@ import ( queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -28,7 +26,7 @@ import ( ) type QueryConfig struct { - runner.BaseConfig + runner.BaseConfig[queryrunner.Body] queryc.QueryConfig } @@ -58,16 +56,10 @@ func TestQueryRunner(t *testing.T) { assert.NotNil(t, runner) t.Run("valid", func(t *testing.T) { - doc := resultset.Set{ + doc := queryrunner.Body{ DocumentID: uuid.New(), QueryID: uuid.New(), } - bodyBytes, err := json.Marshal(doc) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, - } qcfg := "{\"path\":\"examplekey\"}" reqQuery := uuid.New() @@ -81,12 +73,11 @@ func TestQueryRunner(t *testing.T) { DocumentID: doc.DocumentID, } - cleanEntryId := uuid.New() textEntryId := uuid.New() pool.ExpectQuery("name: GetTextEntryByDocId :one").WithArgs(params.DocumentID). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "cleanEntryId"}). - AddRow(textEntryId, params.DocumentID, "buket", "/i/am/here", int32(1), "example", cleanEntryId), + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "hash", "cleanId", "triggerId", "textractJobId", "triggerVersion", "extractionVersion"}). + AddRow(textEntryId, params.DocumentID, "buket", "/i/am/here", "example", uuid.New(), uuid.New(), "jobId", int64(123), int64(543)), ) pool.ExpectQuery("name: GetQuery :one").WithArgs(query.ID).WillReturnRows( pgxmock.NewRows([]string{"id", "type", "activeVersion", "latestVersion", "config", "requiredIds"}). @@ -138,16 +129,6 @@ func TestQueryRunner(t *testing.T) { ). Return(&sqs.SendMessageOutput{}, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } - - assert.True(t, runner.Process(ctx, msg)) + assert.True(t, runner.Process(ctx, doc)) }) } diff --git a/api/querySyncRunner/runner.go b/api/querySyncRunner/runner.go index d6eab03b..479ec664 100644 --- a/api/querySyncRunner/runner.go +++ b/api/querySyncRunner/runner.go @@ -2,15 +2,12 @@ package querysyncrunner import ( "context" - "encoding/json" "log/slog" querysync "queryorchestration/internal/query/sync" "github.com/go-playground/validator/v10" "github.com/google/uuid" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "querySyncRunner" @@ -32,24 +29,11 @@ func New(validator *validator.Validate, svc *Services) Runner { } type Body struct { - ID uuid.UUID `json:"id" validate:"required,uuid"` + DocumentID uuid.UUID `json:"id" validate:"required,uuid"` } -func (s *Runner) Process(ctx context.Context, req *types.Message) bool { - var body Body - err := json.Unmarshal([]byte(*req.Body), &body) - if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - err = s.svc.QuerySync.Sync(ctx, body.ID) +func (s *Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.QuerySync.Sync(ctx, body.DocumentID) if err != nil { slog.Error("unable to process", "error", err) return false diff --git a/api/querySyncRunner/runner_test.go b/api/querySyncRunner/runner_test.go index f2dc4482..cf5e0496 100644 --- a/api/querySyncRunner/runner_test.go +++ b/api/querySyncRunner/runner_test.go @@ -2,7 +2,6 @@ package querysyncrunner_test import ( "context" - "encoding/json" "fmt" "testing" @@ -15,7 +14,6 @@ import ( queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -25,7 +23,7 @@ import ( ) type QuerySyncConfig struct { - runner.BaseConfig + runner.BaseConfig[querysyncrunner.Body] queryc.QueryConfig } @@ -53,13 +51,7 @@ func TestQueryRunner(t *testing.T) { t.Run("valid", func(t *testing.T) { doc := querysyncrunner.Body{ - ID: uuid.New(), - } - bodyBytes, err := json.Marshal(doc) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, + DocumentID: uuid.New(), } reqId := uuid.New() @@ -67,12 +59,12 @@ func TestQueryRunner(t *testing.T) { reqId, } - pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(doc.ID). + pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(doc.DocumentID). WillReturnRows( pgxmock.NewRows([]string{"isextracted"}). AddRow(true), ) - pool.ExpectQuery("name: ListUnsyncedNoDepsQueriesByDocId :many").WithArgs(&doc.ID). + pool.ExpectQuery("name: ListUnsyncedNoDepsQueriesByDocId :many").WithArgs(&doc.DocumentID). WillReturnRows( pgxmock.NewRows([]string{"id"}). AddRow(&reqId), @@ -82,22 +74,12 @@ func TestQueryRunner(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.QueryURL && *in.MessageBody == fmt.Sprintf("{\"document_id\":\"%s\",\"query_id\":\"%s\"}", doc.ID.String(), qs[0].String()) + return *in.QueueUrl == cfg.QueryURL && *in.MessageBody == fmt.Sprintf("{\"document_id\":\"%s\",\"query_id\":\"%s\"}", doc.DocumentID.String(), qs[0].String()) }), mock.Anything, ). Return(&sqs.SendMessageOutput{}, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } - - assert.True(t, runner.Process(ctx, msg)) + assert.True(t, runner.Process(ctx, doc)) }) } diff --git a/api/queryVersionSyncRunner/runner.go b/api/queryVersionSyncRunner/runner.go index f947589a..417ce271 100644 --- a/api/queryVersionSyncRunner/runner.go +++ b/api/queryVersionSyncRunner/runner.go @@ -2,15 +2,12 @@ package queryversionsyncrunner import ( "context" - "encoding/json" "log/slog" queryversionsync "queryorchestration/internal/query/versionsync" "github.com/go-playground/validator/v10" "github.com/google/uuid" - - "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) const Name = "queryVersionSyncRunner" @@ -32,24 +29,11 @@ func New(validator *validator.Validate, svc *Services) Runner { } type Body struct { - ID uuid.UUID `json:"id" validate:"required,uuid"` + QueryID uuid.UUID `json:"id" validate:"required,uuid"` } -func (s *Runner) Process(ctx context.Context, req *types.Message) bool { - var body Body - err := json.Unmarshal([]byte(*req.Body), &body) - if err != nil { - slog.Error("parsing body", "messageId", *req.MessageId, "body", *req.Body) - return true - } - - err = s.validator.Struct(body) - if err != nil { - slog.Error("invalid body", "messageId", *req.MessageId, "error", err) - return true - } - - err = s.svc.Sync.Sync(ctx, body.ID) +func (s *Runner) Process(ctx context.Context, body Body) bool { + err := s.svc.Sync.Sync(ctx, body.QueryID) if err != nil { slog.Error("unable to process", "error", err) return false diff --git a/api/queryVersionSyncRunner/runner_test.go b/api/queryVersionSyncRunner/runner_test.go index 0e368181..513d6c33 100644 --- a/api/queryVersionSyncRunner/runner_test.go +++ b/api/queryVersionSyncRunner/runner_test.go @@ -2,7 +2,6 @@ package queryversionsyncrunner_test import ( "context" - "encoding/json" "fmt" "testing" @@ -14,7 +13,6 @@ import ( queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" "github.com/go-playground/validator/v10" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" @@ -24,7 +22,7 @@ import ( ) type QuerySyncConfig struct { - runner.BaseConfig + runner.BaseConfig[queryversionsyncrunner.Body] clientsync.ClientSyncConfig } @@ -50,23 +48,17 @@ func TestQueryRunner(t *testing.T) { t.Run("valid", func(t *testing.T) { doc := queryversionsyncrunner.Body{ - ID: uuid.New(), - } - bodyBytes, err := json.Marshal(doc) - require.NoError(t, err) - body := string(bodyBytes) - msg := &types.Message{ - Body: &body, + QueryID: uuid.New(), } - clientOne := uuid.New() - clientTwo := uuid.New() - clientIds := []uuid.UUID{ + clientOne := "hello" + clientTwo := "bye" + clientIds := []string{ clientOne, clientTwo, } - pool.ExpectQuery("name: ListQueryClientIDs :many").WithArgs(&doc.ID). + pool.ExpectQuery("name: ListQueryClientIDs :many").WithArgs(&doc.QueryID). WillReturnRows( pgxmock.NewRows([]string{"clientId"}). AddRow(clientOne). @@ -77,7 +69,7 @@ func TestQueryRunner(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[0].String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[0]) }), mock.Anything, ). @@ -86,22 +78,12 @@ func TestQueryRunner(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[1].String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[1]) }), mock.Anything, ). Return(&sqs.SendMessageOutput{}, nil) - assert.True(t, runner.Process(ctx, msg)) - }) - t.Run("invalid body", func(t *testing.T) { - body := "definitely invalid" - msgId := "id" - msg := &types.Message{ - Body: &body, - MessageId: &msgId, - } - - assert.True(t, runner.Process(ctx, msg)) + assert.True(t, runner.Process(ctx, doc)) }) } diff --git a/api/storeEventRunner/runner.go b/api/storeEventRunner/runner.go new file mode 100644 index 00000000..8180d5db --- /dev/null +++ b/api/storeEventRunner/runner.go @@ -0,0 +1,81 @@ +package storeeventrunner + +import ( + "context" + "log/slog" + + documentstore "queryorchestration/internal/document/store" + + "github.com/go-playground/validator/v10" +) + +const Name = "storeEventRunner" + +type Services struct { + Store *documentstore.Service +} + +type Runner struct { + validator *validator.Validate + svc *Services +} + +func New(validator *validator.Validate, svc *Services) Runner { + return Runner{ + validator: validator, + svc: svc, + } +} + +type S3Bucket struct { + Name string `json:"name"` + Arn string `json:"arn"` +} + +type S3Object struct { + Key string `json:"key"` + Size int64 `json:"size"` + ETag string `json:"eTag"` + VersionId string `json:"versionId"` +} + +type S3EventRecordDetails struct { + Bucket S3Bucket `json:"bucket"` + Object S3Object `json:"object"` +} + +type S3EventRecord struct { + EventVersion string `json:"eventVersion"` + EventSource string `json:"eventSource"` + AwsRegion Region `json:"awsRegion"` + EventTime string `json:"eventTime"` + EventName EventS3 `json:"eventName"` + S3 S3EventRecordDetails `json:"s3"` +} +type S3EventNotification struct { + Records []S3EventRecord `json:"Records"` +} + +type Region string +type EventS3 string + +const ( + EventS3ObjectCreatedPut = "ObjectCreated:Put" +) + +func (s Runner) Process(ctx context.Context, body S3EventNotification) bool { + for _, record := range body.Records { + err := s.svc.Store.Process(ctx, documentstore.Params{ + Bucket: record.S3.Bucket.Name, + Key: record.S3.Object.Key, + Hash: record.S3.Object.ETag, + Event: documentstore.EventS3(record.EventName), + }) + if err != nil { + slog.Error("unable to process", "error", err) + return false + } + } + + return true +} diff --git a/api/storeEventRunner/runner_test.go b/api/storeEventRunner/runner_test.go new file mode 100644 index 00000000..24017109 --- /dev/null +++ b/api/storeEventRunner/runner_test.go @@ -0,0 +1,106 @@ +package storeeventrunner + +import ( + "context" + "fmt" + "testing" + + "queryorchestration/internal/database/repository" + "queryorchestration/internal/document" + documentstore "queryorchestration/internal/document/store" + "queryorchestration/internal/server/runner" + "queryorchestration/internal/serviceconfig/queue/documentinit" + "queryorchestration/internal/serviceconfig/queue/documenttextprocess" + queuemock "queryorchestration/mocks/queue" + + "github.com/aws/aws-sdk-go-v2/service/sqs" + "github.com/go-playground/validator/v10" + "github.com/google/uuid" + "github.com/pashagolub/pgxmock/v3" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +type DocInitConfig struct { + runner.BaseConfig[S3EventNotification] + documentinit.DocInitConfig + documenttextprocess.DocTextProcessConfig +} + +func TestDocInitRunner(t *testing.T) { + ctx := context.Background() + + pool, err := pgxmock.NewPool() + require.NoError(t, err) + + cfg := &DocInitConfig{} + cfg.DBPool = pool + cfg.DBQueries = repository.New(pool) + mockSQS := queuemock.NewMockSQSClient(t) + cfg.QueueClient = mockSQS + cfg.DocInitURL = "hi" + cfg.DocumentTextProcessURL = "hi" + + runner := New(validator.New(), &Services{ + documentstore.New(cfg), + }) + assert.NotNil(t, runner) + + t.Run("valid", func(t *testing.T) { + clientId := "hi" + bucketName := "bucketName" + location := fmt.Sprintf("%s/import/aaa", clientId) + docinfo := document.DocumentSummary{ + ID: uuid.New(), + ClientID: clientId, + Hash: "example_hash", + } + doc := S3EventNotification{ + Records: []S3EventRecord{ + { + EventName: EventS3ObjectCreatedPut, + S3: S3EventRecordDetails{ + Bucket: S3Bucket{ + Name: bucketName, + }, + Object: S3Object{ + Key: location, + ETag: docinfo.Hash, + }, + }, + }, + }, + } + + pool.ExpectQuery("name: GetDocumentIDByHash :one").WithArgs(docinfo.Hash, clientId).WillReturnRows( + pgxmock.NewRows([]string{"id"}), + ) + pool.ExpectBegin() + pool.ExpectQuery("name: CreateDocument :one").WithArgs(clientId, docinfo.Hash). + WillReturnRows( + pgxmock.NewRows([]string{"id"}). + AddRow(docinfo.ID), + ) + pool.ExpectExec("name: AddDocumentEntry :exec").WithArgs(docinfo.ID, bucketName, location). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() + pool.ExpectQuery("name: GetDocumentSummary :one").WithArgs(docinfo.ID). + WillReturnRows( + pgxmock.NewRows([]string{"id", "clientId", "hash"}). + AddRow(docinfo.ID, docinfo.ClientID, "example"), + ) + + mockSQS.EXPECT(). + SendMessage( + mock.Anything, + mock.MatchedBy(func(in *sqs.SendMessageInput) bool { + return *in.QueueUrl == cfg.DocInitURL + }), + mock.Anything, + ). + Return(&sqs.SendMessageOutput{}, nil) + + assert.True(t, runner.Process(ctx, doc)) + }) +} diff --git a/assets/sampleGeneration/generated/helloWorld.gen b/assets/sampleGeneration/generated/helloWorld.gen new file mode 100644 index 00000000..fa29018b --- /dev/null +++ b/assets/sampleGeneration/generated/helloWorld.gen @@ -0,0 +1,192 @@ +{ + "Blocks": [ + { + "BlockType": "PAGE", + "ColumnIndex": null, + "ColumnSpan": null, + "Confidence": null, + "EntityTypes": null, + "Geometry": { + "BoundingBox": { + "Height": 1, + "Left": 0, + "Top": 0, + "Width": 1 + }, + "Polygon": [ + { + "X": 0.0000010227642, + "Y": 0 + }, + { + "X": 1, + "Y": 0.0001285361 + }, + { + "X": 1, + "Y": 1 + }, + { + "X": 0, + "Y": 1 + } + ] + }, + "Id": "cf623e5d-d3f1-4aa8-9255-970b0a178924", + "Page": null, + "Query": null, + "Relationships": [ + { + "Ids": [ + "44a179f8-88e8-4cdd-aebf-96be77e681e0" + ], + "Type": "CHILD" + } + ], + "RowIndex": null, + "RowSpan": null, + "SelectionStatus": "", + "Text": null, + "TextType": "" + }, + { + "BlockType": "LINE", + "ColumnIndex": null, + "ColumnSpan": null, + "Confidence": 99.89616, + "EntityTypes": null, + "Geometry": { + "BoundingBox": { + "Height": 0.024213256, + "Left": 0.16538842, + "Top": 0.092992365, + "Width": 0.20915127 + }, + "Polygon": [ + { + "X": 0.165407, + "Y": 0.092992365 + }, + { + "X": 0.3745397, + "Y": 0.09330509 + }, + { + "X": 0.37452286, + "Y": 0.11720562 + }, + { + "X": 0.16538842, + "Y": 0.11689187 + } + ] + }, + "Id": "44a179f8-88e8-4cdd-aebf-96be77e681e0", + "Page": null, + "Query": null, + "Relationships": [ + { + "Ids": [ + "b2eadea5-a686-48fe-9363-a774a0a146b4", + "b5939fe7-0f0d-4acf-8582-d45edc0669f8" + ], + "Type": "CHILD" + } + ], + "RowIndex": null, + "RowSpan": null, + "SelectionStatus": "", + "Text": "Hello World!", + "TextType": "" + }, + { + "BlockType": "WORD", + "ColumnIndex": null, + "ColumnSpan": null, + "Confidence": 99.915146, + "EntityTypes": null, + "Geometry": { + "BoundingBox": { + "Height": 0.023926819, + "Left": 0.16538842, + "Top": 0.093094304, + "Width": 0.086175606 + }, + "Polygon": [ + { + "X": 0.16540693, + "Y": 0.093094304 + }, + { + "X": 0.25156403, + "Y": 0.09322314 + }, + { + "X": 0.25154623, + "Y": 0.11702112 + }, + { + "X": 0.16538842, + "Y": 0.11689187 + } + ] + }, + "Id": "b2eadea5-a686-48fe-9363-a774a0a146b4", + "Page": null, + "Query": null, + "Relationships": null, + "RowIndex": null, + "RowSpan": null, + "SelectionStatus": "", + "Text": "Hello", + "TextType": "PRINTED" + }, + { + "BlockType": "WORD", + "ColumnIndex": null, + "ColumnSpan": null, + "Confidence": 99.87717, + "EntityTypes": null, + "Geometry": { + "BoundingBox": { + "Height": 0.02385673, + "Left": 0.26209888, + "Top": 0.09313698, + "Width": 0.1124408 + }, + "Polygon": [ + { + "X": 0.2621165, + "Y": 0.09313698 + }, + { + "X": 0.3745397, + "Y": 0.09330509 + }, + { + "X": 0.374523, + "Y": 0.1169937 + }, + { + "X": 0.26209888, + "Y": 0.116825044 + } + ] + }, + "Id": "b5939fe7-0f0d-4acf-8582-d45edc0669f8", + "Page": null, + "Query": null, + "Relationships": null, + "RowIndex": null, + "RowSpan": null, + "SelectionStatus": "", + "Text": "World!", + "TextType": "PRINTED" + } + ], + "DetectDocumentTextModelVersion": "1.0", + "DocumentMetadata": { + "Pages": 1 + }, + "ResultMetadata": {} +} \ No newline at end of file diff --git a/assets/sampleGeneration/helloWorld.pdf b/assets/sampleGeneration/helloWorld.pdf new file mode 100644 index 00000000..7c8340aa --- /dev/null +++ b/assets/sampleGeneration/helloWorld.pdf @@ -0,0 +1,61 @@ +%PDF-1.4 +%���� +1 0 obj +<< + /Type /Catalog + /Pages 2 0 R + /Version /1.4 +>> +endobj +2 0 obj +<< + /Type /Pages + /Kids [3 0 R] + /Count 1 +>> +endobj +3 0 obj +<< + /Type /Page + /Parent 2 0 R + /MediaBox [0 0 612 792] + /Resources << + /Font << + /F1 << + /Type /Font + /Subtype /Type1 + /BaseFont /Helvetica + >> + >> + >> + /Contents 4 0 R +>> +endobj +4 0 obj +<< + /Length + 44 +>> +stream +BT +/F1 24 Tf +100 700 Td +(Hello World!) Tj +ET +endstream +endobj +xref +0 5 +0000000000 65535 f +0000000015 00000 n +0000000086 00000 n +0000000151 00000 n +0000000376 00000 n +trailer +<< + /Size 5 + /Root 1 0 R +>> +startxref +472 +%%EOF diff --git a/assets/sampleOne/chc_1.pdf b/assets/sampleOne/chc_1.pdf new file mode 100644 index 00000000..66adb9a6 Binary files /dev/null and b/assets/sampleOne/chc_1.pdf differ diff --git a/assets/sampleOne/chc_1.txt b/assets/sampleOne/chc_1.txt new file mode 100644 index 00000000..b5896df2 --- /dev/null +++ b/assets/sampleOne/chc_1.txt @@ -0,0 +1,2018 @@ +Document Index +Sample Company Name, Inc. 1ANCILLARY AGREEMENT 1 +WITNESSETH: 1 +SECTION 1 - DEFINITIONS 1 +SECTION 2 - OBLIGATIONS OF COMMUNITY 4 +SECTION 3 - OBLIGATIONS OF PROVIDER 5 +SECTION 4 - MAINTENANCE, RELEASE & ACCESS TO RECORDS 8 +SECTION 5 - COMPENSATION 9 +SECTION 6 - UTILIZATION MANAGEMENT AND QUALITY IMPROVEMENT PROGRAMS 12 +SECTION 7 - INSURANCE, INDEMNIFICATION & RELEASE 13 +SECTION 8 - DISPUTE RESOLUTION 14 +SECTION 9 - CONFIDENTIALITY 14 +SECTION 10 - TERM AND TERMINATION 15 +SECTION 11 - MISCELLANEOUS 17 +EXHIBIT A 21CONTRACTED PROVIDER DEMOGRAPHICS & LIST OF HEALTHCARE PROFESSIONALS 21 +EXHIBIT B-1 24 +COMPENSATION 24 +Compensation Notes: 24 +EXHIBIT B-2 25 +COMPENSATION 25 +Compensation Notes: 26 +EXHIBIT B-3 27 +COMPENSATION 27 +TEXAS MEDICAID COMPLIANCE ADDENDUM - PROVIDER 28 +SECTION 1 - DEFINITIONS 28 +SECTION 2 - OBLIGATIONS OF COMMUNITY 29 +SECTION 3 - OBLIGATIONS OF PROVIDER 29 +SECTION 4 - COMPENSATION 31 +SECTION 5 - DISPUTE RESOLUTION 34 +SECTION 6 - CONFIDENTIALITY 34 +SECTION 7 - FRAUD AND ABUSE 34 +SECTION 8 - INSURANCE 35 +SECTION 9 - LAWS, RULES AND REGULATIONS 35 +SECTION 10 - MEMBER COMMUNICATIONS 36 +SECTION 11 - PRIMARY CARE PHYSICIANS AND PRIMARY CARE PROVIDERS 36 +SECTION 12 - TERMINATION 36 +SECTION 13 - BEHAVIORAL HEALTH 37 +ADDITIONAL PROVISIONS SPECIFIC TO MEDICAID 37 + + + +Start of Page No. = 1 +Sample Company Name, Inc. +ANCILLARY AGREEMENT +This Agreement is entered into and effective as of the date shown on the signature page ("Effective +Date"), by and between Sample Company +Name, +Inc +a Texas non-profit 501(c)(4) corporation licensed by +the Texas Department of Insurance as a health maintenance organization in the State of Texas and its Affiliates +(collectively "Community") and ABC Center +("Contracted Provider"). +(Legal Name and DBA as It appoars on W-9) +WITNESSETH: +WHEREAS, Community has its certificate of authority to operate as a health maintenance organization +under Chapter 843 of the Texas Insurance Code, as amended; +WHEREAS, Contracted Provider is licensed or otherwise authorized to provide a health care service in +this State, and qualified to provide Covered Services; and +WHEREAS, Community wishes to enter into an agreement with Contracted Provider to provide or arrange +for the provision of Covered Services to Members, and Contracted Provider wishes to enter into an agreement with +Community to provide or arrange for the provision of Covered Services to Members. +NOW, THEREFORE, for and in consideration of the premises and the mutual covenants and agreements +herein contained, it is understood and agreed by and between the parties hereto as follows: +SECTION 1 - DEFINITIONS +Many words and terms are capitalized throughout this Agreement to indicate that they are defined as set forth in this +Section 1. +1.1 +Accreditation Organization. Any organization, including but not limited to, URAC. the National +Committee for Quality Assurance ("NCQA") or the Joint Commission, engaged in accrediting or certifying +Community or any Participating Provider. +1.2 Affiliate. A corporation, partnership or other legal entity (including without limitation any Payor) +directly or indirectly owned or controlled by, or which owns or controls, or which is under common ownership or +control with Community. +1,3 +Benefit Plan/Program. A certificate of coverage, summary plan description, or other document or +program under which Community or other Payor undertakes to provide, arrange for, pay for, or reimburse any part +of the cost of health care services for eligible Members. Community may also enter into administrative agreements +with other Payors, governmental, public or private employers, or other entities to provide administrative services +related to providing, arranging for, paying for or reimbursing for the cost of health care services, including self-funded +employer sponsored plans. Benefit Plan/Program will include self-funded employee benefit plans for which +Community provides administrative services. +1.4 +Billed Charges. The usual and customary fee charged by Provider that does not exceed the fee +Provider would ordinarily charge regardless of expected payment source. +1.5 +Capitation. A method of compensating a Provider for arranging for or providing a defined set of +covered health care services to certain enrollees for a specified period that is based on a predetermined payment +per enrollee for the specified period, without regard to the quantity of services actually provided. +1.6 +CMS. The federal agency, Center for Medicare and Medicaid Services, responsible for +administering the Medicare, Medicaid, and Children Health Insurance Programs. + +Start of Page No. = 2 +1.7 +Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas +and/or federal statutory and regulatory requirements for "clean claim." +1,8 +Community Protocols. The rules, procedures, policies, protocols, and other conditions to be followed +by Participating Physicians, Providers and Members with respect to providing Covered Services under a particular +Benefit Plan/Program, generally defined in Community's Provider Manual. +1.9 +Coinsurance. A component of Member Expense, generally reflected as a percentage, in an +amount identified in Member's Benefit Plan/Program, paid to a Provider or a Physician for Covered Services by +Member. +1.10 Copayment. A component of Member Expense, generally reflected as a flat or fixed dollar amount +either per Covered Service or per encounter, identified in Member's Benefit Plan/Program, and collected by +Provider or Physician at the time Member receives Covered Services. +1.11 Coordination of Benefits. The allocation of financial responsibility between two or more Payors of +health care services, each with a legal duty to pay for or provide Covered Services to a Member at the same time. +1.12 +Covered Services. The Medically Necessary health care services, products, or supplies for which a +Member is entitled to receive coverage from Community or other Payor, pursuant to the terms of the Member's +Benefit Plan/Program. +1.13 Deductible. A component of Member Expense, generally reflected as fixed dollar amount during +a specific benefit period, typically one year, identified in Member's Benefit Plan/Program; payable by a Member +prior to Community's or Payor's obligation to make payment for Covered Services. Deductibles may apply to a +Member or to a Member's eligible dependents. +1.14 +Emergency Behavioral-Health Condition. Any condition, without regard to the nature or cause of the +condition, which requires immediate intervention and/or medical attention without which an individual would present +an immediate danger to himself/herself or others or which renders the individual incapable of controlling. knowing +or understanding the consequences of his/her actions. +1.15 Emergency Services. The health care services provided in a hospital emergency facility, +freestanding emergency medical facility or comparable facility to screen for emergency medical conditions and/or to +evaluate and stabilize medical conditions, including but not limited to severe pain, that would lead a prudent +layperson possessing an average knowledge of medicine in health to believe that the person's condition, sickness, +or injury is of such a nature that failure to get immediate medical care could result in: (1) placing the patient's health +in serious jeopardy; (2) serious impairment to bodily functions; (3) serious dysfunction of any bodily organ or part; +(4) serious disfigurement; (5) in the case of a pregnant woman, serious jeopardy to the health of the fetus; or (6) an +Emergency Behavioral Health Condition. in no event will "Emergency Services" be interpreted under this Agreement +so as to conflict with emergency service or emergency screening obligations under federal or State law. +1.16 Encounter Data. A record that sets forth those Covered Services a Provider or Healthcare +Professional renders to Members in accordance with the Member's Benefit Plan/Program and Community +Protocols. +1.17 +Excluded Provider. A healthcare Provider that has been prohibited, debarred or excluded from +participation in a State or federal healthcare program by operation of law or an edict by a regulatory agency. +1.18 +Excluded Services. Those health care services and supplies that are determined not to be Medically +Necessary or that otherwise are not Covered Services under a Member's Benefit Plan/Program. +1,19 Healthcare Professional. The Physicians, healthcare professionals, practitioners, and/or Providers +licensed and/or authorized under the laws of the State, who are employed by or contracted with Contracted Provider +to provide Covered Services under the terms of this Agreement. +Page 2 of 38 + +Start of Page No. = 3 +1.20 Medically Necessary/Medical Necessity. Those Covered Services that Community determines +under the applicable Utilization Management Program to be: (i) appropriate and necessary for the symptoms, +diagnosis, or treatment of a medical condition; (ii) provided for the diagnosis or direct care and treatment of a medical +condition; (iii) within standards of good medical practice within the organized medical community of the treating +provider including Texas Medicaid policies and procedures (where applicable) and the Texas Resilience and +Recovery model of service delivery; (iv) not primarily for the custodial convenience of the Member or the treating +provider; (v) consistent with sound medical policy, the Utilization Management Program, the Quality Improvement +Program, and the requirements of the Benefit Plan/Program under which the Covered Services are rendered; and +(vi) an appropriate and cost-effective service or supply consistent with generally accepted medical standards of care. +For inpatient stays, this means that acute care as an inpatient is necessary due to the kind of services the Member +is receiving or the severity of the Member's condition, and that safe, cost-effective, and adequate care cannot be +received as an outpatient or in a less acute, alternative medical setting. +1.21 +Member. A person who is eligible for and enrolled in a covered Benefit Plan/Program. +1.22 +Member Expense. The out-of-pocket expense, or cost-sharing amounts, such as Copayments, +Coinsurance or deductibles, a Member must pay to a Physician or Provider for Covered Services, identified in +the Member's Benefit Plan/Program, +1.23 Participating Physician. A Physician with a direct or indirect contractual relationship with +Community to provide certain Covered Services to Members. +1.24 +Participating Provider. A Provider with a direct or indirect contractual relationship with Community +or another Payor to provide certain Covered Services. +1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal +government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health +maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating +Physicians or Participating Providers for Covered Services rendered to Members. +1,26 Physician. Physician is an individual licensed to practice medicine in this State; a professional +association organized under the Texas Professional Association Act (Article 1528f, Vernon's Texas Civil Statutes); +an approved nonprofit health corporation certified under Chapter 162, Occupations Code; a medical school or +medical and dental unit, as defined or described by Section 61.003, 61.501, or 74.601, Education Code, that +employs or contracts with physicians to teach or provide medical services or employs physicians and contracts with +physicians in a practice plan; or another person wholly owned by physicians that is qualified to provide or arrange +for the provision of primary care and/or specialty care professional services. +1,27 +Primary Care Physician (PCP). A Physician who (i) is contracted with Community; (ii) holds an +unrestricted license to practice allopathic or osteopathic medicine in the State of Texas; (iii) (a) is engaged primarily +in family practice, general practice, geriatrics, internal medicine, pediatrics, obstetrics/gynecology, (b) is a Specialty +Care Physician who at the request of a Member with a chronic, disabling or life-threatening illness and, upon the +approval of Community, has agreed to accept the coordination of all of the Member's health care needs, or (c) is an +Advanced Practice Nurse (APNs) or physician assistant who practices under the supervision of a Physician +specializing in family practice, internal medicine, pediatrics or obstetrics/gynecology who also qualifies as a PCP, +Federally Qualified Health Centers (FQHCs), Rural Health Clinics (RHCs) or similar community clinics; and (iv) +is responsible pursuant to the applicable Benefit Plan/Program for coordinating and managing the delivery of +Covered Services to Members selected or assigned to such PCP, +1,28 +Prior Authorization. The written or confirmed electronic determination by the Community, a Payor or +other permitted person or entity that health care services proposed to be provided by a Physician or Provider are +medically necessary and appropriate before such services are provided. +1.29 Provider. A person or entity, other than a Physician, who is licensed or otherwise authorized to +provide a health care service in this State, including, but not limited to: (i) a chiropractor, registered nurse, +pharmacist, optometrist, registered optician, or acupuncturist; or (ii) a pharmacy, hospital, or other institution or +Page 3 of 38 + +Start of Page No. = 4 +organization; a person who is wholly owned or controlled by a provider or by a group of providers who are +licensed or otherwise authorized to provide the same health care service; or a person who is wholly owned or +controlled by one or more hospitals and physicians, including a physician-hospital organization. +1.30 Provider Manual. The Community document, incorporated in its entirety by this reference, +containing administrative policies and procedures relating to issues such as credentialing, utilization +management, claims payment, provider complaints or appeals and quality improvement. +1.31 +Quality Improvement Program. The functions including, but not limited to, credentialing and +certification of providers, review and audit of medical and other records, clinical outcomes, peer review, and provider +appeals and grievance procedures performed or required by Community, or any other permitted person or entity, to +review the quality of Covered Services rendered to Members. +1,32 Referral. Consultation for evaluation and/or treatment of a Member, requested by one Physician or +Provider to another Physician or Provider, usually for a specified number of visits, treatments or period of time. +1.33 +Specialty Care Physician. A Physician who (i) is a Participating Physician: (ii) holds an unrestricted +license to practice allopathic or osteopathic medicine in the State of Texas; (iii) is engaged in a specialty medical +practice; (iv) accepts Referrals from Primary Care Physicians for the purpose of providing Covered Services to +Members in the Specialty Care Physician's designated specialty; and (v) is not a Specialty Care Physician who +meets the criteria of Section 1.27 above. +1.34 +State. The State of Texas. +1.35 TDI. The Texas Department of Insurance, +1.36 +Utilization Management Program. A system of prospective, concurrent or retrospective review of the +medical necessity and appropriateness of health care services and a system for prospective, concurrent, or +retrospective review to determine the experimental or investigational nature of health care services. The term does +not include a review in response to an elective request for clarification of coverage or information regarding Member +eligibility. +SECTION 2 - OBLIGATIONS OF COMMUNITY +2.1 +Marketing. Contracted Provider acknowledges that Community shall market or arrange for the +marketing of its Benefit Plans/Programs as well as Contracted Provider's and its Healthcare Professional's +participation in such Benefit Plans/Programs +2.2 +Timely Assignment of Members. Community shall require a Member to select a specified +Participating Primary Care Physician or Participating Primary Care Provider at the time of enrollment. In the event +a Member does not select a Participating Primary Care Physician or Participating Primary Care Provider within sixty +(60) days, Community shall automatically assign the Member. Upon automatic assignment of a Participating +Primary Care Physician or Participating Primary Care Provider, the Member may change to another Participating +Primary Care Physician or Participating Primary Care Provider. +2.3 +Member Volume. Contracted Provider understands that no guarantees are afforded by Community +as to the number of Members who enroll in Community's Benefit Plans/Programs. Community does not, by this +Agreement or otherwise, promise, warrant or guarantee that any minimum number of Members will select or be +assigned to Contracted Provider or Healthcare Professional. +2.4 +Identification Cards. For each Member, Community shall issue, or shall ensure the issuance, of a +Member identification card or similar item setting forth, at a minimum, the Member's name, the Member's unique +identification number, the first date on which the Member became enrolled or the toll-free number a Physician or +Provider can use to obtain the date, and the Member's Primary Care Physician or Primary Care Provider. +Page 4 of 38 + +Start of Page No. = 5 +2.5 +Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of +State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and +regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement. +SECTION 3 - OBLIGATIONS OF PROVIDER +3.1 +Changes in Contracted Provider Information. Contracted Provider shall provide Community thirty +(30) calendar days advanced written notice of any of the following changes, as applicable to Contracted Provider or +any Healthcare Professional rendering services under the terms of this Agreement: +a. +termination of any Healthcare Professional from Contracted Provider's office; +b. +the addition of any Healthcare Professional to Contracted Provider's office; +C. +the addition of another Covered Service after the Effective Date of this Agreement to be +provided to Members by Contracted Provider and; +d. +the discontinuation of delivery of any Covered Service currently offered as of the Effective +Date of this Agreement, which thereby results in Members having to receive such Covered +Services from another non-Participating Provider or Participating Provider; +e. +any change in address(es) or contact information where Contracted Provider renders +Covered Services, including the addition or closure of a location; +f. +any change in billing information, including but not limited to, a. change in Contracted +Provider's legal structure, payment remit address, or change in Tax Identification Number; +g. +any change in other demographic or information necessary to ensure access and availability +of Covered Services to Member by Contracted Provider or that may be required for +Community to meet Community's obligations defined in this Agreement. +Contracted Provider acknowledges that the addition of any Healthcare Professional shall be subject to +Community's credentialing policies and payment guidelines defined herein and in accordance with Section 5.14. +Contracted Provider further acknowledges that if any fines or sanctions are levied against Community by +applicable State or federal agencies or are imposed by Community resulting from non-compliance by Contracted +Provider of this Section 3.1, Community shall have the right to withhold from future payments to Contracted Provider: +(a) the entire amount of such fine or sanction if Contracted Provider is the sole cause of such a fine or sanction +levied or imposed; or (b) a pro rata share of such fine or sanction amount if Contracted Provider is not the sole cause +of the fine or sanction levied or imposed. +3.2 +Authority. Contracted Provider attests that it has the authority to bind all Healthcare Professionals +rendering Covered Services under the terms of this Agreement to the obligations defined herein. Further, +Contracted Provider represents that the terms of this Agreement do not conflict with the terms of its agreements with +Healthcare Professionals and that the terms of this Agreement shall control and apply in any situation where there +is an inconsistency or conflict with the terms such agreements or with respect to any matter that is not addressed in +any such agreements. Contracted Provider shall be responsible to Community for any such inconsistency or conflict +in terms. This provision shall supersede any similar provision in any agreement between Contracted Provider and +Healthcare Professionals, Upon request, Contracted Provider agrees to forward to Community: (i) a copy of any +template contracts Contracted Provider maintains with Healthcare Professionals, (ii) a copy of any written policy and +procedure pursuant to such agreements, (iii) Contracted Provider's bylaws and Articles of Incorporation, as well as, +(iv) any subsequent modifications thereto. Contracted Provider will notify Healthcare Professionals of their rights +and duties under this Agreement, and of all amendments, exhibits, and modifications thereto. Contracted Provider +is responsible for the compliance of its Healthcare Professionals of all the terms and conditions in this Agreement. +References to "Contracted Provider" also include Healthcare Professionals. +Page 5 of 38 + +Start of Page No. = 6 +3.3 +Contracted Provider Representations and Warranties. Contracted Provider represents and warrants +that Contracted Provider and Healthcare Professionals, now and for the duration of this Agreement shall remain: (i) +in compliance with all laws and licensing requirements applicable to serviced rendered, (ii) accredited by The Joint +Commission, or similar state or nationally recognized Accreditation Organization (where applicable), and (iii) a +Medicare certified provider under the Federal Medicare Program and a Medicaid provider under applicable State +and federal law. Contracted Provider warrants that all employees of Contracted Provider and Healthcare +Professionals will perform their duties in accordance with all applicable local, State, and federal licensing +requirements, as well as applicable national, State, and county, and local standards of professional ethics and +practices. Evidence of satisfaction of the requirements set forth in this Section 3,3 shall be submitted to Community +upon request. +3.4 +Services Rendered by Excluded Providers. Contracted Provider warrants that neither Contracted +Provider nor any Healthcare Professional is, or has ever been, an Excluded Provider. Contracted Provider agrees +to assure that Contracted Provider and its Healthcare Professionals shall refrain from the provision of any +Covered Services to a Member if said Contracted Provider or Healthcare Professional becomes an Excluded +Provider. Notwithstanding any provision to the contrary, Contracted Provider understands and agrees that +Contracted Provider and/or its Healthcare Professionals shall not bill and Payor shall not pay for any services or +goods furnished under this Agreement by an Excluded Provider. +3.5 +Eligibility. Except where Emergency Services, including screening for emergency medical +conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the +rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of +any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively +change, which may change Community's responsibility for payment. If Community makes payment to Contracted +Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such +payment in accordance with Section 5,5 of this Agreement. +3,6 +Provision of Services. Contracted Provider, for itself and on behalf of its Healthcare Professionals, +agrees to render Covered Services to Members in accordance with: (i) the terms and conditions of this Agreement +and the applicable Benefit Plan/Program; (ii) all laws, rules, and regulations applicable to Contracted Provider and +its Healthcare Professionals; (iii) the Utilization Management Program, Quality Improvement Program, Community +Protocols, and grievance, appeals, and other policies and procedures of the particular Benefit Plan/Program under +which the Covered Services are rendered; (iv) at least the minimum clinical quality of care and performance +standards that are professionally recognized and/or adopted, accepted, or established by Community; (v) the +customary rules of ethics and conduct of applicable State and professional licensure boards and agencies; and (vi) +the prevailing standards of care of similar providers in the same community. +3.7 +Non-Discrimination. Except as necessitated by Member's medical condition, Contracted Provider +agrees not to differentiate or discriminate in the treatment of Members. Provider further agrees to provide +Covered Services to Members in accordance with the same standards and within the same time availability as +provided to Contracted Provider's other patients. Contracted Provider agrees not to discriminate against +Members on the basis of race, color, national origin, gender, sexual orientation, age, religion, marital status, +health status or health insurance coverage. Contracted Provider and/or Healthcare Professional shall treat +Members promptly, fairly, and courteously. +3.8 +Ancillary Services. Contracted Provider agrees: (i) to provide to Members Covered Services within +the +scope of its licensure, expertise, and usual and customary range of facilities and/or personnel, and (ii) as +applicable, to provide Members with access 24 hour-per-day, 7 days-per-week. +3,9 +Subcontracting. Contracted Provider shall not subcontract for the performance of Covered Services +under this Agreement without the prior written consent of Community. +3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or +applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior +Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted +Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's +Page 6 of 38 + +Start of Page No. = 7 +compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees +to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the +provision of Covered Services or the ordering of the other Covered Services, or on the next business day. +3.11 +Referrals to Non-Participating Providers. Referral to a non-Participating Physician or non- +Participating Provider requires Prior Authorization. +3.12 Certification and Regulatory Compliances. Contracted Provider and its Healthcare Professionals +shall, at all times during the term of this Agreement, satisfy all State and federal certifications, regulations, or +licensure requirements and shall render Covered Services under this Agreement in compliance with all applicable +statutes, regulations, standards, rules, and directives of State, federal, and other governmental and regulatory +bodies having jurisdiction over Contracted Provider. Evidence of such licensing, if applicable, shall be submitted +to +Community upon request. Contracted Provider agrees to give immediate notice to Community in the case of a +disciplinary action, modification, limitation, suspension or revocation, or initiation of any proceeding that could result +in a disciplinary action, modification, limitation, suspension or revocation. of such licensure. +3,13 Non-Participating Provider. Contracted Provider agrees to notify Community within twenty-four (24) +hours if Contracted Provider has knowledge that a non-Participating Provider is rendering Covered Services to a +Member in a situation involving Emergency Services. +3.14 +New or Additional Benefit Plans/Programs. Contracted Provider acknowledges that Community may +administer and/or offer new or additional Benefit Plans/Programs, and Contracted Provider, if requested by +Community, agrees to negotiate with Community in good faith to amend this Agreement to include such new or +additional Benefit Plans/Programs, +3,15 +Payment of Applicable Taxes. Subject to the provisions of Section 5,10 ("No Surcharges") hereof, +Contracted Provider shall be solely responsible for the payment of any sales, use, or other applicable taxes on the +sale or delivery of medical services. +3.16 +Adherence to Community Protocols. Contracted Provider shall comply with all Community Protocols +without limitation, notification and Prior Authorizations as may be required for (i) medical services, hospital +admissions, and elective outpatient diagnostic or procedural Covered Services; (ii) concurrent and retrospective +review; and (iii) Referral procedures; provided, however, in no event shall such policies and procedures be less than +the standard of care for the provision of medical services to patients in the geographic area where medical services +are being provided by Contracted Provider hereunder. Nothing in this Section 3.16, however, shall be construed to +authorize Community or any of Community's officers or employees to exercise any control over the practice of +medicine by Contracted Provider or the manner in which Contracted Providers provide medical services. Contracted +Provider acknowledges that Community may consider the failure of Contracted Provider or Healthcare Professional +to abide by Benefit Plan/Program, Community Protocols, and/or Utilization Management Program a material breach +of Agreement subject to termination as defined in Section 10.3. +3.17 +Electronic +Connectivity. +Contracted Provider agrees to communicate with Community +electronically according to standard HIPAA transactions, including, but not limited to, verification of eligibility, +claims status check, electronic claims submission, electronic payment remittance advice, and electronic funds +transfer. In the event of a system(s) failure or a catastrophic event that substantially interferes with the Contracted +Provider's business operations, Contracted Provider may submit paper claims to Community at the address in +the signature block below with "Attention to Technical Support Manager" for the days during which a substantial +interference with business operations occurs as a result of the catastrophic event or systems failure. Contracted +Provider shall provide written notice of Contracted Provider's intent to submit non-electronic claims to Community +within five (5) calendar days of the catastrophic event or systems failure. Contracted Provider may request that +Community waive this requirement to communicate electronically under circumstances in which: no method is +available for the submission of claims in electronic form; there would be undue hardship, including fiscal or +operational hardship; or any other special circumstance that would justify a waiver. Community in its sole +discretion will determine whether to agree to waive the requirement. +Page 7 of 38 + +Start of Page No. = 8 +3.18 +Credentialing of Contracted Provider and/or Healthcare Professional, Contracted Provider shall +submit to Community a credentials application, as modified from time to time by Community, TDI or other regulatory +entity (as applicable), the current form of which will be provided by Community upon request. Contracted Provider +shall be responsible for completing the credentials application in its entirety for Contracted Provider and every +Healthcare Professional rendering Covered Services to Members. In no event will this Agreement become effective, +non will Contracted Provider or Healthcare Professional render Covered Services to a Member until Contracted +Provider's or Healthcare Professionals' credential applications have been accepted and approved in writing by +Community; provided, however, this Agreement may be executed prior to acceptance by Community of all +Healthcare Professionals' credential applications. +3,19 Access to Premises. Contracted Provider agrees to permit Community and any Payor, or their +designated representatives, and the designated representatives of State and federal regulatory agencies having +jurisdiction over Community, Payor, or any Benefit Plan/Program, to conduct site evaluations and inspections of +Contracted Provider's offices and service locations as necessary under applicable laws, rules, or regulations or as +may be needed to assure quality of care rendered to Members. In the event the right of access is requested under +this Section 3.19, Contracted Provider shall, upon request, provide and make available its staff to assist in the audit +or inspection effort, and provide adequate space on the premises to reasonably accommodate the State or federal +personnel conducting the audit or inspection effort. All inspections or audits shall be conducted in a manner that will +not unduly interfere with the performance of Contracted Provider's and its Healthcare Professionals" activities. All +information obtained during such audit or inspection shall be accorded confidential treatment as provided under +applicable law. +3.20 Complaint Resolution Notice. Contracted Provider shall post a notice, in Contracted Provider's office +or other location reasonably certain to be seen by all Members, of the process for resolving complaints with +Community, including the Texas Department of Insurance's toll-free telephone number for filing complaints. +3.21 +Laboratory Compliance. If Contracted Provider performs clinical laboratory services, Contracted +Provider shall comply with all requirements of the Clinical Laboratory Improvement Act ("CLIA"), and implementing +regulations. Contracted Provider agrees to furnish written verification to Community that Contracted Provider's +laboratory(ies), if any, and those with which it conducts business related to Members have a CLIA certificate of +registration or a waiver, and CLIA identification number. Contracted Provider shall furnish, annually to Community, +a written list of diagnostic tests performed in its laboratory(ies), if any, and those with which it conducts business +related to Members. Contracted Provider shall notify Community of changes in the CLIA status of its laboratory(ies), +and those with which it conducts business related to Members, in writing within five (5) days of such changes. +3.22 Encounter Data Submission. If Contracted Provider's compensation is based on Capitation, +Contracted Provider must submit to Community, no later than the fifteenth (15th) day of each month, a record of +all Covered Services rendered during the prior month to each Member for which Contracted Provider receives +Capitation under this Agreement. Additionally, Contracted Provider shall promptly provide Community with all +corrections to and revisions of such Encounter Data. Contracted Provider shall submit such Encounter Data based +on Community's established requirements for Encounter Data submission. +3,23 Provider Manual. Contracted Provider shall comply with all policies and procedures identified in the +Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. +Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of +changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the +Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10. +SECTION 4 - MAINTENANCE, RELEASE & ACCESS TO RECORDS +4.1 +Administrative Records. Contracted Provider shall retain for a minimum of ten (10) years, or as +otherwise maybe required by law whichever is shorter, such financial, administrative, and other records as may be +necessary for compliance by Community and with other applicable local, State, and federal laws, rules, and +regulations. Contracted Provider shall make such records or documents available to Community, Payors and their +authorized agents, and appropriate representatives of any State and/or Federal regulatory agency during normal +business hours for review, inspection, and/or audit. +Page 8 of 38 + +Start of Page No. = 9 +4.2 +Medical Records. Contracted Provider shall maintain a complete medical record for each Member +for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical +records shall include the recording of a Contracted Provider's services and such other records as may be required +by law. Such records shall be maintained in accordance with all applicable present and future local, State, and +federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All +medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations +regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period +of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law. +4.3 +Member Consent to Release of Medical Record Information. Contracted Provider will obtain +Member consent required in order to authorize Contracted Provider to provide access to the requested +information or records as contemplated in this Section 4 of this Agreement, including copies of the Contracted +Provider's medical records relating to the care provided to Member. +4.4 +Access to Records, The records referred to in Section 4.2 above shall be and remain the property +of Contracted Provider and shall not be removed or transferred from Contracted Provider except in accordance with +applicable local, State or federal laws, rules, and regulations. Subject to applicable State or federal confidentiality +laws and pursuant to written authorization by Members, Community or its designated representative and any Payor +shall have access to Contracted Provider's office during normal business hours on request, to inspect, review, and +make copies of such records, Contracted Provider shall provide, at Contracted Provider's expense, copies of such +records to authorized representatives of local, State, or federal regulatory agencies. In no event, shall Contracted +Provider charge for records requested for payment of a claim. Notwithstanding the foregoing, but subject to +applicable local, State, or federal laws, rules, or regulations, in the event of (i) termination of this Agreement; (ii) the +selection by a Member of another Participating Provider in accordance with Benefit Plan/Program procedures; or +(iii) the approval by Community Protocols of Contacted Provider's request to transfer a Member to another +Participating Provider, Contracted Provider agrees to transfer copies of the Member's medical records, x-rays, +and/or other data to the Participating Provider when requested to do so by Community or Member, or at no charge +to the Member or Community or transferee Participating Provider. +4.5 +Continuing Obligation. The obligations of Contracted Provider under this Section 4 shall not be +terminated upon termination or rescission of this Agreement. After termination of this Agreement, Community and +the applicable Payor shall continue to have access to Contracted Provider's records as necessary to fulfill the +requirements of this Agreement and to comply with all applicable present and future laws, rules, and regulations. +SECTION 5 - COMPENSATION +If applicable, attached regulatory Addendum(s) may supersede certain requirements of this Section, 5- +Compensation. +5.1 +Claims Submission. In circumstances in which Contracted Provider is not paid Capitation, +Contracted Provider shall submit Clean Claims to Payor within ninety-five (95) calendar days of the provision of the +Covered Services. Failure to submit a Clean Claim within this 95-day period may result in non-payment. When +submitting Claims and/or Encounter Data to Payor, Contracted Provider shall: (i) use the most current coding +methodologies on all forms; (ii) abide by all applicable coding rules and associated guidelines, including without +limitation inclusive code sets; and (iii) in the event a code is formally retired or replaced, regardless of any +provision or term in this Agreement, discontinue use of such code and begin use of the new or replacement code +following the effective date published by the appropriate coding entity or government agency. Should Contracted +Provider submit claims using retired or replaced codes, Contracted Provider understands and agrees that Payor +may deny such claims until appropriately coded and resubmitted. +5.2 +Adjudication of Claims. In circumstances in which Contracted Provider is not paid Capitation, Payor +shall adjudicate all Clean Claims submitted by Contracted Provider within forty-five (45) calendar days for claims +received by Contracted Provider vía non-electronic submission, and within thirty (30) calendar days for claims +received by Contracted Provider via electronic submission. When adjudicating Contracted Provider's claim(s), +Payor shall: (i) pay the total amount of the claim in accordance with Exhibit B; (II) notify Contracted Provider in +writing why the claim will not be paid; or (iii) pay the portion of the claim that is not in dispute and notify Contracted +Page 9 of 38 + +Start of Page No. = 10 +Provider in writing why the remaining portion of the claim was not paid. When medical information is requested to +support payment, Contracted Provider shall have twenty-one (21) calendar days to provide information to Payor. +Not later than fifteen (15) days following receipt of Contracted Provider's response to Payor's request for additional +information, Payor shall make a final adjudication decision. Payor will adjudicate all Clean Claims received in +according with the terms and conditions of this Agreement, Texas Insurance Code Section 843 and, TDI rules +promulgated thereto, governing claim payment for Covered Services provided under a health maintenance +organization's benefit plan, and/or federal laws, rules, and regulations and federal laws, rules and regulations +related to ERISA claims payment for self-funded plans or for Medicare Advantage plans, regarding timeliness of +claims payments. +5.3 +Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other +nationally recognized claims and payment processing policies, procedures, and guidelines, which may include +claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon +request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's +coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules +applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding +guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. +Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling +and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's +coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice +of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are +required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably +possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules. On or before +the thirtieth (30th) day after the date after receipt of requested information and/or notice of future changes, +Contracted Provider may terminate this Agreement by providing written notice to Payor without penalty or +discrimination in participation in other health care products or plans. Contracted Provider shall use or disclose +any information received by Payor solely for the purpose of practice management, billing activities. and other +business operations and shall disclose such information only to a governmental agency involved in the regulation +of health care or insurance. +5.4 +Claims/Payment Disputes. Should Contracted Provider request reconsideration of or dispute +payment or payments made by Payor under this Agreement, Contracted Provider must notify Payor in writing of +the dispute within one hundred and eighty (180) calendar days of the date of the original claim adjudication. +Contracted Provider acknowledges that Payor may consider Contracted Provider's failure to submit such +disputes within the above referenced time period as Contracted Provider's waiver of any such dispute and +Payor's original adjudication may be considered final without further appeal options. +5.5 +Correction of Claim Overpayments. In the event Payor determines that a claim was overpaid, Payor +may seek correction of the payment within one hundred and eighty (180) calendar days from the overpayment. +Contracted Provider may appeal the refund request within forty-five (45) calendar days of receipt of refund request. +If after appeal, the overpayment determination is maintained, Contracted Provider will repay Payor the overpayment +amount within ten (10) calendar days of notice of the outcome of the appeal. If Contracted Provider fails to refund +overpayments, Contracted Provider agrees that Payor may recover overpayments through offsets against future +payments. Contracted Provider will report promptly any credit balance that it maintains with regard to any claim +overpayment under this Agreement, and will return such overpayment to Payor within forty-five (45) calendar days +after posting it as a credit balance. Contracted Provider must refund an overpayment from an enrollee in the amount +of the overpayment to the enrollee not later than the 30th day after the date the Contracted Provider determines that +an overpayment has been made. +5.6 +Payor Solely Responsible for Payment. Unless otherwise provided by the Member's Benefit +Plan/Program, Contracted Provider shall collect Member Expenses for Covered Services directly from Member, and +shall not waive, discount or rebate any such Member Expenses. Contracted Provider understands and agrees that, +except for any applicable Member Expense, Payor has the sole responsibility for payment of covered services +rendered by provider under this Agreement. In the event of the insolvency of Payor or cessation of operations by +Payor, Contracted Provider's sole recourse shall be against Payor through the bankruptcy or receivership estate of +Payor. +Page 10 of 38 + +Start of Page No. = 11 +5.7 +Benefit Plan/Program Participation and Compensation Rates. The parties agree that Exhibit B shall +outline: (1) the Benefit Plan(s)/Program(s) in which Provider participates; and (2) the applicable compensation to +Provider for each Benefit Plan/Program. Contracted Provider agrees to participation in such Benefit +Plan(s)/Program(s) and agrees to receive compensation for Covered Services for such Benefit Plan(s)/Program(s) +as described in the applicable Exhibit B. +For the term of this Agreement, Contracted Provider shall accept as payment in full for Covered Services +and all other services rendered to Members under this Agreement, less any applicable Member Expense, the +agreed compensation set forth in Exhibit B, attached hereto and incorporated by reference into this Agreement. +If Exhibit B outlines Contracted Provider's compensation based on Capitation for any programs in which +Contracted Provider and Healthcare Professionals participate, such Capitation shall exclude any Member +Expense. Payor shall begin payment of capitated amounts to Provider, computed from the date of enrollment, +not later than the sixtieth (60th) calendar day after the date the Member selects or is assigned a PCP. +5.8 +Schedule of Benefits and Determination of Covered Services. Upon request, Community will +provide or make available to Contracted Provider with a summary of Covered Services for each applicable Benefit +Plan/Program. Payor shall be solely responsible for the determination of the extent of Member's coverage. Any +action by Payor pursuant to a Member's Benefit Plan/Program, or Community or Community Protocols or Payor +protocols or Utilization Management Program in no way releases Contracted Provider or Healthcare +Professional(s) of the responsibility to provide appropriate care to Members. +5.9 +Member Hold Harmless. Contracted Provider agrees that in no event, including but not limited to, +non-payment by Payor, the insolvency of Payor, or breach of this Agreement, shall Contracted Provider bill, charge, +collect a deposit from, seek compensation, remuneration, or reimbursement from, or have any other recourse +against any Members or persons other than Payor acting on the Member's behalf for services provided under this +Agreement. This section shall not prohibit collection of Member Expense made in accordance with the terms of the +applicable Benefit Plan/Program. Contracted Provider further agrees that the terms of this section shall: (i) survive +termination of this Agreement regardless of the cause giving rise to termination and shall be construed to be for the +benefit of Members; and (ii) supersede any oral or written contrary agreement now existing or hereafter entered into +between Contracted Provider or a Healthcare Professional and Members or persons acting on their behalf. Any +modification, addition, or deletion of or to the provisions of this Section 5,9 shall be effective on a date no earlier +than fifteen (15) calendar days after the Texas Commissioner of Insurance has received written notice of such +proposed change. +5.10 +No Surcharges. Contracted Provider shall not charge Member any fees or surcharges for provision +of Covered Services rendered pursuant to this Agreement, with the exception of any applicable Member Expense. +In addition, Contracted Provider shall not collect a sales, use, or other applicable tax from Members for the sale or +delivery of medical services. If Community receives notice of any additional charge for the provision of Covered +Services, Provider shall fully cooperate with Community to investigate such allegations, and shall promptly refund +any payment deemed improper by Community to the party who made the payment. +5.11 +Member Payment of Excluded Services. Prior to the provision of any Excluded Service to a Member, +Contracted Provider or Healthcare Professional(s) shall obtain written confirmation with Member's signature +indicating that: (i) Member has been informed of the services to be provided; (ii) the services to be provided are not +covered under the Member's Benefit Plan/Program; (iii) Payor will not pay for or be liable for said services; (iv) +Member requests that Contracted Provider or Healthcare Professional(s) renders the Excluded Services; and (v) +Member will be financially liable for such services. +5.12 +Coordination of Benefits. Payment for Covered Services provided to each Member may be subject +to subrogation and/or coordination with other benefits paid or payable to or on behalf of the Member, and to Payor's +right of recovery in other third party liability situations. Contracted Provider and Healthcare Professionals shall retain +in Member's records updated information concerning other health benefit plan coverage and to provide the +information Payor. Contracted Provider and Healthcare Professionals who submit a claim for particular health care +services to more than one Payor shall provide written notice on the claim submitted to each Payor of the identity of +the each other Payor with which the same claim is being filed. Payor will coordinate payment for Covered Services +in accordance with the terms of the Member's Benefit Plan/Program and applicable State and federal laws, rules, +Page 11 of 38 + +Start of Page No. = 12 +and regulations. If a Member has coverage from more than one payment source, Payor will coordinate benefits with +such other payment source in accordance with the Member's Benefit Plan/Program. Contracted Provider agrees to +share information obtained or documentation required by Payor to facilitate Payor's coordinate of such other +benefits. If Contracted Provider has knowledge of an alternative primary Payor, Contracted Provider shall bill such +other Payor(s) with the primary liability based on such information prior to submitting claims for the same services +to Payor. If Payor is a secondary Payor and pays a portion of a claim that should have been paid by the primary +Payor, Payor may recover the overpayment only from the Payor that is primarily responsible for that amount. If the +portion of the claim overpaid by Payor was also paid by the primary Payor, Payor may recover the amount of the +overpayment from Contracted Provider or Healthcare Professional that received the payment. To the extent +permitted by law, if Payor is not Member's primary Payor, payment for Covered Services from Payor shall be no +more than the difference between the amount paid by the primary Payor(s) and the applicable rate under this +Agreement, less any applicable Member Expense. Payor may share information with another Payor to the extent +necessary to coordinate appropriate payment obligations on a specific claim. +5.13 Failure to Obtain Prior Authorization or Referral. For any Covered Services rendered to, prescribed, +or authorized for Members by Contracted Provider in a non-emergent situation for which Payor requires Prior +Authorization in advance of the delivery of service, which Prior Authorization was not obtained by Contracted +Provider in advance, Contracted Provider acknowledges that Payor will deny Provider's claim for said Covered +Services. Contracted Provider agrees that in no event will Member be financially responsibility for payments arising +for such services, except for applicable Member Expenses as may be required under a Benefit Plan/Program. +5.14 +Services Locations/New Services. This Agreement applies to Covered Services rendered at +Contracted Provider's service locations set forth in Exhibit A. In the event Contracted Provider begins providing +services at other locations, new types of facilities, or under other tax identification number(s), (either by operating +such locations itself, or by acquiring, merging, or affiliating with an existing provider that was not already under +contract as a participant in Community's network of providers), such additional tax identification number(s), new +types of facilities, or locations, will be subject to this Agreement only upon written agreement between the parties. +For the purposes of this paragraph, types of facilities shall include, but not be limited to; inpatient hospital, +hospital emergency room, outpatient hospital, physician office, ambulatory surgery centers, skilled nursing +facilities, durable medical equipment, home health, home infusion, dialysis, specialty pharmacy, etc. +In the event Contracted Provider acquires or is acquired by, merges with, or otherwise becomes affiliated +with another provider of Covered Services that is already under contract with Community, the compensation +defined herein shall remain in effect for each of the Contracted Provider's locations specified in Exhibit A, and +the compensation for the acquired provider shall be the lesser of: (1) the rates set forth in the acquired entity's +agreement with Community, or (2) the rates set forth in this Exhibit B of this Agreement. +Contracted Provider shall not transfer all or some of its assets to any entity during the term of this +Agreement, which the result that all or some of the Covered Services subject to this Agreement will be rendered +by the other entity rather than by Provider, without the express written agreement of Community. +SECTION 6 - UTILIZATION MANAGEMENT AND QUALITY IMPROVEMENT PROGRAMS +6.1 +Utilization Management Program. Contracted Provider shall participate in, cooperate with, and +comply with all decisions rendered in connection with Community's Utilization Management Program. Contracted +Provider shall (i) provide such records and other information as may be required or requested under such Utilization +Management Program; and (ii) comply with all confidentiality requirements regarding a Utilization Management +Program. +6,2 +Quality Improvement Program. Contracted Provider shall be solely responsible for the quality of +such Covered Services rendered to Members, The quality of Covered Services rendered to Members shall be +monitored under the Quality Improvement Program applicable to the particular Benefit Plan/Program. Contracted +Provider shall: (i) participate in, cooperate with, and comply with all decisions rendered by Community or the +applicable Payor in connection with a Quality Improvement Program; (ii) provide such medical records, and such +review data and other information as may be required or requested under a Quality Improvement Program; and (iii) +comply with all confidentiality requirements regarding a Quality Improvement Program. In the event that the +Page 12 of 38 + +Start of Page No. = 13 +standard or quality of care furnished by a Contracted Provider is found to be unacceptable under any Quality +Improvement Program, Community shall give written notice to Contracted Provider and/or Healthcare Professional +to correct the specified deficiencies within the time period specified in the notice, Such Contracted Provider shall +correct such deficiencies within that time period. Contracted Provider shall perform such quality management in +accordance with the performance standards and criteria of Community. +6,3 +Limitation. In no event, however, shall the requirements of such Utilization Management Program +or Quality Improvement Program be less than the standard of care for the provision of medical services to patients +in the geographic area where medical services are being provided by Contracted Providers under this Agreement. +Further, nothing in this Agreement shall be construed to authorize Community or any of Community's officers or +employees to exercise any control over the practice of medicine by Contracted Providers or the manner in which +Providers provide medical services. +SECTION 7 - INSURANCE, INDEMNIFICATION & RELEASE +7.1 +Professional and General Liability. Contracted Provider agrees to purchase and maintain during the +term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other +insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, +and employees against any claim or claims for damage arising by reason of personal injury or death occasioned +directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of +any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and +Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts +acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand +Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for +bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or +destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional +liability coverage shall include "tail" coverage of the same limits as stated above for any "claims-made" policy as +necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall +require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled +to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution +of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's +carrier(s) of the coverages required under this Section. +7.2 +Notice of Adverse Action. Contracted Provider shall notify Community in writing, within forty-eight +(48) hours or such lesser period of time as required by the applicable federal or State statute, of receiving any written +or oral notice of any adverse action, including without limitation, any malpractice suit or arbitration action, or other +suit or arbitration action naming or otherwise involving Contracted Provider, a Healthcare Professional, Community, +or any Payor, and of any other event, occurrence, or situation that might materially interfere with, modify, or alter +performance of any of Contracted Provider's duties or obligations under this Agreement. Contracted Provider also +shall notify Community promptly of any action against Contracted Provider or any Healthcare Professional's license +or certification under Title XVIII or Title XIX or other applicable statute of the Social Security Act or other State law, +and of any material change in the ownership or business operations. Failure to notify Community of any adverse +action shall be a material breach of this Agreement and may include termination under section 10. +7.3 +Indemnification by Contracted Provider and Subcontractors. Contracted Provider will at all times +hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, +and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses +(including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted +against Community and its representatives, officers, directors, employees, and agents, individually and collectively +arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this +Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated +for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community +or +insure for same. +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any +Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any +Page 13 of 38 + +Start of Page No. = 14 +and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's +fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, +directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted +Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and +equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals" contracts related +to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals +providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, +director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any +reason and whether due to Healthcare Professional's insolvency or otherwise. +7.4 +Release. Contracted Provider and Healthcare Professionals hereby release from liability +Community, and its affiliates, directors, committees, officers, employees, or agents, and agrees to waive all legal +claims that Contracted Provider or Healthcare Professionals may now or may hereafter have against such +individuals or entities related to any and all actions taken in good faith in connection with evaluating Contracted +Provider's or Healthcare Professional's professional qualifications. Contracted Provider hereby releases and shall +cause Contracted Provider's Healthcare Professionals to further release from liability any individual or entity who +may have information bearing on Contracted Provider's or Healthcare Professional's professional qualifications who +discloses in good faith such information in connection with evaluation by the above entities and individuals of +Contracted Provider's or Healthcare Professional's professional qualifications. Contracted Provider and Healthcare +Professionals further agree/s that any act, communication, report, recommendation or disclosure made in +connection with the evaluation of professional qualifications, shall be privileged and confidential and shall not be +subject to discovery, subpoena, or other means of legal compulsion for their release. +SECTION 8 - DISPUTE RESOLUTION +8,1 +Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or +dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall +unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving +such controversy or dispute, the dissatisfied party shall submit a written complaint (the "Complaint") to the other +party (the "Responding Party"), which complaint shall set forth with specificity the basis of the complaint and the +proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days +of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed +resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute +within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy +or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and +the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal +action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil +Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the +Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall +preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in +this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code. +SECTION 9 - CONFIDENTIALITY +9,1 +Member-Related Information. Community, Contracted Provider and/or Healthcare Professionals +understand and agree that all information and records related to Members are privileged and confidential. Any +Member-related information, records, or reports that may be disclosed to Community pursuant to the express terms +of this Agreement shall not be disclosed nor divulged by Community in whole or in part to any other third person, +other than as allowed by applicable law or as expressly provided for in this Agreement, without the prior written +consent of the Member; if required, except that information required for the Utilization Management Program, the +Quality Improvement Program, and claims adjudication will be released to Community or other appropriate Payor +or designee without Member consent as a healthcare operation. +9.2 +Business Activities. Contracted Provider agrees to maintain the confidentiality of all information +related to fees, charges, expenses and utilization derived from or through, or provided by Community and/or a Payor. +Except as required by law and for the purposes of carrying out this Agreement, Community and Contracted Provider +Page 14 of 38 + +Start of Page No. = 15 +agree to keep confidential any information regarding the other's business activities that is not otherwise available to +the general public, unless prior written consent for disclosure is obtained from the other party. +9,3 +Proprietary Information. All information and materials provided by Community to Contracted Provider +shall remain proprietary to Community including, but not limited to, contracts, fee schedules, reimbursement rates +and methodology, handbooks, and any other operations manuals. Contracted Provider shall not disclose any of +such information or materials or use them except as may be required to perform Contracted Provider's obligations +hereunder. +9,4 +Survival of Obligations. The obligations of the parties under this Section 9 shall survive termination +of this Agreement, +9.5 +HIPAA Provisions. Contracted Provider and Community are Covered Entities. Therefore, +Contracted Community and Provider agree to comply with the requirements of the Health Insurance Portability +and Accountability Act of 1996, Pub. L. No. 104-191 (codified at 45 C.F.R. Parts 160 and 164), as amended +("HIPAA"); privacy and security regulations promulgated by the United States Department of Health and Human +Services ("DHHS"); Title XIII, Subtitle D of the American Recovery and Reinvestment Act of 2009, Pub. L. No. +111-5, as amended ("HITECH Act"); provisions regarding Confidentiality of Alcohol and Drug Abuse Patient +Records (codified at 42 C.F.R. Part 2), as amended; and TEX, HEALTH & SAFETY CODE ANN. §§ 81.046, as +amended, 181.001 et seq., as amended, 241.151 et seq., as amended, and 611.001 et seq., as amended +(collectively referred to herein as the "Privacy and Security Requirements"). +SECTION 10 - TERM AND TERMINATION +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Page 15 of 38 + +Start of Page No. = 16 +Professionals breach of Section 5,9 ("Member Hold Harmless"); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith. +10.5 Pre-Termination Review. Upon request of Contracted Provider, prior to terminating this Agreement, +Community shall provide a written explanation to Contracted Provider of the reason or reasons for termination. On +request and before the effective date of the termination, but within a period not to exceed sixty (60) calendar days, +Contracted Provider shall be entitled to a review of Community's proposed termination by an advisory review panel +appointed by Community, except in a case in which there is imminent harm to patient health, as determined solely +by Community, or an action by a state medical or dental board, other medical or dental licensing board, or other +licensing board or other government agency, that effectively impairs Contracted Provider's ability to practice +medicine, dentistry, or another profession, or in a case of fraud or malfeasance, as determined solely by Community. +The advisory review panel shall be composed of physicians and providers, including at least one representative in +Contracted Provider's specialty or a similar specialty, if available, appointed to serve on the standing Quality +Improvement Committee or Utilization Review Committee of Community. The décision of the advisory review panel +must be considered but is not binding on Community. Community shall provide to Contracted Provider, on request, +a copy of the recommendation of the advisory review panel and Community's determination. Contracted Provider +shall be entitled, on request, to an expedited review process by Community. Contracted Provider shall have no +cause of action against any member of the advisory review panel or against any person who supplies information +to the advisory review panel. +10.6 Continuation of Care. Community shall give reasonable advance notice of the impending termination +of Contracted Provider or a Healthcare Professionals to each Member receiving treatment from such Provider. +Except for any Immediate Termination as defined above, nothing herein shall be construed to release Community +from the obligation to reimburse Contracted Provider for the Covered Services of a Contracted Provider or a +Healthcare Professional who is rendering ongoing Medically Necessary treatment in accordance with the dictates +of medical prudence to a Member of special circumstance at no less than the compensation rate provided for under +this Agreement in exchange for the ongoing treatment of the Member. Special circumstance means a condition +such that the treating Contracted Provider or the Healthcare Professional reasonably believes that discontinuing +care by the treating Contracted Provider or Healthcare Professional could cause harm to the patient, such as a +person who has a disability, acute condition, life threatening illness, or is past the twenty-fourth (24th) week of +pregnancy. Special circumstance) shall be identified by the treating Contracted Provider or the Healthcare +Professional who must make a written request to Community asking that the Member be permitted to continue +treatment under the treating Contracted Provider's or the Healthcare Professional's care and Contracted Provider +and Healthcare Professional must agree not to seek payment from the Member of any amounts for which the +Member would not be responsible if the Contracted Provider was still on the Community network. In the event +Contracted Provider or a Healthcare Professional is deselected for a reason other than by a request from the Facility +or a Healthcare Professional, Community may not notify Members until the effective date of the deselection or +Community's advisory review panel makes a formal recommendation. +Any dispute between Community and Contracted Provider or a Healthcare Professional with respect to +coverage for continued care to Members with special circumstance shall be resolved in accordance with the +procedures set forth in the Community Provider Manual or this Agreement, as it may be amended from time to time. +This Section 10.6 does not extend the obligation of Community to reimburse Contracted Provider for ongoing +treatment of a Member beyond ninety (90) days from the effective date of termination or beyond nine (9) months in +the case of a Member who at the time of termination has been diagnosed with a terminal illness. However, the +obligation of Community to reimburse the terminated Contracted Provider for services rendered to a Member who +at the time of termination is past the twenty-fourth (24th) week of pregnancy, extends through delivery of the child, +immediate postpartum care, and the follow up checkup within the first six (6) weeks of delivery. +10,7 Post-Termination Continuation of Care. Upon termination of this Agreement for any reason, +Contracted Provider, upon Community's written request and at Community's sole discretion, shall continue to +provide or arrange for the provision of Covered Services to enrolled Members for a period not to exceed ninety (90) +Page 16 of 38 + +Start of Page No. = 17 +calendar days following receipt of written notice of termination. Such extension of obligation shall not require +Contracted Provider to arrange for the provision of care for Members not enrolled as of the date of termination or +cases where the Member has not begun active treatment with Provider. Except as may be required by the obligation +of Contracted Provider to continue care in the event of special circumstances herein, Contracted Provider shall be +compensated by Community for all Covered Services provided to Members after the effective date of termination of +this Agreement as follows: if Capitation is being paid to Contracted Provider as of the date of termination, Contracted +Provider shall be financially responsible for Covered Services until the conclusion of the course of treatment; +otherwise Contracted Provider will be compensated until conclusion of the course of treatment; according to the +rates defined in this Agreement for all dates of service following the termination's effective date. Contracted Provider +agrees to cooperate with Community's efforts to arrange for the prompt, medically appropriate transfer of Members +to Participating Providers following termination notice of this Agreement. +10.8 Member Notification. Community shall provide notification of the termination of Contracted +Provider or its Healthcare Professional(s) to its Members receiving care from Contracted Provider or at least +thirty (30) days before the effective date of the termination. Community may notify Members at the time +Community terminates Contracted Provider or a Healthcare Professional if such termination is immediate as +allowed in this Agreement. Upon a final determination of a date that Agreement will terminate, Contracted Provider +shall notify any Member attempting to schedule Covered Services, or any Member already scheduled, beyond the +termination date, that Contracted Provider or the Healthcare Professional will no longer be a Participating Provider +as of the termination date, and will incur a greater Member Expense that Contracted Provider's non-participation +status with Community. Contracted Provider shall comply with Community's policy and procedures related to any +Immediate Termination of Agreement, to include immediate cessation of scheduling further Members, prompt +notification to all Members with scheduled appointments, as well as immediate notification to Community of any and +all Members in active treatment or with scheduled procedures as well as identification and prioritization of Members +whose health may be in jeopardy without immediate transfer to another or other Participating Providers. +10.9 Retaliation. Community shall not engage in any retaliatory action, including terminating or refusing +to renew this Agreement, against Contracted Provider because Contracted Provider has, on behalf of a Member, +reasonably filed a complaint against Community or appealed a decision of Community. +SECTION 11 - MISCELLANEOUS +11.1 Advance Directives. Contracted Provider acknowledges and agrees to comply with all federal and +State laws with respect to advance directives as defined in the Patient Self-Determination Act (P.L. 101-508), as +amended). An advance directive is, for example, a Directive to Physician (formerly known as a living will) or a +Medical Power of Attorney (formerly known as a durable power of attorney for health care) pursuant to TEX, +HEALTH & SAFETY CODE ANN. §§ 166.001 et seq., as amended, in which an individual makes decisions +concerning medical care, including the right to accept or refuse medical or surgical treatment. or a Declaration +for Mental Health Treatment pursuant to TEX. Civ. PRAC. & REM. CODE ANN. §§ 137.001 et seq., as amended, +11.2 +Independent Medical Judgment. Nothing contained in this Agreement shall be construed to require +a Contracted Provider to recommend or withhold any procedure or course of treatment that is not consistent with +such Provider's best medical judgment. Eligibility, Prior Authorization, case management, and Utilization +Management Program activities are performed for the purpose of clearly defining financial responsibility and +encouraging efficient use of resources and network services. A Contracted Provider is free to make independent +medical recommendations and Members are free to choose to accept or reject any treatment course. +11.3 +Communications with Patients. Community shall not impose any restrictions upon Contracted +Provider's free communications with Members about a Member's medical conditions, treatment options, Community +referral policies, and other Community policies, including financial incentives or arrangements. Further, Community +shall not, as a condition of this Agreement with Contracted Provider, or in any other manner, prohibit, attempt to +prohibit, or discourage Contracted Provider from, or in any way penalize, terminate, or refuse to compensate +Contracted Provider for Covered Services for: (i) discussing with or communicating to a current, prospective or +former patient, or a party designated by a patient, information or opinions regarding the patient's health care, +including, but not limited to, the patient's medical condition or treatment options; or (ii) discussing with or +communicating in good faith to a current, prospective or former patient, or a party designated by a patient, +Page 17 of 38 + +Start of Page No. = 18 +information or opinions regarding the provisions, terms, requirements or services of the Benefit Plan/Program as +they relate to the medical needs of the patient. +11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems. +11.5 +Entire Agreement. This Agreement, the Community Protocols, and the Exhibits constitute the sole +and only agreement of the parties with respect to the subject matter hereof and supersedes any and all prior +agreements or understandings, either oral or in writing, between the parties hereto with respect to the subject matter +hereof, and no other agreement, statement, or promise relating to the subject matter of this Agreement that is not +contained or incorporated by reference herein shall be valid or binding. Provided, however, the Covered Services +provided hereunder must be provided in accordance with the terms and conditions of the particular Benefit +Plan/Program. +11.6 Assignment. Neither this Agreement nor the duties or obligations hereunder shall be assignable by +either party without the prior written consent of the other party hereto, except as may expressly be permitted under +this Agreement. Community shall have the right in its sole discretion to assign this Agreement to any affiliated entity, +parent or subsidiary of Community. +11.7 Successors and Assigns. Subject to the provisions of Section 11.6 hereof ("Assignment"), this +Agreement shall be binding on the heirs, executors, administrators, legal representatives, successors, and assigns +of the respective parties hereto. +11.8 +Governing Law. The validity of any of the terms and provisions of this Agreement as well as the +rights and duties of the parties hereunder, shall be governed by the laws of the State of Texas, except to the extent +such laws conflict with or are preempted by any federal law, in which case such federal law shall govern. Federal +law shall also govern with respect to Benefit Plans/Programs of federal government Payors. +11.9 Venue, The sole venue for any dispute arising hereunder shall be in the court of appropriate +jurisdiction in Harris County, Texas, exclusively. +11.10 Amendment. This Agreement may be amended by the mutual agreement of the parties hereto in +writing or by Community upon written notice to Contracted Provider if necessary in order to comply with applicable +law or regulation. Mandatory modifications, additions or deletions required by any change in State or federal law or +regulation shall be effective immediately and shall not require mutual signature. +11.11 Severability. In case any one or more of the provisions contained in this Agreement shall for any +reason be held to be invalid, illegal, or unenforceable in any respect, such invalidity, illegality, or unenforceability +shall not affect any other provision hereof, and this Agreement shall be construed as if such invalid, illegal. or +unenforceable provision had never been contained herein. +11.12 Notices. Any notices to be given hereunder by either party to the other may be effected by personal +delivery in writing or by mail, registered or certified, postage prepaid, return receipt requested, to Community at its +principal place of business or to Contracted Provider at Contracted Provider's principal place of business according +to the address(es) provided on the signature page of this Agreement. Notices are deemed received when personally +delivered or three (3) business days after being placed in the mail. +11.13 Waiver. The waiver by either party of a breach or violation of any provision of this Agreement shall +not operate as or be construed to be a waiver of any subsequent breach hereof. The failure of either party to insist +upon the strict observation or performance of any provision of this Agreement or to exercise any right or remedy +Page 18 of 38 + +Start of Page No. = 19 +shall not impair or waive any such right or remedy. Every right and remedy given by this Agreement to the parties +may be exercised from time to time and as often as appropriate. +11.14 No Third-Party Member. Except as set forth in Section 5.9 hereof ("Member Hold Harmless"), or as +may be required by law, nothing in this Agreement is intended to, or shall be deemed or construed to, create any +rights or remedies in any third party, including a Member. Nothing contained herein shall operate (or be construed +to operate) in any manner whatsoever to increase the rights of any such Member or the duties or responsibilities of +Provider or Community with respect to such Members. +11.15 Regulations. Community is subject to the requirements of various local, State, and federal laws, +rules, and regulations. Any provision required to be in this Agreement by any of the above shall bind Provider and +Community whether or not provided herein and shall supercede requirements in this contract. +11.16 Status as Independent Entities. None of the provisions of this Agreement are intended to create or +shall be deemed or construed to create any relationship between Contracted Provider and Community other than +that of independent entities contracting with each other solely for the purpose of effecting the provisions of this +Agreement. Neither Contracted Provider nor Community, nor any of their respective agents, employees, or +representatives shall be construed to be the agent, employee, or representative of the other. +11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully +herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall +take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this +Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any +provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the +Provider Manual. +11.18 Headings. The headings contained in this Agreement are for the convenience of the parties only +and shall not be deemed to affect the meaning of the provisions hereof. +11.19 Authority. The provisions of this Agreement required to be approved by the governing board of +Community or Contracted Provider have been so approved and authorized. +11.20 Non-Assumption of Liabilities. Unless specifically provided by this Agreement, Contracted Provider +does not assume or become liable for any of the existing or future obligations, liabilities, or debts of Community, and +Community does not assume or become liable for any of the existing or future obligations, liabilities, or debts of +Contracted Provider. +11,21 Costs Associated with this Agreement. Except as otherwise provided herein, each party shall bear +the costs of its own legal, accounting, and other services necessary to comply with its duties and obligations under +this Agreement. +11.22 No Waiver of Rights. The failure of either party to insist upon the strict observation or performance +of any provision of this Agreement or to exercise any right or remedy shall not impair or waive any such right or +remedy. Every right and remedy given by this Agreement to the parties may be exercised from time to time and as +often as appropriate. +11.23 Impossibility of Performance. Neither Contracted Provider nor Community shall be deemed to be in +default of this Agreement if prevented from performing for reasons beyond its control including, without limitation. +governmental laws, rules and regulations, acts of God, war, and strikes. In such cases, the parties shall negotiate +in good faith with the goal and intent of preserving this Agreement and the respective rights and obligations of the +parties. +11.24 No Personal Liability. Nothing in this agreement is construed as creating any personal liability on +the part of any officer, director, employee, or agent or any public body that may be a party to this Agreement, and +the parties expressly agree that the execution of this Agreement does not create any personal liability on the part of +any officer, director, employee, or agent of Community. +Page 19 of 38 + +Start of Page No. = 20 +11.25 Use of Name. Neither Community nor Contracted Provider shall use each other's trademarks, name, +or symbols without the prior written consent of the other, provided, however, Contracted Provider agrees that +Community and Benefit Plans/Programs may use Provider's and each Healthcare Professional's name, office +address, telephone number, and specialty, and a factual description of the practice in directories and other +promotional materials. +IN WITNESS WHEREOF, the parties have and caused this Agreement to be effective on the later day and +year written below by execution on behalf of Sample Company Name, Inc +by a duly authorized representative +of Sample Company Name, Inc +and by execution on behalf of Contracted Provider and Healthcare Professional +by a duly authorized representative. +Sample Company Name, Inc +ABC Center +456 Oak Avenue +123 Maple Street +Coppell, TX 77054 +Springfield, +TX 77471 +Phone: 123-456-7890 +Phone: 123-456-7890 +Facsimile: 123-456-7890 +Facsimile: 123-456-7890 +Smoke +Community Signature +Contracted Provider Signature +lan Smith +George Clone +Printed Name +Printed Name +Director - Contracting +CEO +Title +Title +8/30/19 +8-28-19 +Date +Date +123456789 +TO BE COMPLETED BY COMMUNITY ONLY: +TIN +Effective Date: +SEP 01 2019 +1234567890 +NPI +Page 20 of 38 + +This page has 2 signature. + +Start of Page No. = 21 +EXHIBIT A +CONTRACTED PROVIDER DEMOGRAPHICS & LIST OF HEALTHCARE PROFESSIONALS +Complete list of each service location where Contracted Provider will render Covered Services, including all of the +following data elements listed below. +A. In accordance with Sections 3.1 and 3.18 of this Agreement, Contracted Provider shall provide Community with thirty (30) +calendar days prior written notice of any proposed changes in the locations or the proposed closing by Contracted +Provider of any affiliated Contracted Provider location(s) listed below. +B. In the event that a particular service or type of service that was provided previously at one of the affiliated facilities owned +and/or managed and operated by Contracted Provider listed below, is discontinued, but then offered as a new service or +type of service by one of the other affiliated facilities listed below, Contracted Provider acknowledges and agrees that +such service or services shall be included under this Agreement, at Community's discretion, at the rate(s) included under +this Agreement for such service or services. +Page 21 of 38 + + +-------Table Start-------- + +[['Legal Name', "'ABC Center"], ['DBA Name I If applicable', None], ['Website', 'www.abccenter.com'], ['Tax Identification Number', '12-3456789'], ['NPI Number', '1234567890'], ['Medicare Participation Number', '12C83M'], ['Medicaid Number', '001122334'], ['Specialty / Type of Service', 'Local Mental Health Authority (LMHA), Early Childhood Intervention (ECI) Provider, Mental Health Rehabilitative Services, Mental Health Targeted Case Management, Multispecialty Clinic'], ['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '123 Maple Street, Springfield, TX 77471 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish'], ['Remit Address Address: / City / State/ ZIP: Phone: / Fax:', '123 Maple Street, Springfield, TX 77471 123-456-7890/123-456-7890']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '123 Maple Street, Springfield, 77471 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon I Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '123 Maple Street, Springfield, TX 77414 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- + +Start of Page No. = 22 +Page 22 of 38 + + +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 77423 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 78934 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 77488 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 77471 123-456-7890/123-456-7890'], ['Hours of operation', '24 Hours - 7 days a week'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 77479 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 77478 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 77471 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '456 Oak Avenue, Coppell, TX 77406 , 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon - Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- + +Start of Page No. = 23 +Facility active provider roster of healthcare professionals to be submitted by Texana Center including all +data elements above. +Page 23 of 38 + + +-------Table Start-------- + +[['Practice or Business Location Address: / City / State/ ZIP: Phone: / Fax:', '123 Maple Street, Springfield, TX 77471 123-456-7890/123-456-7890'], ['Hours of operation', 'Mon 1 Fri: 8:00AM - 5:00PM'], ['Language(s) spoken', 'English, Spanish']] +None +-------Table End-------- +-------Table Start-------- + +[['Physician or Mid-Level Practitioner Last Name, First Name, MI and Degree', 'SEE ROSTER'], ['Specialty / Type of Service', 'SEE ROSTER'], ['Individual NPI Number', 'SEE ROSTER'], ['Medicare Participation Number', 'SEE ROSTER'], ['Medicaid Number', 'SEE ROSTER'], ['Individual THSteps TPI', 'SEE ROSTER'], ['Practice or Business Location Address: City / State/ ZIP: Phone: Fax:', 'SEE ROSTER'], ['Hours of operation', 'SEE ROSTER'], ['Language(s) spoken', 'SEE ROSTER']] + Facility active provider roster of healthcare professionals to be submitted by Texana Center including all data elements above. +-------Table End-------- + +Start of Page No. = 24 +EXHIBIT B-1 +COMPENSATION +CHIP +Does not participate in CHIP +Applicable Benefit +CHIP Perinatal +Does not participate in CHIP/P +Plan(s):- +STAR +Does not participate in STAR +STAR+PLUS +Does not participate in STAR+PLUS +Local Mental Health Authority (LMHA) +Chemical Dependency (CD) Treatment Facility +Provider Type: +Early Childhood Intervention (ECI) Provider +Mental Health Targeted Case Management +Non- Local Mental Health Authority (LMHA) +Behavioral Health Services +Services: +Mental Health Targeted Case Management +Mental Health Rehabilitative Services +Physician/Provider agrees to participate in the Benefit Plan/Program described in this Exhibit and authorizes, through its +signature below, the transfer of all payment/reimbursement terms and obligations under the Agreement to Payors as set +forth in this Agreement. +Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any +applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community +Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all +other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed +compensation set forth in this Exhibit, less any applicable Member Expense: +All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid +Fee Schedule. +Compensation Notes: +Community shall process Clean Claims based on the then current Texas Medicaid Fee Schedule as applicable to services rendered and +according to Texas Medicaid reimbursement methodology. +If applicable, Physician/Provider agrees to only bill for and Community shall be obligated to only pay for clinical laboratory services for +which Physician/Provider holds a valid CLIA certification. +If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community +shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges. +Physician/Provider Signature: +Date: +8.28-19 +Page 24 of 38 + + +-------Table Start-------- +5f0dfb9d-2f05-4285-8351-7a217bbae755 +[['Procedure Code', 'Description', 'Rate', 'Provider Type'], ['90792', 'Psychiatric diagnostic evaluation with medical services', '$ 155,00', 'MD / DO'], ['99212', 'Office / outpatient visit for evaluation and management; established patient', '$ 45.20', 'MD / DO'], ['99213', 'Office / outpatient visit for evaluation and management; established patient', '$ 75,14', 'MD / DO'], ['99214', 'Office / outpatient visit for evaluation and management; established patient', '$ 110,91', 'MD / DO'], ['99215', 'Office / outpatient visit for evaluation and management; established patient', '$ 149.57', 'MD / DO']] + All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule. +-------Table End-------- + +Start of Page No. = 25 +EXHIBIT B-2 +COMPENSATION +Applicable +Health Insurance Marketplace (HIM) +Does not participate in Marketplace +Benefit +Plan(s): +Limited Network Plan (Kelsey Marketplace) +Does not participate in Kelsey Marketplace +Local Mental Health Authority (LMHA) +Chemical Dependency (CD) Treatment Facility +Provider +Early Childhood Intervention (ECI) Provider +Type: +Mental Health Targeted Case Management +Non- Local Mental Health Authority (LMHA) +Applied Behavior Analysis (ABA) +Behavioral Health Services +Mental Health Targeted Case Management +Services: +Mental Health Rehabilitative Services +Applied Behavior Analysis +Physician/Provider agrees to participate in the Benefit Plan/Program described in this Exhibit and authorizes, through its +signature below, the transfer of all payment/reimbursement terms and obligations under the Agreement to Payors as set +forth in this Agreement. +Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any +applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community +Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all +other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed +compensation set forth in this Exhibit, less any applicable Member Expense: +All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid +Fee Schedule. +Applied Behavior Analysis (ABA) Services and Rates +Page 25 of 38 + + +-------Table Start-------- +1fb7fa14-3176-4bac-85ed-6bb3c8d5bd71 +[['Procedure Code', 'Description', 'Rate Per Unit (15 minutes)'], ['97151', "Behavior identification assessment, administered by a physician or other qualified healthcare professional, each 15 minutes of the physician's or other QHP's time face-to-face with patient, and/or guardian(s) administering assessments and discussing findings and recommendations, and non-face-to-face analyzing past data, scoring/interpreting the assessment, and preparing the report/treatment plan", '$ 40.00'], ['97152', 'Behavior identification supporting assessment, administered by one technician under the direction of a physician or other qualified healthcare professional, face to face with the patient, each 15 minutes.', '$ 15,50'], ['0362T', 'Behavior identification supporting assessment, each 15 minutes of technician\'s time face-to- face with a patient requiring the following components: "administered by the physician or other qualified healthcare professional who is on-site, w with the assistance of two or more technicians, *for a patient who exhibits destructive behavior, "completed in an environment that is customized to a patient\'s behavior', '$ 45.00'], ['97153', 'Adaptive behavior treatment by protocol, administered by technician under the direction of a physician or other QHP, face-to-face with one patient. each 15 minutes', '$ 15.50']] + Applied Behavior Analysis (ABA) Services and Rates +-------Table End-------- + +Start of Page No. = 26 +Compensation Notes: +Community shall process Clean Claims based on the then current Texas Medicaid Fee Schedule as applicable to services rendered and +according to Texas Medicaid reimbursement methodology, +If applicable, Physician/Provider agrees to only bill for and Community shall be obligated to only pay for clinical laboratory services for +which Physician/Provider holds a valid CLIA certification. +If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community +shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges. +Physician/Provider Signature: +fat +Date: +8-28-19 +Page 26 of 38 + + +-------Table Start-------- + +[['Procedure Code', 'Description', 'Rate Per Unit (15 minutes)'], ['97154', 'Group adaptive behavior treatment by protocol, administered by technician under the direction of a physician or other QHP, face-to-face with 2 or more patients, each 15 minutes', '$ $11.00'], ['97155', 'Adaptive behavior treatment, with protocol modification, administered by physician or other QHP, which includes simultaneous direction of technician, face-to-face with one patient, each 15 minutes', '$ 30.00'], ['97156', 'Family adaptive behavior treatment guidance administered by physician or other QHP (with or without the patient present). face-to-face with guardians(s)/caregiver(s), each 15 minutes', '$ 30.00'], ['97157', 'Multiple-family group adaptive behavior treatment guidance administered by physician or other qualified healthcare professional (without the patient present) face-to-face with multiple sets of guardians(s)/ caregiver(s)', '$ 22.00'], ['97158', "Group adaptive behavior treatment with protocol modifications, administered by a physician or other QHP, face to face with multiple patents', each 15 minutes", '$ 22.00'], ['0373T', 'Adaptive behavior treatment with protocol modification, each 15 minutes of technician\'s time face-to-face with a patient requiring the following components: *administered by the physician or other qualified healthcare professional who is on site, * with the assistance of two or more technicians, *for a patient who exhibits destructive behavior, "completed in an environment that is customized to a patient\'s behavior', '$ 45.00'], ['H0032', 'Mental health service plan development by a non-physician', '$ 25.00']] +None +-------Table End-------- + +Start of Page No. = 27 +EXHIBIT B-3 +COMPENSATION +Physician/Provider.c does not participate in above plan/program. +clat +Physician/Provider Signature +Date +8.28.19 +Page 27 of 38 + + +-------Table Start-------- +bd69c793-ac60-4fa7-8866-5d1bac378b44 +[['Applicable Benefit Plan(s): Provider Type: Services:', 'Dual Special Needs Plan (D-SNP) Does not participate in D-SNP [ ]'], ['Applicable Benefit Plan(s): Provider Type: Services:', 'Local Mental Health Authority (LMHA) Chemical Dependency (CD) Treatment Facility Early Childhood Intervention (ECI) Provider Mental Health Targeted Case Management Non- Local Mental Health Authority (LMHA) [ ]'], ['Applicable Benefit Plan(s): Provider Type: Services:', 'Behavioral Health Services Mental Health Targeted Case Management Mental Health Rehabilitative Services [ ]']] + EXHIBIT B-3 COMPENSATION Physician/Provider.c does not participate in above plan/program. +-------Table End-------- + +Start of Page No. = 28 +TEXAS MEDICAID COMPLIANCE ADDENDUM - PROVIDER +This Texas Medicaid Provider Addendum ("Addendum") is incorporated by reference into the Agreement and applies to +Medicaid and CHIP products ("Medicaid Program(s)") and the eligible populations covered by the State Contract(s), between +Sample Company Name, Inc +("Community," "Company" or generally referred to in the State Contract as an MCO) +and +the Texas Health & Human Services Commission ("HHSC"), which can be found at +https://hhs.texas.gov/services/health/medicaid-chip/provider-information/managed-care-contracts-manuals. +This Addendum may be updated and amended unilaterally at any time in order to comply with any local, state, or federal +laws, rules, or regulations. If Community has delegated administrative functions to any Subcontractor under the Agreement, +Community shall notify Subcontractor and Subcontractor shall notify its Participating Providers regarding these changes as +soon as practicable after changes have been announced. If there is any conflict between the terms of this Addendum and +any of the other terms of the Agreement, the terms of this Addendum will govern and control; provided, however, if there is +any conflict between any of the terms of the Agreement, including this Addendum, and the State Contract (as defined below), +then the terms of the State Contract will govern and control. +SECTION 1 - DEFINITIONS +Many words and terms are capitalized throughout this Addendum to indicate that they are defined in Section 1. Capitalized +terms used and not otherwise defined in this Addendum shall have the meanings set forth in the Agreement or, if not defined +in the Agreement, in the State Contract(s) or under Texas Law. +For purposes of this Addendum, the term "Provider" means Participating Provider as defined in the Agreement. As +applicable, the term "Community" includes any Subcontractor delegated administrative functions by Community under the +Agreement or otherwise providing or arranging for the provision of Covered Services. +1.1 +Acute Care. Preventative care, primary care, and other medical care provided under the direction of a physician +for a condition having a relatively short duration. +1.2 +Behavioral Health Services. Covered Services for the treatment of mental, emotional, or chemical dependency +disorders. +1.3 +Covered Services. Health Care Services Community must arrange to provide to Members, including all services +required by the State Contract, state and federal law, and all value added services required under the State Contract. +1,4 +Children's Health Insurance Program or "CHIP". The health insurance program authorized and funded pursuant to +Title XXI, Social Security Act (42 U.S.C. §§ 1397aa-1397jj) and administered by Texas Health and Human Services +Commission ("HHSC"). +1.5 +CHIP Program. The State of Texas program in which HHSC contracts with managed care organizations to provide, +arrange for, and coordinate Covered Services for enrolled CHIP Members. +1,6 +CHIP Perinatal Program. The State of Texas program in which HHSC contracts with managed care organizations +to provide, arrange for, and coordinate Covered Services for enrolled CHIP Perinate and CHIP Perinate Newborn Members. +Although the CHIP Perinatal Program is part of the CHIP Program, for administrative purposes, it is sometimes identified +independently in the State Contract. +1.7 +Clean Claim. As set forth in subsection 4.2, a claim submitted by physician or provider for medical care or Health +Care Services rendered to a Member, with the data necessary for Community or subcontracted claims processors to +adjudicate and accurately report the claim. A Clean Claim other than a nursing facility services clean claim must meet all +requirements for accurate and complete data as defined in the appropriate 837-(claim type) encounter guides as follows: +(1) 837 Professional Combined Implementation Guide; (2) 837 Institutional Combined Implementation Guide; (3) 837 +Professional Companion Guide; (4) 837 Institutional Companion Guide; or (5) National Council for Prescription Drug +Programs (NCPDP) Companion Guide. +1.8 +Health Care Services. Acute Care, Behavioral Health care, and health-related services that an enrolled population +might reasonably require in order to be maintained in good health. +1.9 +Material Subcontract." Any contract, Subcontract, or agreement between Community and another entity that meets +any of the following criteria: +(a) the other entity is an Affiliate of the MCO; +Page 28 of 38 + +Start of Page No. = 29 +(b) the Subcontract is considered by HHSC to be for a key type of service or function, including Administrative +Services (including, but not limited to, third party administrator, Network administration, and claims processing); +delegated Networks (including, but not limited to, behavioral health, dental, pharmacy, and vision); management +services (including management agreements with parent): reinsurance; Disease Management: pharmacy +benefit management ("PBM") or pharmacy administrative services; call lines (including nurse and medical +consultation); or +(c) any other Subcontract that exceeds, or is reasonably expected to exceed, the lesser of: +a. $500,000 per year, or +b. 1% of Company's annual Revenues under the State Contract. +(d) Any Subcontracts between Company and a single entity that are split into separate agreements by time period, +Program, or SDA, etc., will be consolidated for the purpose of this definition. For the purposes of the Agreement, +Material Subcontracts do not include contracts with any non-Affiliates for any of the following, regardless of the +value of the contract: utilities (e.g., water, electricity, telephone, Internet, trash), mail/shipping, office space, +maintenance, security, or computer hardware. +1.10 Medicaid. The medical assistance entitlement program authorized and funded pursuant to Title XIX, Social Security +Act (42 U.S.C. § 1396, et seq.) and administered by HHSC. +1.11 +Medical Home. A patient-centered medical home as described in Texas Government Code § 533.0029(a). +1.12 +Primary Care Physician or Primary Care Provider ("PCP"). A physician or provider who has agreed with Community +to provide a Medical Home to Members and who is responsible for providing initial and primary care to patients, maintaining +the continuity of patient care, and initiating referral for care. +1.13 +State Contract. The HHSC Uniform Managed Care Contract ("UMCC") for Medicaid, CHIP and STAR+PLUS +Contract(s) where applicable. +1.14 +Subcontractor. Any entity with a Material Subcontract with Community. +1.15 +Texas Health Steps or THSteps. The name adopted by the State of Texas for the federally mandated Early and +Periodic Screening, Diagnosis and Treatment ("EPSDT") program. It includes the State's Comprehensive Care Program +extension to EPSDT, which adds benefits to the federal EPSDT requirements contained in 42 U.S.C. § 1396 and defined +and codified at 42 C.F.R. §§ 440.40 and 441.56-62. HHSC's rules are contained in 25 T.A.C., Chapter 33 (relating to Early +and Periodic Screening, Diagnosis and Treatment). +SECTION 2 - OBLIGATIONS OF COMMUNITY +2.1 +Community will Initiate and maintain any action necessary to stop Provider or employee, agent, assign, trustee, or +successor-in-interest from maintaining an action against HHSC, an HHS Agency, or any Member to collect payment from +HHSC, an HHS Agency, or any Member, excluding payment for non-covered services. This provision does not restrict a +CHIP Provider from collecting allowable copayment and deductible amounts from CHIP Members. Additionally, this +provision does not restrict a CHIP Dental Network Provider from collecting payment for services that exceed a CHIP +Member's benefit cap. +SECTION 3 - OBLIGATIONS OF PROVIDER +3.1 +Provider acknowledges that HHSC does not assume liability for the actions of, or judgments rendered against, +Community, its employees, agents or subcontractors or Subcontractors. Further, Provider understands and agrees that +there is no right of subrogation, contribution, or indemnification against HHSC for any duty owed to Provider by Community +or any judgment rendered against Community. HHSC's liability to Provider, if any, will be governed by the Texas Tort +Claims Act, as amended or modified (TEX, Civ. PRAC. & REM. CODE § 101.001, et seq.). +3.2 +Pharmacy. If prior authorization for a medication is not immediately available, a 72-hour emergency supply may be +dispensed when the pharmacist on duty recommends it as clinically appropriate and when the medication is needed without +delay. Please consult the Vendor Drug Program Pharmacy Provider Procedures Manual, the Texas Medicaid Provider +Procedures Manual, and Community's Provider Manual (page 48) for information regarding reimbursement for 72-hour +emergency supplies of prescription claims. It is important that pharmacies understand the 72-hour emergency supply policy +and procedure to assist Medicaid clients. +3.3 +Access to Records. +a. +Provider agrees to provide at no cost to HHSC: all information required under Community's managed care +contract with HHSC, including, but not limited to, the reporting requirements and other information related to Provider's +Page 29 of 38 + +Start of Page No. = 30 +performance of its obligations under that contract; and any information in its possession sufficient to permit HHSC to comply +with the federal Balanced Budget Act of 1997 or other federal or state laws, rules and regulations. All information must be +provided in accordance with the timelines, definitions, formats and instructions specified by HHSC. +b. +Provider agrees that upon receipt of a record review request from HHSC's Office of Inspector General +("OIG"), Special Investigative Units (SIUs) or another state or federal agency authorized to conduct compliance, regulatory, +or program integrity functions, Provider shall provide, at no cost to requesting agency. the records requested within 3 +business days of the request. If the OIG, SIUs or another state or federal agency representative believes that the requested +records are about to be altered or destroyed or that the request may be completed at the time of the request and/or in less +than 24 hours, Provider shall provide the requested records at the time of the request and/or in less than 24 hours. +The request for records review may include, but is not limited to, clinical, medical or dental Member records, other records +pertaining to Member: any other records of services provided to Medicaid or other health and human services program +recipients and payments made for those services; documents related to diagriosis, treatment, service, lab results, charting, +billing records, invoices, documentation of delivery items, equipment, or supplies; radiographs and study models related to +orthodontia services; business and accounting records with backup support documentation; statistical documentation; +computer records and data; and/or contracts with providers and subcontractors. +Provider's failure to produce the records or make the records available for the purpose of reviewing, examining, and securing +custody of the records may result in the OIG imposing sanctions against Provider as described in 1 TEX. ADMIN. CODE, +Chapter 371, Subchapter G. +C. +Provider agrees to provide at no cost to the following entities or their designees with prompt, reasonable +and adequate access to this Agreement any records, books, documents, and papers that are related to this Agreement +and/or Provider's performance of its responsibilities under this Agreement: +(1) HHSC and MCO Program personnel from HHSC; +(2) U.S. Department of Health and Human Services; +(3) Office of Inspector General and/or the Texas Medicaid Fraud Control Unit; +(4) an independent verification and validation contractor or quality assurance contractor acting on behalf +of HHSC; +(5) state or federal law enforcement agency; +(6) special or general investigation committee of the Texas Legislature; +(7) the U.S. Comptroller General; +(8) the Office of the State Auditor of Texas; and +(9) any other state or federal entity identified by HHSC or any other entity engaged by HHSC. +Provider must provide access wherever it maintains such records, books, documents and papers. Provider must provide +such access in reasonable comfort and provide any furnishings, equipment and other conveniences deemed reasonably +necessary to fulfill the purposes described herein. Requests for access may be for, but are not limited to: examination, +audit, investigation, contract administration, the making of copies, excerpts or transcripts, or any other purpose HHSC +deems necessary for contract enforcement or to perform its regulatory functions. +d. +Provider understands and agrees that the acceptance of funds under this Agreement acts as acceptance +of the authority of the State Auditor's Office ("SAO"), or any successor agency, to conduct an investigation in connection +with those funds. Provider further agrees to cooperate fully with the SAO or its successor in the conduct of the audit or +investigation, including providing all records requested at no cost. +3.4 +NPI and TPI. Providers serving Medicaid Members must enter into and maintain a Medicaid provider agreement +with HHSC or its agent to participate in the Medicaid Program, and must have a Texas Provider Identification Number +("TPI"). Provider shall have a National Provider Identifier ("NPI") in accordance with the timelines established in 45 C.F.R. +Part 162, Subpart D. For purposes of this section, "national provider identifier" means the national provider identifier required +under Section 1128J(e), Social Security Act (42 U.S.C. Section 1320a-7k(e)). +3.5 +Administrative Requirements. Provider must inform Community and HHSC's administrative services contractor of +any change to Provider's address, telephone number, group affiliation, etc. +3.6 +Professional Conduct. While performing the services described in this Agreement, Provider agrees to comply with +applicable state laws, rules, and regulations and HHSC's requests regarding personal and professional conduct generally +applicable to the service locations; and otherwise conduct themselves in a businesslike and professional manner. +3.7 +Quality Assessment and Performance and Improvement ("QAPI"). Provider agrees to comply with Community's +QAPI Program requirements. +3.8 +Early Childhood Intervention ("ECI"), Provider must cooperate and coordinate with local ECI programs to comply +with federal and state requirements relating to the development, review and evaluation of Individual Family Service Plans +Page 30 of 38 + +Start of Page No. = 31 +("IFSP"). Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained +in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP. +3,9 +Women, Infants and Children ("WIC"). Provider must coordinate with the WIC Special Supplemental Nutrition +Program to provide medical information necessary for WIC eligibility determinations, such as height, weight, hematocrit or +hemoglobin. +3.10 +Tuberculosis ("TB"), Provider must coordinate with the local TB control program to ensure that all Members with +confirmed or suspected TB have a contact investigation and receive Directly Observed Therapy (DOT). The Network +Providers must report to the Texas Department of State Health Services (DSHS) or the local TB control program any +Member who is non-compliant, drug resistant, or who is or may be posing a public health threat. +3.11 +Lead Screening. Provider agrees (1) report all blood lead results to the Childhood Lead Poisoning Program (if +not performed at the DSHS state laboratory) and, (2) follow-up on suspected or confirmed cases of Childhood lead exposure +with the Childhood Lead Poisoning Prevention. Program, and follow the Centers for Disease Control and Prevention +guidelines for testing children for lead and follow-up actions for children with elevated lead levels located at +http://www.dshs.state.tx.us/lead/pdf_files/pb_109_physician reference.pdf. +3.12 +Waiting Times for Appointments. Provider must provide: +(a) Emergency Services upon Member presentation at the service delivery site, including at non-network and out- +of-area facilities (where applicable); +(b) Treatment for an Urgent condition, including urgent specialty care, within 24 hours (where applicable);; +(c) Routine primary care within 14 days; +(d) Specially routine care within 21 days; +(e) initial outpatient behavioral health visits within 14 days (this requirement does not apply to CHIP Perinate +Members): +(f) Non-urgent specialty care within 60 days (this requirement applies to STAR Health only); +(g) Pre-natal care within 14 days, except for high-risk pregnancies or new Members in the third trimester, for whom +an appointment must be offered within 5 days, or immediately, if an emergency exists (where applicable); and +(h) Preventive health services including annual adult well checks for Members 21 years of age or older must be +offered within 90 Days (where applicable); +(i) Preventive health services for Members less than 6 month of age must be provided within 14 days. Preventive +health services for Members 6 months through age 20 must be provided within 60 Days. CHIP Members should +receive preventive care in accordance with the American Academy. of Pediatrics (AAP) periodicity schedule. +Medicaid Members should receive preventive care in accordance with the Texas Health Steps periodicity +schedule. +In addition, PCPs must make referrals for specialty care on a timely basis, based on the urgency of the Member's medical +condition, but no later than 30 days. +3.13 Cancellation of Product Orders. Provider that offers delivery services for covered products, such as durable medical +equipment (DME), limited home health supplies (LHHS), or outpatient drugs or biological products must reduce, cancel, or +stop delivery if the Member or the Member's authorized representative submits an oral or written request. Provider must +maintain records documenting the request. +SECTION 4 - COMPENSATION +4.1 +Claims Payment. The method of payment applicable to this Agreement is described in the applicable Compensation +Addendum, If Provider is reimbursed based on the Texas Medicaid Fee Schedule, the rates are set by the State Medicaid +Program and are available at http://www.tmhp.com. +4.2 +Claims Submission. Provider must file a Clean Claim with Community within 95 days from the date of service. The +required data elements for Medicaid claims must be present for a claim to be considered a Clean Claim and can be-found +in the Section 8 "Managed Care" of the Texas Medicaid Provider Procedures Manual. +Community will notify Provider at least 90 days prior to implementing a change in the above-referenced claims guidelines, +unless the change is required by statute or regulation in a shorter timeframe. +Provider must submit claims for processing and/or adjudication to the following entity/entities or as set forth in the Provider +Manual: +Page 31 of 38 + + +-------Table Start-------- +bb09cfe5-352b-45e5-b0c9-a0ea849d6018 +[['Electronic submission', 'Payer ID 12345'], ['Paper Claims', 'Sample Company Name P.O. Box 123456']] + Provider must submit claims for processing and/or adjudication to the following entity/entities or as set forth in the Provider Manual: +-------Table End-------- + +Start of Page No. = 32 +Provider may call 123-456-7890 +for all claims inquiries. +Community will notify Provider in writing of any changes in the list of claims processing and adjudication entities at least 30 +days prior to the effective date of change. If Community is unable to provide 30 days' notice, Community will give Provider +a 30-day extension on its claims filing deadline to ensure claims are routed to the correct processing center. +4.3 +Corrected Claims. A Corrected Claim is a claim that has already been adjudicated, whether paid or denied, Provider +must submit a Corrected Claim if the original claim adjudicated needs to be changed. A Corrected Claim could be'a result +of: +a) Errors were found involving diagnosis, procedure, date or modifier. +b) Claims contained missing, incorrect, or incomplete data according to our claims submission requirements. +c) Services were missed in an original claim. +d) Original claim billed with incorrect number of units or billed amount. +When submitting a corrected claim on a CMS 1500, Provider must clearly mark the claim as "Corrected Claim" along with +the original claim number in box 22 form along with resubmission code of 7. When submitting a corrected claim on a UB +04, Provider must clearly mark the claim as "Corrected Claim" along with the third digit of Type. of Bill indicated as Frequency +code 7. +Corrected Claims must be sent within 120 days of initial claim disposition. Failure to mark the claim as "corrected" could +result in a duplicate claim and be denied for exceeding the 95 days timely-filing deadline +4,4 +Supervised Providers. If Provider, including a nurse practitioner or physician assistant, provides a referral for or +orders health care services for a recipient or enrollee, as applicable, at the direction or under the supervision of another +provider, and the referral or order is based on the supervised provider's evaluation of the recipient or enrollee, the names +and associated national provider identifier numbers of the supervised provider and the supervising provider must be included +on any claim for reimbursement submitted by a provider based on the referral or order as required by TEX. Gov. CODE +§ +531.024161. +4.5 +Adjudication of Claims. Community shall adjudicate (finalize as paid or denied adjudicated) Clean Claims for: +(a) healthcare services within 30 days from the date the claim is received by the MCO; +(b) pharmacy services no later than 18 days of receipt if submitted electronically, or 21 days of receipt if submitted +non-electronically; and +(c) Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated +within 30 days. +Community must withhold all or part of payment for any claim submitted by a Provider for any of the following reasons: +a) excluded or suspended from the Medicare, Medicaid, or CHIP programs for Fraud, Abuse, or Waste; +b) on payment hold under the authority of HHSC or its authorized agent(s); +c) +with debts, settlements, or pending payments due to HHSC, or the state or federal government; +d) for neonatal services provided on or after September 1, 2017, if submitted by a Hospital that doès not have +neonatal level of care designation from HHSC; +e) for maternal services provided on or after September 1, 2019, if submitted by a Hospital that does not have a +maternal level of care designation from HHSC, +In accordance with Texas Health and Safety Code § 241.186, the restrictions on payment identified in items (d) and (e) +above do not apply to emergency services that must be provided or reimbursed under state or federal law. +4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. +Page 32 of 38 + + +-------Table Start-------- + +[[None, 'Coppell, TX 77230-1404'], ['Certified Mail', 'Sample Company Name 123 Maple Street, Springfield, Coppell, TX 77054']] +None +-------Table End-------- + +Start of Page No. = 33 +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights. +4.7 +Co-payments and Deductibles. Co-payments are the only amounts that Provider may collect from CHIP Members, +except for costs associated with unauthorized non-emergency services provided to a Member by out-of-network providers +for non-covered services. +Provider is responsible for collecting at the time of service any applicable CHIP co-payments or deductibles in accordance +with CHIP cost-sharing limitations. +Providers shall not charge: (a) cost-sharing or deductibles to CHIP Members of Native American Tribes or Alaskan Natives; +(b) co-payments or deductibles to the CHIP Member with an ID card that indicates the Member has met his or her cost- +sharing obligation for the balance of their term of coverage; (c) co-payments for well-child or well-baby visits or +immunizations; or (d) co-payments for routine preventive and diagnostic dental services (CHIP Dental). +4.8 +Liability for Payment of Services. Provider understands and agrees that HHSC is not liable or responsible for +payment for Covered Services rendered pursuant to the Agreement. In no event, including, but not limited to, nonpayment +by Community, Community's insolvency or breach of this Agreement, shall Provider bill, charge, collect a deposit from, seek +compensation, remuneration or reimbursement from, or have any recourse against a Member or persons other than +Community acting on their behalf for Covered Services provided pursuant to this Agreement. Provider further understands +and agrees that Community's Members may not be held liable for Community's debts in the event of Community's +insolvency. This provision shall not prohibit collection from a Member for any non-covered service and/or Copayment +amounts in accordance with the terms of the applicable Member's health benefits and this Agreement. Provider further +agrees that: (1) this provision shall survive the termination of this Agreement regardless of the cause giving rise to +termination and shall be construed to be for the benefit of the Member; and (2) this provision supersedes any oral or written +contrary agreement now existing or hereafter entered into between Provider and Member, or persons acting on their behalf. +In the event Community becomes insolvent or ceases operations, Provider understands and agrees that its sole recourse +against Community will be through the Community's bankruptcy, conservatorship, or receivership estate. +4.9 +Third Party Recovery. Provider understands and agrees that it may not interfere with or place any liens upon the +State's right or Community's right, acting as the State's agent, to recovery from third-party resources. +After 120 days from the date of adjudication (on any claim, encounter, or other Medicaid related payment made by +Community, wherein the claim, encounter, or payment is subject to Third Party Recovery), HHSC may attempt recovery, +independent of any action by Community. HHSC will retain, in full, all funds received as a result of any state-initiated +recovery or subrogation action. +4.10 +Costs of Non-Covered Services. Provider must inform Members of the cost for non-covered services prior to +rendering such services and must obtain a signed Private Pay form from such Member. +4.11 Claims Payment. Violations of the Medicaid program arising out of performance of the Agreement are subject to +administrative enforcement by the OIG as specified in 1 TEX. ADMIN. CODE, Chapter 371, Subchapter G. +4.12 Overpayments. An overpayment can be identified by the Provider or Community. If Provider identifies the +overpayment, Provider must submit a refund check all with an explanation of refund and/or Explanation of Payment (EOP) +to Community or call Provider Services at 713-295-2295 and approve a recoupment from any future payments to Provider. +If Community identifies the overpayment, a recovery letter will be sent to Provider, Provider has 45 days to submit a refund +check or appeal the refund request. If Provider does not respond within 45 days from the date of the recovery letter, then +Community will begin the recoupment on any future payments. In the event Members retroactively dis-enroll from +Community as a result of changes in their eligibility, Community reserves the right to automatically recover payments made +to Provider for services rendered to those Members. +Page 33 of 38 + +Start of Page No. = 34 +SECTION 5 - DISPUTE RESOLUTION +5.1 +Complaints and Appeals. Community's complaint and appeal processes applicable to Provider under the terms of +this Agreement are set forth in the Provider Manual. Specifically, a Provider may file a complaint at any time with +Community. Send Complaints to: +Sample Company Name +Attn: Services Improvement Team +123 Maple Street, Springfield, +Houston. TX 77054 +Fax: 123.456.7890 +Email: Servicelmprovement@companyname.org +Complaints may also be submitted online at the Community Web site https://www.companyname.org +Community +shall acknowledge all written complaints within five business days. If a Provider's complaint is oral, Community's +acknowledgement letter shall include a one-page Complaint Form. Community shall acknowledge, investigate and resolve +all complaints no later than the 30th calendar day after the date Community receives written complaint or one-page complaint +form from the complainant. Community will retain all Provider complaint documentation, including fax cover sheets, emails +to and from Community, and a telephone log of communication related to the complaint. +Provider understands and agrees that HHSC reserves the right and retains the authority to make reasonable inquiry and to +conduct investigations into Provider and Member complaints. +5.2 +Claim Appeals. An appealed claim is a claim that has been previously adjudicated as a Clean Claim and the Provider +is appealing the disposition through written notification to Community. Provider must request Claim Appeals within 120 +days from the date of remittance of the Explanation of Payment (EOP). +SECTION 6 - CONFIDENTIALITY +6.1 +Provider agrees to treat all information that is obtained through the performance of the services included in this +Agreement as confidential information to the extent that confidential treatment is provided under state and federal laws, +rules and regulations. This includes, but is not limited to, information relating to applicants or recipients of HHSC Programs. +6.2 +Provider agrees it shall not use information obtained through the performance of this Agreement in any manner +except as is necessary for the proper discharge of obligations and securing of rights under this contract. +6.3 +Provider agrees to protect the confidentiality of Member Protected Health Information ("PHI"), including patient +records. Provider must comply with all applicable federal and state laws, including the HIPAA Privacy and Security Rule +governing the use and disclosure of PHI. +SECTION 7 - FRAUD AND ABUSE +7.1 Provider acknowledges and agrees to the following: +(1) HHSC Office of Inspector General ("OIG") and/or the Texas Medicaid Fraud Control Unit must be allowed to +conduct private interviews of Network Providers and their employees, agents, contractors, and patients; +requests for information from such entities must be complied with, in the form and language requested; +Providers and their employees, agents, and contractors must cooperate fully with such entities in making +themselves available in person for interviews, consultation, grand jury proceedings, pre-trial conference, +hearings, trials at the Network Provider's own expense; and compliance with these requirements will be at the +Provider's own expense. +(2) Providers are subject to all state and federal laws and regulations relating to fraud, abuse or waste in health +care or dental care and the Medicaid and/or CHIP Programs, as applicable. +(3) Providers must cooperate and assist HHSC and any state or federal agency that is charged with the duty of +identifying, investigating, sanctioning or prosecuting suspected fraud, abuse or waste. +(4) Providers must provide originals and/or copies of any and all information as requested by HHSC or the state or +federal agency, allow access to premises, and provide records to the Office of Inspector General, HHSC, the +Centers for Medicare and Medicaid Services (CMS), the U.S. Department of Health and Human Services, FBI, +TDI, the Texas Attorney General's Medicaid Fraud Control Unit or other unit of state or federal government, +upon request, and free-of-charge. +Page 34 of 38 + +Start of Page No. = 35 +(5) If the Provider places required records in another legal entity's records, such as a hospital, the Network Provider +is responsible for obtaining a copy of these records for use by the above-named entities or their representatives. +(6) Network Providers must report any suspected fraud or abuse including any suspected fraud and abuse +committed by the MCO or a Member to the HHSC Office of Inspector General. +SECTION 8 - INSURANCE +8.1 +Provider shall maintain, during the term of the Provider contract, Professional Liability Insurance of at least $100,000 +per occurrence and $300,000 in the aggregate, or, where applicable, the limits required by the hospital at which Provider +has admitting privileges. +8.2 +Subsection 8.1 does not apply if Provider is a state or federal unit of government, or a municipality, that is required +to comply with, and is subject to, the provisions of the Texas and/or Federal Tort Claims Act. +SECTION 9 - LAWS, RULES AND REGULATIONS +9.1 +Liability for Violation of Applicable Laws. Provider understands and agrees that it is subject to all state and federal +laws, rules, regulations, waivers, policies and guidelines, and court-ordered consent decrees, settlement agreements or +other court orders that apply to this Agreement and Community's managed care contract with HHSC, the Community +Program, and all persons or entities receiving state and federal funds. Provider understands and agrees that any violation +by a provider of a state or federal law relating to the delivery of services pursuant to this Provider Agreement, or any violation +of Community's contract with HHSC could result in liability for money damages, and/or civil or criminal penalties and +sanctions under state and/or federal law. +9.2 +Applicable Laws. Provider further understands and agrees that the following laws that apply to the Agreement +include, but are not limited to, the following laws, rules, regulations and all amendments or modifications thereto, apply to +this Agreement: +a. +environmental protection laws: +(1) +Pro-Children Act of 1994 (20 U.S.C. § 6081, et seq.) regarding the provision of a smoke-free +workplace and promoting the non-use of all tobacco products; +(2) +National Environmental Policy Act of 1969 (42 U.S.C. § 4321, et seq.) and Executive Order 11514 +("Protection and Enhancement of Environmental Quality") relating to the institution of environmental +quality control measures; +(3) +Clean Air Act and Water Pollution Control Act regulations (Executive Order 11738, "Providing for +Administration of the Clean Air Act and Federal Water Pollution Control Act with Respect to Federal +Contracts, Grants, and Loans"); +(4) +State Clean Air Implementation Plan (42 U.S.C. § 740, et seq.) regarding conformity of federal +actions to State Implementation Plans under § 176(c) of the Clean Air Act; and +(5) +Safe Drinking Water Act of 1974 (21 U.S.C. § 349; 42 U.S.C. § 300f to 300j-9) relating to the +protection of underground sources of drinking water. +b. +state and federal anti-discrimination laws: +(1) +Title VI of the Civil Rights Act of 1964, (42 U.S.C. § 200d, et seq.) and as applicable 45 C.F.R. Part +80 or 7 C.F.R. Part 15; +(2) +Section 504 of the Rehabilitation Act of 1973 (29 U.S.C. § 794)); +(3) +Americans with Disabilities Act of 1990 (42 U.S.C. § 12101, et seq.); +(4) +Age Discrimination Act of 1975 (42 U.S.C. §§ 1681-1688); +(5) +Title IX of the Education Amendments of 1972 (20 U.S.C. §§ 1681-1688); +(6) +Food Stamp Act of 1977 (7 U.S.C. § 1101, et seq.); +(7) +Executive Order 13279, and its implementing regulations at 45 C.F.R. Part 87 or 7 C.F.R. Part 16; +and +(8) +the HHS agency's administrative rules, as set forth in the Texas Administrative Code, to the extent +applicable to this Agreement. +C. +the Immigration Reform and Control Act of 1986 (8 U.S.C. § 1101, et seq.) and the Immigration Act of 1990 +(8 U.S.C. § 1101, et seq.) regarding employment verification and retention of verification forms; +d. +the Health Insurance Portability and Accountability Act of 1996 (HIPAA) (Public Law 104-191); and +e. +the Health Information Technology for Economic and Clinical Health Act (HITECH Act) at 42 U.S.C. § +17931, et seq. +Page 35 of 38 + +Start of Page No. = 36 +9.3 +Marketing. Provider agrees to comply with state and federal laws, rules and regulations governing marketing. +Provider agrees to comply with HHSC's marketing policies and procedures, as set forth in HHSC's Uniform Managed Care +Manual. Provider is prohibited from engaging in direct marketing to Members that is designed to increase enrollment in a +particular health plan. The prohibition should not constrain Provider from engaging in permissible marketing activities +consistent with broad outreach objectives and application assistance. +9.4. +Member Protections. +Provider must inform Community of any reports of abuse, neglect or exploitation made +regarding a Member. This includes self-reports and reports made by others that Provider becomes aware of. +SECTION 10 - MEMBER COMMUNICATIONS +10.1 +Nothing contained in this Agreement is intended to interfere with or hinder communications between Provider and +Member regarding a patient's medical condition and/or treatment options; Community's referral policies, and other +Community policies, including financial incentives or arrangements and all managed care plans with whom the Provider +contracts. +SECTION 11 - PRIMARY CARE PHYSICIANS AND PRIMARY CARE PROVIDERS +11.1 +Accessibility. If Provider is a PCP, it must be accessible to Members 24 hours per day, 7 days per week. +11.2 +Preventative Care. If Provider is a PCP, it must provide preventative care to children under age 21 in accordance +with AAP recommendations for CHIP Members and CHIP Perinatal Newborns; the THSteps periodicity schedule published +in the THSteps Manual for Medicaid Members; and to adults in accordance with the U.S. Preventative Task Force +requirements. +11.3 +Referral and Coordination of Care. If Provider is a PCP, it must assess the medical needs and behavioral health +needs of Members for referral to specialty care providers and provide referrals as needed; coordinate Members' care with +specialty care providers after referral; and serve as a Medical Home to Members. +SECTION 12 - TERMINATION +12.1 +Termination. Community shall follow the procedures outlined in $843.306 of the Texas Insurance Code and 28 +Tex. Admin. Code § 11.901 when terminating the Agreement with Provider. +In addition to the Termination section of the Agreement, the following provisions apply: +Community must notify HHSC within five Days after termination of (1) a Primary Care Provider (PCP) contract that impacts +more than 10 percent of its Members or (2) any Provider contract that impacts more than 10 percent of its Network for a +provider type by Service Area and Program. Community must make a good faith effort to give written notice of termination +of a Provider to each Member who receives his or her primary care, or who is seen on a regular basis by, the Provider as +follows: +(1) For involuntary terminations of a Provider (terminations initiated by Community), Community must provide notice to +the Member of the Provider's termination from the network within 15 Days of either expiration of the provider's +advance notice period or once the provider has exhausted rights to appeal. In cases of imminent harm to Member +health, the MCO must give the Member notice immediately that the Provider will be terminated even if a final +termination notice to the Provider has not been issued. +(2) For voluntary terminations of a Provider (terminations initiated by the Provider), Community must provide notice to +the Member 30 Days prior to the termination effective date. In the event that the Provider sends untimely notice of +termination to Community making it impossible for Community to send Member notice within the required timeframe, +Community must provide notice as soon as practical but no more than 15 days after Community receives notice to +terminate from the Provider. Community must send notice to: (1) all its Members in a PCP's panel, and (2) all its +Members who have had two or more visits with the Provider for home-based or office-based care in the past 12 +months. +12.2 +Termination for Gifts or Gratuities. Provider may not offer or give anything of value to an officer or employee of +HHSC or the State of Texas in violation of state law. A "thing of value" means any item of tangible or intangible property +that has a monetary value of more than $50.00 and includes, but is not limited to, cash, food, lodging, entertainment and +charitable contributions. The term does not include contributions to public office holders or candidates for public office that +are paid and reported in accordance with state and/or federal law. Community may terminate this Provider contract at any +time for violation of this requirement. +Page 36 of 38 + +Start of Page No. = 37 +SECTION 13 - BEHAVIORAL HEALTH +13.1 +If Provider is a PCP, it must have screening and evaluation procedures for detection and treatment of, or referral +for, any known or suspected behavioral health problems and disorders. +13.2 Providers who provide inpatient psychiatric services to a Member must schedule the Member for outpatient follow- +up and/or continuing treatment prior to discharge. The outpatient treatment must occur within 7 days from the date of +discharge. Behavioral Health providers must contact Members who have missed appointments within 24 hours to +reschedule appointments. +13.3 +All behavioral and physical health providers (including PCPs, OB/GYNs, internists, and other relevant provider +types) must share amongst each other clinical information regarding Members with co-occurring behavioral and +physical health conditions, to the extent allowed by federal law. +ADDITIONAL PROVISIONS SPECIFIC TO MEDICAID +1. +Durable Medical Equipment. Please consult the Texas Medicaid Provider Procedures Manual, Durable Medical +Equipment (DME) and Comprehensive Care Program (CCP) sections, and Community's Provider Manual +(Pharmacy and Benefits sections) for information regarding the scope of coverage of durable medical equipment +(DME) and other products commonly found in a pharmacy. For qualified children, this includes medically necessary +over-the-counter drugs, diapers, disposable/expendable medical supplies, and some nutritional products. It also +includes medically necessary nebulizers, ostomy supplies or bed pans, and other supplies and equipment for all +qualified Members. Community encourages your pharmacy's participation in providing these items to Medicaid +clients. +2. +Family Planning. If a Member requests contraceptive services or family planning services, Provider must provide +Member counseling and education about family planning and available family planning services. Provider shall not +require parental consent for Members who are minors to receive family planning services. Provider must comply +with state and federal laws and regulations governing Member confidentiality (including minors) when providing +information on family planning services to Members. +3. +THSteps. Provider must send all THSteps newborn screens to the Texas Department of State Health Services +("DSHS") or a DSHS-certified laboratory. Providers must include detailed identifying information for all screened +newborn Members and each Member's mother to allow HHSC to link the screens performed at hospitals with +screens performed at the 2-week follow-up visit. +PCPs must: +a. either be enrolled as THSteps providers or refer Members due for a THSteps check-up to a THSteps +provider; +b. +refer Members for follow-up assessments or interventions clinically indicated as a result of the THSteps +check-up, including the developmental and behavioral components of the screening; +C. +submit information from the THSteps forms and documents to the Health Passport. +4. +Provider Fraud and Abuse Policy. If Provider receives annual Medicaid payments of at least $5 million dollars +(cumulative, from all sources), Provider must: +a. +Establish written policies for all employees, managers, officers, contractors, subcontractors and agents of +Provider. The policies must provide detailed information about the False Claims Act, administrative +remedies for false claims and statements, any state laws about civil or criminal penalties for false claims, +and whistleblower protections under such laws, as described in Section 1902(a)(68)(A) of the Social +Security Act. +b. +Include as part of such written policies detailed provisions regarding Provider's policies and policies and +procedures for detecting and preventing fraud, waste and abuse. +C. +Include in any employee handbook a specific discussion of the laws described in Section 1902(a)(68)(A) of +the Social Security Act, the rights of employees to be protected as whistleblowers, and Provider's policies +and procedures for detecting and preventing fraud, waste and abuse. +5. +Advance Directives. Provider must comply with requirements of state and federal laws, rules and regulations +relating to advance directives. +Page 37 of 38 + +Start of Page No. = 38 +Referral and Coordination of Care. If Provider is a PCP, it must assess the medical needs and behavioral health +needs of Members for referral to specialty care providers and provide referrals as needed; coordinate Members' +care with specialty care providers after referral; and serve as a Medical Home to Members. +6. +Payment for Services. Provider is prohibited from billing or collecting from a Medicaid Member for health care +services provided pursuant to the Agreement. Federal and state laws provide severe penalties for any provider to +bill or collect any payment from a Medicaid recipient for a Covered Service. +7. +Mental Health. Provider must comply with 25 Tex. Adm. Code, Part 1, Chapter 415, Subchapter F, "Interventions +in Mental Health Services," when providing mental health rehabilitation services and mental health targeted case +management. +8. +Electronic Visit Verification. Network Providers using the EVV system must maintain compliance with HHSC +minimum standards detailed in UMCM, Chapter 8.7, Section IX. +9. +Service Coordination. All Home and Community Support Services Agency (HCSSA) providers, adult day care +providers, and residential care facility providers must notify the MCO if a Member experiences any of the following: +a) a significant change in the Member's physical or mental condition or environment; b) hospitalization; c) an +emergency room visit; or d) two or more missed appointments. +10. +Waiting Times for Appointments. In addition to the requirements in 3.12 of this Addendum, Community Long-Term +Services and Supports for Members must be initiated within 7 days from the start date on the Individual Service +Plan or the eligibility effective date for non-waiver LTSS unless the referring provider, Member, or STAR+PLUS +Handbook states otherwise. +[END OF PAGE] +Page 38 of 38 \ No newline at end of file diff --git a/assets/sampleOne/cnc_01-06.pdf b/assets/sampleOne/cnc_01-06.pdf new file mode 100644 index 00000000..4d6e06fc Binary files /dev/null and b/assets/sampleOne/cnc_01-06.pdf differ diff --git a/assets/sampleOne/cnc_01-06.txt b/assets/sampleOne/cnc_01-06.txt new file mode 100644 index 00000000..fc82344e --- /dev/null +++ b/assets/sampleOne/cnc_01-06.txt @@ -0,0 +1,134 @@ +Document Index +AMENDMENT NUMBER ONE 1PARTICIPATING PROVIDER AGREEMENT 1 +Attachment A: Medicaid 3 +EXHIBIT 2 3COMPENSATION SCHEDULE 3PROFESSIONAL SERVICES 3 +Additional Provisions: 3 +Definitions: 4 + + + +Start of Page No. = 1 +AMENDMENT NUMBER ONE +PARTICIPATING PROVIDER AGREEMENT +This Amendment Number One ("Amendment") is entered into as of December 1. 2019 by and between Dummy +HealthCare Inc. ("Health Plan") and Picture, LLC Novelty Pharmacy +("Provider"), collectively reterred to +herein as the "Parties". +WHEREAS, Health Plan and Provider have previously entered into a Participating Provider Agreement (the +"Agreement") effective as of January 1. 2017 (defined in the Agreement as the "Effective Date"); and +WITEREAS, the Parties desire to amend the Agreement; +NOW THEREFORE, in consideration of the promises and mutual covenants herein contained. the Parties agree as +follows: +1. +Attachment A: Medicaid Exhibit 2 Compensation Schedule Professional Services shall be added +and +incorporated into the Agreement as shown by the attached. +2. All other terms and conditions of the Agreement and any amendments thereto, if any, shall remain in full +force and effect. If the terms of this Amendment conflict with any of the terms of the Agreement. the terms +of this Amendment shall prevail. +PPA (NE) - All Products 03/30/16 +Page I of 4 + +Start of Page No. = 2 +IN WITNESS WHEREOF. the Parties hereto have executed and delivered this +Amendment as of the date first set forth above. +HEALTH PLAN: +PROVIDER: +Dummy HealthCare Inc. +LLC Novelty Pharmacy +Authorized Signature +Authorized Signature +Bank +Mark Chappman +Jake Parelta +Printed Name: +Printed Name: +Title: PRocedent +Title: RPinCharge +Date: 11/19/9 +Date: 11/15/19 +ECM #: 112233 +Tax ID Number: 12-3456789 +State Medicaid Number: 0123456789 +National Provider Identifier: 123456789 +PPA (NE) - All Products 03/30/16 +Page 2 of 4 + +This page has 2 signature. + +Start of Page No. = 3 +Attachment A: Medicaid +EXHIBIT 2 +COMPENSATION SCHEDULE +PROFESSIONAL SERVICES +Picture, +LLC Novelty Pharmacy +This compensation schedule ("Compensation Schedule") sets forth the maximum reimbursement amounts for +Covered Services provided by Contracted Providers to Covered Persons enrolled in a Medicaid Product. Where the +Contracted Provider's tax identification number ("TIN") has been designated by the Payor as subject to this +Compensation Schedule. Payor shall pay or arrange for payment of a Clean Claim for Covered Services rendered by +the Contracted Provider according to the terms of, and subject to the requirements set forth in, the Agreement and +this Compensation Schedule. Payment under this Compensation Schedule shall consist of the Allowed Amount as set +forth herein less all applicable Cost-Sharing Amounts. All capitalized terms used in this Compensation Schedule +shall have the meanings set forth in the Agreement, the applicable Product Attachment. or the Definitions section set +forth at the end of this Compensation Schedule. +The maximum compensation for professional Covered Services rendered to a Covered Person shall be the "Allowed +Amount." Except as otherwise provided in this Compensation Schedule. the Allowed Amount for professional +Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid +fee schedule. +Additional Provisions: +1. +Code Change Updates. Payor utilizes nationally recognized coding structures (including. without limitation, +revenue codes, CPT codes, HCPCS codes, ICD codes, national drug codes, ASA relative values, etc., or their +successors) for basic coding and descriptions of the services rendered. Updates to billing-related codes shall +become effective on the date ("Code Change Effective Date") that is the later of: (i) the first day of the month +following sixty (60) days after publication by the governmental agency having authority over the applicable +Product of such governmental agency's acceptance of such code updates, (ii) the effective date of such code +updates as determined by such governmental agency or (iii) if a date is not established by such governmental +agency or the applicable Product is not regulated by such governmental agency. the date that changes are made +to nationally recognized codes. Such updates may include changes to service groupings. Claims processed prior +to the Code Change Effective Date shall not be reprocessed to reflect any such code updates. +2. +Fee Change Updates. Updates to the fee schedule shall become effective on the effective date of such fee +schedule updates. as determined by the Payor ("Fee Change Effective Date"). The date of implementation of any +fee schedule updates. i.e. the date on which such fee change is first used for reimbursement ("Fee Change +Implementation Date"). shall be the later of: (i) the first date on which Payor is reasonably able to implement the +update in the claims payment system; or (ii) the Fee Change Effective Date. Claims processed prior to the Fee +Change implementation Date shall not be reprocessed to reflect any updates to such fee schedule. even if service +was provided after the Fee Change Effective Date. +3. +Modifier, Unless specifically indicated otherwise, fee amounts listed in the fee schedule represent global fees +and may be subject to reductions based on appropriate Modifier (for example, professional and technical +modifiers). As used in the previous sentence, "global fees" refers to services billed without a Modifier, for which +the fee amount includes both the professional component and the technical component. Any Cost-Sharing +Amounts that the Covered Person is responsible to pay under the Coverage Agreement will be subtracted from +the Allowed Amount in determining the amount to be paid. +4. +Anesthesia Modifier Pricing Rules. The dollar amount that will be used in the calculation of time-based and non- +time based anesthesia management fees in accordance with the anesthesia payment policy. Unless specifically +PPA (NE) - All Products 03/30/16 +Page 3 of 4 + +Start of Page No. = 4 +stated otherwise, the anesthesia conversion factor indicated is fixed and will not change. The anesthesia +conversion factor is based on an anesthesia time unit value of 15 minutes. +5. Payment for Multiple Procedures. Where multiple outpatient surgical or scope procedures performed on a +Covered Person during a single occasion of surgery, reimbursement will be as follows: i) the procedure for which +the Allowed Amount under this Compensation Schedule is greatest will be reimbursed at one hundred percent +(100%) of such Allowed Amount; and ii) the other procedures under this Compensation Schedule will each be +reimbursed at fifty percent (50%) of such Allowed Amounts.. +6. Place of Service Pricing Rules. This fee schedule follows CMS guidelines for determining when services are +priced at the facility or non-facility fee schedule (with the exception of services performed at Ambulatory Surgery +Centers. POS 24, which will be priced at the facility fee schedule). +7. Payment under this Compensation Schedule. All payments under this Compensation Schedule are subject to the +terms and conditions set forth in the Agreement. the Provider Manual and any applicable billing manual. +Definitions: +1. Allowed Amount means the amount designated in this Compensation Schedule as the maximum amount payable +to a Contracted Provider for any particular Covered Service provided to any particular Covered Person, pursuant +to this Agreement or its Attachments. +2. Allowable Charges means a Contracted Provider's billed charges for services that qualify as Covered Services. +3. Cost-Sharing Amounts means any amounts payable by a Covered Person. such as copayments. cost-sharing, +coinsurance, deductibles or other amounts that are the Covered Person's financial responsibility under the +applicable Coverage Agreement. if applicable. +PPA (NE) - All Products 03/30/16 +Page 4 of 4 \ No newline at end of file diff --git a/assets/sampleOne/cnc_50-16.pdf b/assets/sampleOne/cnc_50-16.pdf new file mode 100644 index 00000000..66374b38 Binary files /dev/null and b/assets/sampleOne/cnc_50-16.pdf differ diff --git a/assets/sampleOne/cnc_50-16.txt b/assets/sampleOne/cnc_50-16.txt new file mode 100644 index 00000000..0e38ee51 --- /dev/null +++ b/assets/sampleOne/cnc_50-16.txt @@ -0,0 +1,1533 @@ +Document Index +PARTICIPATING PROVIDER AGREEMENT 1 +ARTICLE I - SCDHHS MEDICAID REQUIREMENTS 1 +1 1SOUTH CAROLINA DEPARTMENT OF HEALTH AND HUMAN SERVICES REQUIRED 1SUBCONTRACT BOILERPLATE 1 +1.1 1DEFINITIONS 1 +2 3ADMINISTRATIVE REQUIREMENTS 3 +3 4HOLD HARMLESS 4 +1.4 5LAWS 5 +1.5 6AUDIT, RECORDS AND OVERSIGHT 6 +1.7 8BILLING A MEDICAID MANAGED CARE MEMBER 8 +2. 9PROVIDER SUBCONTRACTOR BOILERPLATE 9 +2.1 9HEALTHCARE SERVICES 9 +2.2 11PAYMENT 11 +ARTICLE II - DEFINITIONS 11 +ARTICLE) IV - CLAIMS SUBMISSION, PROCESSING, AND COMPENSATION 16 +ARTICLE V - RECORDS AND INSPECTIONS 17 +ARTICLE INSURANCE AND INDEMNIFICATION 17 +ARTICLE VII - DISPUTE RESOLUTION 18 +ARTICLE VIII - TERM AND TERMINATION 19 +ARTICLE IX - ISCELLANEOUS 20 +THIS AGREEMENT CONTAINS A BINDING ARBITRATION PROVISION 23THAT MAY BE ENFORCED BY THE PARTIES. 23 +HEALTH PLAN: 23 +PROVIDER: 23 +PARTICIPATING PROVIDER AGREEMENT 24 +SCHEDULE A 24CONTRACTED PROVIDER-SPECIFIC PROVISIONS 24 +PARTICIPATING PROVIDER AGREEMENT 27 +SCHEDULE B 27PRODUCT PARTICIPATION 27 +PARTICIPATING PROVIDER AGREEMENT 28 +PARTICIPATING PROVIDER AGREEMENT 29 +Attachment A: Medicaid 31 +EXHIBIT 1 31COMPENSATION SCHEDULE 31PRACTITIONER SERVICES 31BEHAVIORAL HEALTH 31 +Additional Provisions: 31 +Definitions: 32 + + + +Start of Page No. = 1 +PARTICIPATING PROVIDER AGREEMENT +This Participating Provider Agreement (together with all Attachments and amendments, this "Agreement") +is made and entered by and between Sample Name 1, PhD (known herein as "Medicaid Provider," "Provider" or +"SUBCONTRACTOR" and Sample Name 2, +Inc. (known herein as "CONTRACTOR", "Health Plan" or +"MCO") (each a "Party" and collectively the "Parties"). This Agreement is effective as of the date designated by +Health Plan on the signature page of this Agreement ("Effective Date"). +WHEREAS, Provider desires to provide certain health care services to individuals in products offered by or +available from or through a Company or Payor (as hereafter defined), and Provider desires to participate in such +products as a Participating Provider (as defined herein), all as hereinafter set forth. +WHEREAS, Health Plan desires for Provider to provide such health care services to individuals in such +products, and Health Plan desires to have Provider participate in certain of such products as a Participating +Provider, all as hereinafter set forth. +NOW, THEREFORE, in consideration of the recitals and mutual promises herein stated, the Parties hereby +agree to the provisions set forth below. +ARTICLE I - SCDHHS MEDICAID REQUIREMENTS +The provisions in this Section shall be primary and supersede any provision to the contrary which may occur in any +other section of this subcontract. +1 +SOUTH CAROLINA DEPARTMENT OF HEALTH AND HUMAN SERVICES REQUIRED +SUBCONTRACT BOILERPLATE +The following language is required by the South Carolina Department of Health and Human Services +((SCDHHS), heretofore referred to as the "Department") as a condition of participation in the Medicaid program as +a subcontractor of a Managed Care Organization. To the extent that any provision of this subcontract conflicts with +any provision or requirement set forth within this Section, the Department required language shall be controlling. +Any other provision in this agreement notwithstanding, in the event that the Department shall modify, amend, or +otherwise change the required subcontract language, as set forth in the MCO Contract, Subcontractor understands +and agrees that the Department required subcontract boilerplate shall be amended to conform to the Department's +requirements and standards, without the need for a signed, written amendment. +1.1 +DEFINITIONS +Action - As related to Grievance, either (1) the denial or limited authorization of a requested service, +including the type or level of service; (2) the reduction, suspension, or termination of a previously authorized +service; (3) the denial, in whole or in part, of payment for a service; (4) the failure to provide services in a timely +manner, as defined by the Department; (5) the failure of the CONTRACTOR to act within the timeframes provided +in §9.7.1 of the MCO Contract; or (6) for a resident of a rural area with only one CONTRACTOR, the denial of a +Medicaid Managed Care Member's request to exercise his or her right, under 42 CFR $438.52(b)(2)(ii), to obtain +services outside the CONTRACTOR's network. +Additional Services - A service(s) provided by the CONTRACTOR that is a non-covered service(s) by the +South Carolina State Plan for Medical Assistance and is offered to Medicaid Managed Care Members in +accordance with the standards and other requirements set forth in the Department's Medicaid Managed Care +Contract that are outlined in another section of this Contract. +PPA (SC) - Medicaid STD 05/01/2017 +Page 1 of 33 + +Start of Page No. = 2 +Administrative Services Contracts or Administrative Services Subcontracts - Are subcontracts or +agreement that include but are not limited to: 1) any function related to the management of the Medicaid Managed +Care Contract with the Department; 2) Claims processing including pharmacy claims; 3) credentialing including +those for only primary source verification; 4) all management Service Agreements; and 5) all Service Level +Agreements (SLAs) with any Division of Subsidiary of a corporate parent owner. +Clean Claim - A claim that can be processed without obtaining additional information from the Provider +of the service or from a third party. +Continuity of Care - The continuous treatment for a condition (such as pregnancy) or duration of illness +from the time of first contact with a healthcare provider through the point of release or long-term maintenance. +Emergency Medical Condition - A medical condition manifesting itself by acute symptoms of sufficient +severity (including severe pain) such that a prudent layperson, who possesses an average knowledge of health and +medicine, could reasonably expect the absence of immediate medical attention to result in: placing the health of the +individual (or, with respect to a pregnant woman, the health of the woman and/or her unborn child) in serious +jeopardy; serious impairment to bodily functions, or serious dysfunction of any bodily organ or part. +Emergency Services - Covered inpatient and outpatient services that are as follows: (1) furnished by a +provider that is qualified to furnish these services under this title; and (2) needed to evaluate or stabilize an +Emergency Medical Condition. +Federal Qualified Health Center (FQHC) - A South Carolina licensed health center certified by the +Centers for Medicare and Medicaid Services that receives Public Health Services grants. An FQHC provides a +wide range of primary care and enhanced services in a medically under-served area. +Grievance - An expression of dissatisfaction about any matter other than an Action. The term is also used +to refer to the overall system that includes grievances and appeals handled at the CONTRACTOR level. (Possible +subjects for Grievances include, but are not limited to, the quality of care or services provided, and aspects of +interpersonal relationships such as rudeness of a provider or employee, or failure to respect the Medicaid Managed +Care Member's rights.) +Medicaid Provider - A Provider of healthcare services or products which includes but is not limited to an +institution, facility, agency, person, corporation, partnership, practitioner, specialty physician, group or association +approved by the Department, licensed and/or credentialed which accepts as payment in full for providing benefits to +Medicaid Managed Care Members amounts pursuant to the CONTRACTOR's reimbursement provisions, business +requirements and schedules. +Managed Care Organization (MCO) - An entity that has, or is seeking to qualify for, a comprehensive +risk contract that is (1) a Federally qualified MCO that meets the advance directive requirements of subpart I of 42 +CFR Part 489; or (2) any public or private entity that meets the advance directives requirements and is determined +to also meet the following conditions: (a) makes the services it provides to its Medicaid Managed Care Members as +accessible (in terms of timeliness, amount, duration, and scope) as those services are to other Medicaid recipients +within the area serviced by the entity; and (b) meets the solvency standards of 42 CFR 438.116. This includes any +of the entity's employees, affiliated providers, agents, or CONTRACTORS. +Management Service Agreements - A type of subcontract with an entity in which the owner of the +CONTRACTOR delegates some or all of the comprehensive management and administrative services necessary for +the operation of the CONTRACTOR. +Medically Necessary Service - Those medical services which: (a) are essential to prevent, diagnose, +prevent the worsening of, alleviate, correct or cure medical conditions that endanger life, cause suffering or pain, +cause physical deformity or malfunction, threaten to cause or aggravate a handicap, or result in illness or infirmity +of a Medicaid Managed Care Member; (b) are provided at an appropriate facility and at the appropriate level of care +PPA (SC) - Medicaid STD 05/01/2017 +Page 2 of 33 + +Start of Page No. = 3 +for the treatment of the Medicaid Managed Care Member's medical condition; and, (c) are provided in accordance +with generally accepted standards of medical practice. +Medicaid Managed Care Member - An eligible person(s) who is enrolled with a Department approved +Medicaid Managed Care Organization (MCO, a.k.a. CONTRACTOR). For purpose of this subcontract, Medicaid +Managed Care Member shall include the patient, parent(s), guardian, spouse or any other person legally responsible +for the Medicaid Managed Care Member being served. +Minimum Subcontract Provision (MSP) - Minimum Service Provisions are detailed in subsection 2 +below. +Primary Care Provider (PCP) - The provider, serving as the entry point into the health care system, for +the Medicaid Managed Care Member responsible for providing primary care, coordinating and monitoring referrals +to specialist care, authorizing hospital services, and maintaining Continuity of Care. +Rural Health Clinic (RHC) - A South Carolina licensed rural health clinic is certified by the Centers for +Medicare and Medicaid Services and receiving Public Health Services grants. An RHC is eligible for state defined +cost based reimbursement from the Medicaid fee-for-service program. An RHC provides a wide range of primary +care and enhanced services in a medically underserved area. +Provider - The Healthcare Medicaid Provider who is providing services for the CONTRACTOR under +this Contract. +Service Level Agreement (SLA) - A type of subcontract with a corporate owner or any of its Divisions or +Subsidiaries that requires specific levels of service for administrative functions or services for the CONTRACTOR +specifically related to fulfilling the CONTRACTOR's obligations to the Department under the terms of this +Contract. +Subcontract - A written agreement between the CONTRACTOR and a third party to perform a part of the +CONTRACTOR's obligations as specified under the terms of this Contract. +Subcontractor - Any organization or person who provides any functions or service for the +CONTRACTOR specifically related to securing or fulfilling the CONTRACTOR's obligations to Department under +the terms of this Contract. +2 +ADMINISTRATIVE REQUIREMENTS +1.2.1 +The Department retains the right to review any and all subcontracts entered into for the provision +of any services under this Contract. +1.2.2 +The Department does not require the Subcontractor to participate in any other line of business (i.e. +Medicare Advantage or commercial) offered by the CONTRACTOR in order to enter into a +business relationship with the CONTRACTOR. +1.2.3 The Department does not require the Subcontractor to participate in the Network of any other +Managed Care Organization as a condition of doing business with CONTRACTOR. +1.2.4 The CONTRACTOR and the Subcontractor shall be responsible for resolving any disputes that +may arise between the two (2) parties, and no dispute shall disrupt or interfere with the Continuity +of Care of a Medicaid Managed Care Member. Subcontractor recognizes and agrees that it does +not have a right to a State Fair Hearing before the Department's Division of Appeals and Hearings. +1.2.5 +The Subcontractor represents and covenants that it presently has no interest and shall not acquire +any interest, direct or indirect, which would conflict in any manner or degree with the performance +PPA (SC) - Medicaid STD 05/01/2017 +Page 3 of 33 + +Start of Page No. = 4 +of its services hereunder. The Subcontractor further covenants that, in the performance of this +Contract, no person having any such known interests shall be employed. +1.2.6 +The Subcontractor recognizes that in the event of termination of the Department's Medicaid +Managed Care Contract between the CONTRACTOR and Department, the CONTRACTOR is +required to make available to the Department or its designated representative, in a usable form, any +and all records, whether medical or financial, related to the CONTRACTORS and Subcontractor's +activities undertaken pursuant to this Contract. The Provider agrees to furnish any records to the +CONTRACTOR that the CONTRACTOR would need in order to comply with this provision. The +provision of such records shall be at no expense to the Department. +1.2.7 In the event of termination of this Subcontract, the Department must be notified of the intent to +terminate this Contract one hundred and twenty (120) calendar days prior to the effective date of +termination. The date of termination will be at midnight on the last day of the month of +termination. +1.2.8 +If the termination of this Contract is as a result of a condition or situation that would have an +adverse impact on the health and safety of Medicaid Managed Care Members, the termination shall +be effective immediately and the Department will be immediately notified of the termination and +provided any information requested by Department. +1.2.9 +The Contractor and Subcontractor shall develop, maintain and use a system for Prior Authorization +and Utilization Management that is consistent with this Subcontract. +3 +HOLD HARMLESS +1.3.1 +At all times during the term of this Contract, the Subcontractor shall, except as otherwise +prohibited or limited by law, indemnify, defend, protect, and hold harmless the Department and +any of its officers, agents, and employees from: +1.3.1.1 +Any claims for damages or losses arising from services rendered by any subcontractor, +person, or firm performing or supplying services, materials, or supplies for the +Subcontractor in connection with the performance of this Contract; +1.3.1.2 +Any claims for damages or losses to any person or firm injured or damaged by +erroneous or negligent acts, including disregard of state or federal Medicaid +regulations or legal statutes, by the Subcontractor, its agents, officers, employees, or +subcontractors in the performance of this Contract; +1.3.1.3 +Any claims for damages or losses resulting to any person or firm injured or damaged +by Subcontractor, its agents, officers, employees, or subcontractors by the publication, +translation, reproduction, delivery, performance, use, or disposition of any data +processed under this Contract in a manner not authorized by the Contract or by federal +or state regulations or statutes; +1.3.1.4 +Any failure of the Subcontractor, its agents, officers, employees, or subcontractors to +observe the federal or state laws, including, but not limited to, labor laws and +minimum wage laws; +1.3.1.5 +Any claims for damages, losses, or costs associated with legal expenses, including, but +not limited to, those incurred by or on behalf of the Department in connection with the +defense of claims for such injuries, losses, claims, or damages specified above; +PPA (SC) - Medicaid STD 05/01/2017 +Page 4 of 33 + +Start of Page No. = 5 +1.3.1.6 +Any injuries, deaths, losses, damages, claims, suits, liabilities, judgments, costs and +expenses which may in any manner accrue against the Department or their agents, +officers or employees, through the intentional conduct, negligence or omission of the +Subcontractor, its agents, officers, employees or subcontractors. +1.3.2 As required by the South Carolina Attorney General (SCAG), in circumstances where the +Subcontractor is a political subdivision of the State of South Carolina, or an affiliate organization, +except as otherwise prohibited by law, neither Subcontractor nor the Department shall be liable for +any claims, demands, expenses, liabilities and losses (including reasonable attorney's fees) which +may arise out of any acts or failures to act by the other party, its employees or agents, in connection +with the performance of services pursuant to this Contract. +1.3.3 +It is expressly agreed that the CONTRACTOR, Subcontractor and agents, officers, and employees +of the CONTRACTOR or Subcontractor in the performance of this Contract shall act in an +independent capacity and not as officers and employees of the Department or the State of South +Carolina. It is further expressly agreed that this Contract shall not be construed as a partnership or +joint venture between the CONTRACTOR or Subcontractor and the Department and the State of +South Carolina. +1.4 +LAWS +1.4.1 +The Subcontractor shall recognize and abide by all state and federal laws, regulations and the +Department's guidelines applicable to the provision of services under the Medicaid Managed Care +Program. +1.4.2 The Subcontractor must comply with all applicable statutory and regulatory requirements of the +Medicaid program and be eligible to participate in the Medicaid program. +1.4.3 +This Subcontract shall be subject to and hereby incorporates by reference all applicable federal and +state laws, regulations, policies, and revisions of such laws or regulations shall automatically be +incorporated into the Subcontract as they become effective. +1.4.4 The Subcontractor represents and warrants that it has not been excluded from participation in the +Medicare and/or Medicaid program pursuant to 1128 (42 U.S.C. 1320a-7) (2001, as amended) +or 1156 (42 U.S.C. 1320 c-5) (2001, as amended) of the Social Security Act or is not otherwise +barred from participation in the Medicaid and/or Medicare program. +1.4.5 The Subcontractor also represents and warrants that it has not been debarred, suspended or +otherwise excluded from participating in procurement activities under the Federal Acquisition +Regulation or from non-procurement activities under regulations issued under Executive Orders. +1.4.6 +The Subcontractor shall not have a Medicaid contract with the Department that was terminated, +suspended, denied, or not renewed as a result of any action of Center for Medicare and Medicaid +Services (CMS), United States Department of Health and Human Services (HHS), or the Medicaid +Fraud Unit of the Office of the South Carolina Attorney General. Subcontractors who have been +sanctioned by any state or federal controlling agency for Medicaid and/or Medicare fraud and +abuse and are currently under suspension shall not be allowed to participate in the Medicaid +Managed Care Program. In the event the Subcontractor is suspended, sanctioned or otherwise +excluded during the term of this Contract, the Subcontractor shall immediately notify the +CONTRACTOR in writing. +1.4.7 +The Subcontractor ensures that it does not employ individuals who are debarred, suspended, or +otherwise excluded from participating in federal procurement activities and/or have an +PPA (SC) - Medicaid STD 05/01/2017 +Page 5 of 33 + +Start of Page No. = 6 +employment, consulting, or other Contract with debarred individuals for the provision of items and +services that are significant to the CONTRACTOR's contractual obligation. +1.4.8 +The Subcontractor shall check the Excluded Parties List Service administered by the General +Services Administration, when it hires any employee or contracts with any Subcontractor, to ensure +that it does not employ individuals or use Subcontractors who are debarred, suspended, or +otherwise excluded from participating in federal procurement activities and/or have an +employment, consulting, or other contract with debarred individuals for the provision of items and +services that are significant to Subcontract's contractual obligation. The Subcontractor shall also +report to the CONTRACTOR any employees or Subcontractors that have been debarred, +suspended, and/or excluded from participation in Medicaid, Medicare, or any other federal +program. +1.4.9 +In accordance with 42 CFR $455.104 (2010, as amended), the Subcontractor agrees to provide full +and complete ownership and disclosure information with the execution of this Contract and to +report any ownership changes within thirty-five (35) calendar days to the CONTRACTOR. +Provider must download the appropriate form from the CONTRACTOR's website or request a +printed copy be sent. Failure by the Provider to disclose this information may result in termination +of this Contract. +1.4.10 It is mutually understood and agreed that all contract language, specifically required by the +Department, shall be governed by the laws and regulations of the State of South Carolina both as to +interpretation and performance by Subcontractor. Any action at law, suit in equity, or judicial +proceeding for the enforcement of the Department required language shall be instituted only in the +courts of the State of South Carolina. +1.5 +AUDIT, RECORDS AND OVERSIGHT +1.5.1 +The Subcontractor shall maintain an adequate record system for recording services, service +providers, charges, dates and all other commonly accepted information elements for services +rendered to Medicaid Managed Care Members pursuant to this Contract (including, but not limited +to, such records as are necessary for the evaluation of the quality, appropriateness, and timeliness +of services performed). Medicaid Managed Care Members and their representatives shall be given +access to and can request copies of the Medicaid Managed Care Members' medical records, to the +extent and in the manner provided by S.C. Code Ann. 44-115-10 et. seq., (Supp. 2000, as +amended). +1.5.2 +The Department (SCDHHS), HHS, CMS, the Office of Inspector General, the State Comptroller, +the State Auditor's Office, and the South Carolina Attorney General's (SCAG) Office shall have the +right to evaluate, through audit, inspection, or other means, whether announced or unannounced, +any records pertinent to this Contract, including those pertaining to quality, appropriateness and +timeliness of services and the timeliness and accuracy of encounter data and claims submitted to +the CONTRACTOR. The Subcontractor shall cooperate with these evaluations and inspections. +The Subcontractor will make office workspace available for any of the above-mentioned entities or +their designees when the entities are inspecting or reviewing any records related to the provision of +services under this Contract. +1.5.3 +The Subcontractor will allow the Department and the U.S. Department of Health and Human +Services, or their designee, to inspect and audit any financial records and/or books pertaining to: 1) +the ability of the Subcontractor to ear the risk of financial loss; and 2) services performed or +payable amounts under the contract. +1.5.4 +Whether announced or unannounced, the Subcontractor shall participate and cooperate in any +internal and external quality assessment review, utilization management, and Grievance procedures +established by the CONTRACTOR or its designee. +PPA (SC) - Medicaid STD 05/01/2017 +Page 6 of 33 + +Start of Page No. = 7 +1.5.5 The Subcontractor shall comply with any plan of correction initiated by the CONTRACTOR +and/or required by the Department. +1.5.6 +All records originated or prepared in connection with the Subcontractor's performance of its +obligations under this Contract, including, but not limited to, working papers related to the +preparation of fiscal reports, medical records, progress notes, charges, journals, ledgers, and +electronic media, will be retained and safeguarded by the Subcontractor in accordance with the +terms and conditions of this Contract. The Subcontractor agrees to retain all financial and +programmatic records, supporting documents, statistical records and other records of Medicaid +Managed Care Members relating to the delivery of care or service under this Contract, and as +further required by the Department, for a period of five (5) years from the expiration date of the +Contract, including any Contract extension(s). If any litigation, claim, or other actions involving +the records have been initiated prior to the expiration of the five (5) year period, the records shall +be retained until completion of the action and resolution of all issues which arise from it or until the +end of the five (5) year period, whichever is later. If Subcontractor stores records on microfilm or +microfiche, the Subcontractor must produce, at its expense, legible hard copy records upon the +request of state or federal authorities, within fifteen (15) calendar days of the request. +1.5.7 +The Department and/or any designee will also have the right to: +1.5.7.1 +Inspect and evaluate the qualifications and certification or licensure of +Subcontractors; +1.5.7.2 +Evaluate, through inspection of Subcontractor's facilities or otherwise, the +appropriateness and adequacy of equipment and facilities for the provision of +quality health care to Medicaid Managed Care Members; +1.5.7.3 +Audit and inspect any of Subcontractor's records that pertain to health care or +other services performed under this Contract, determine amounts payable under +this Contract; +1.5.7.4 +Audit and verify the sources of encounter data and any other information furnished +by Subcontractor or CONTRACTOR in response to reporting requirements of this +Contract or the Department's Medicaid Managed Care Contract, including data +and information furnished by Subcontractors. +1.5.8 +Subcontractor shall release medical records of Medicaid Managed Care Members, as may be +authorized by the Medicaid Managed Care Member or as may be directed by authorized personnel +of the Department, appropriate agencies of the State of South Carolina, or the United States +Government. Release of medical records shall be consistent with the provisions of confidentiality +as expressed in this Contract. +1.5.9 +Subcontractor shall maintain up-to-date medical records at the site where medical services are +provided for each Medicaid Managed Care Member for whom services are provided under this +Contract. Each Medicaid Managed Care Member's record must be legible and maintained in detail +consistent with good medical and professional practice that permits effective internal and external +quality review and/or medical audit and facilitates an adequate system of follow-up treatment. The +Department's representatives or designees shall have immediate and complete access to all records +pertaining to the health care services provided to the Medicaid Managed Care Member. +1.6 +SAFEGUARDING INFORMATION +1.6.1 +The Subcontractor shall safeguard information about Medicaid Managed Care Members according +to applicable state and federal laws and regulations including but not limited to 42 CFR 431, +Subpart F, and Health Insurance Portability and Accountability Act, 45 CFR Parts 160 and 164. +PPA (SC) - Medicaid STD 05/01/2017 +Page 7 of 33 + +Start of Page No. = 8 +1.6.2 +The Subcontractor shall assure that all material and information, in particular information relating +to Medicaid Managed Care Members, which is provided to or obtained by or through the +Subcontractor's performance under this Contract, whether verbal, written, electronic file, or +otherwise, shall be protected as confidential information to the extent confidential treatment is +protected under state and federal laws. Subcontractor shall not use any information so obtained in +any manner except as necessary for the proper discharge of its obligations and securement of its +rights under this Contract. +1.6.3 +All information as to personal facts and circumstances concerning Medicaid Managed Care +Members obtained by the Subcontractor shall be treated as privileged communications, shall be +held confidential, and shall not be divulged to third parties without the written consent of the +Department or the Medicaid Managed Care Member, provided that nothing stated herein shall +prohibit the disclosure of information in summary, statistical, or other form which does not identify +particular individuals. The use or disclosure of information concerning Mcdicaid Managed Care +Members shall be limited to purposes directly connected with the administration of this Contract. +1.6.4 +All records originated or prepared in connection with the Subcontractor's performance of its +obligations under this Contract, including but not limited to, working papers related to the +preparation of fiscal reports, medical records, progress notes, charges, journals, ledgers, and +electronic media, will be retained and safeguarded by the Subcontractor in accordance with the +terms and conditions of this Contract. +1.7 +BILLING A MEDICAID MANAGED CARE MEMBER +1.7.1 The Subcontractor may bill a Medicaid Managed Care Member only under the following +circumstances: +1.7.1.1 +Subcontractor is a provider of services and is seeking to render services that are +non-covered services and are not Additional Services, as long as the Subcontractor +provides to the Medicaid Managed Care Member a written statement of the +services prior to rendering said services. This written statement must include: (1) +the cost of each service, (2) an acknowledgement of the Medicaid Managed Care +Member's responsibility for payment, and (3) the Medicaid Managed Care +Member's signature; or +1.7.1.2 +Subcontractor is a provider of services and the service provided has a co-payment, +as allowed by the CONTRACTOR, the Subcontractor may charge the Medicaid +Managed Care Member only the amount of the allowed co-payment, which cannot +exceed the co-payment amount allowed by the Department. +1.7.2 In accordance with the requirements of S.C. Code Ann. § 38-33-130(b) (Supp. 2001, as amended), +and as a condition of participation as a qualified Medicaid Provider, the Subcontractor hereby +agrees not to bill, charge, collect a deposit from, seek compensation, remuneration or +reimbursement from, or have recourse against, Medicaid Managed Care Members, or persons +acting on their behalf, for health care services which are rendered to such Medicaid Managed Care +Members by the Subcontractor, and which are covered benefits under the Medicaid Managed Care +Member's evidence of coverage. This provision applies to all covered health care services +furnished to the Medicaid Managed Care Member for which the Department does not pay the +CONTRACTOR or the CONTRACTOR does not pay the Subcontractor. Provider agrees that this +provision is applicable in all circumstances including, but not limited to, non-payment by the +CONTRACTOR and insolvency of the CONTRACTOR. The Subcontractor further agrees that this +provision shall be construed to be for the benefit of Medicaid Managed Care Members and that this +provision supersedes any oral or written contrary agreement now existing or hereafter entered into +between the Subcontractor and such Medicaid Managed Care Members. +PPA (SC) - Medicaid STD 05/01/2017 +Page 8 of 33 + +Start of Page No. = 9 +2. +PROVIDER SUBCONTRACTOR BOILERPLATE +2.1 +HEALTHCARE SERVICES +2.1.1 +The Subcontractor shall ensure adequate access to the services provided under this Contract in +accordance with the prevailing medical community standards. +2.1.2 The services covered by this Contract must be in accordance with the South Carolina State Plan for +Medical Assistance under Title XIX of the Social Security Act, and the Subcontractor shall provide +these services to Medicaid Managed Care Members through the last day that this Contract is in +effect. All final Medicaid benefit determinations are within the sole and exclusive authority of the +Department or its designee. +2.1.3 +The Subcontractor may not refuse to provide Medically Necessary Services or covered preventive +services to Medicaid Managed Care Members for non-medical reasons. +2.1.4 +The Subcontractor shall render Emergency Services without the requirement of prior authorization +of any kind. +2.1.5 +The Subcontractor shall not be prohibited or otherwise restricted from advising a Medicaid +Managed Care Member about the health status of the Medicaid Managed Care Member or medical +care or treatment for the Medicaid Managed Care Member's condition or disease, regardless of +whether benefits for such care or treatment are provided under the Department's Medicaid +Managed Care Contract, if Provider is acting within the lawful scope of practice. +2.1.6 +The CONTRACTOR shall not include covenant-not-to-compete requirements or exclusive +provider clauses in its Provider agreements. Specifically, the CONTRACTOR is precluded from +requiring that the Provider not provide services for any other South Carolina Medicaid Managed +Care CONTRACTOR. In addition, the CONTRACTOR shall not enter into subcontracts that +contain compensation terms that discourage providers from serving any specific eligibility +category. No provision in this subcontract shall create a covenant-not-to-compete agreement or +exclusive provider clause. +2.1.7 The Subcontractor must take adequate steps to ensure that Medicaid Managed Care Members with +limited English skills receive, free of charge, the language assistance necessary to afford them +meaningful and equal access to the benefits and services provided under this Contract in +accordance with Title VI of the Civil Rights Act of 1964 (42 U.S.C. 2000d et. seq.) (2001, as +amended) and it's implementing regulation at 45 C.F.R. Part 80 (2001, as amended). +2.1.8 +The Subcontractor shall provide effective Continuity of Care activities, if applicable, that seek to +ensure that the appropriate personnel, including the PCP are kept informed of the Medicaid +Managed Care Member's treatment needs, changes, progress or problems. +2.1.9 The Subcontractor must adhere to the Quality Assessment Performance Improvement and +Utilization Management (UM) requirements consistent with this Contract. The CONTRACTOR is +responsible for informing the Subcontractor of such requirements and procedures, including any +reporting requirements. +2.1.10 The Subcontractor shall have an appointment system for Medically Necessary Services that is in +accordance with the standards in this Contract and prevailing medical community standards. +2.1.11 The Subcontractor shall not use discriminatory practices with regard to Medicaid Managed Care +Members such as separate waiting rooms, separate appointment days, or preference to private pay +patients. +PPA (SC) - Medicaid STD 05/01/2017 +Page 9 of 33 + +Start of Page No. = 10 +2.1.12 The Subcontractor must identify Medicaid Managed Care Members in a manner that will not result +in discrimination against the Medicaid Managed Care Member in order to provide or coordinate the +provision of all core benefits and/or Additional Services and out of plan services. +2.1.13 The Subcontractor agrees that no person, on the grounds of handicap, age, race, color, religion, sex, +or national origin, shall be excluded from participation in, or be denied benefits of the +CONTRACTOR's program or be otherwise subjected to discrimination in the performance of this +Contract or in the employment practices of Provider. The Subcontractor shall show proof of such +non-discrimination, upon request, and shall post in conspicuous places, available to all employees +and applicants, notices of non-discrimination. +2.1.14 If the Subcontractor performs laboratory services, the Subcontractor must meet all applicable state +and federal requirements related thereto. All laboratory-testing sites providing services shall have +either a CLIA certificate or waiver of a certificate of registration along with a CLIA identification +number. +2.1.15 If the Subcontractor is a hospital, Provider shall notify the CONTRACTOR and the Department of +the births when the mother is a Medicaid Managed Care Member. The Subcontractor shall also +complete a Department request for Medicaid ID Number (Form 1716 ME), including indicating +whether the mother is a Medicaid Managed Care Member, and submit the form to the local/state +Department office. +2.1.16 If the Subcontractor is an FQHC/RHC, Provider shall adhere to federal requirements for +reimbursement for FQHC/RHC services. This Contract shall specify the agreed upon payment from +the CONTRACTOR to the FQHC/RHC. Any bonus or incentive arrangements made to the +FQHCs/RHCs associated with Medicaid Managed Care Members must also be specified and +included this Contract. +2.1.17 If the Subcontractor is a PCP, the Provider shall have an appointment system for covered core +benefits and/or Additional Services that is in accordance with prevailing medical community +standards but shall not exceed the following requirements: +2.1.17.1 +Routine visits scheduled within four (4) to six (6) weeks. +2.1.17.2 +Urgent, non-emergency visits within forty-eight (48) hours. +2.1.17.3 +Emergent or emergency visits immediately upon presentation at a service delivery +site. +2.1.17.4 +Waiting times that do not exceed forty-five (45) minutes for a scheduled +appointment of a routine nature. +2.1.17.5 +Walk-in patients with non-urgent needs should be seen if possible or scheduled for +an appointment consistent with written scheduling procedures. +2.1.17.6 +Walk-in patients with urgent needs should be seen within forty-eight (48) hours. +2.1.18 As a PCP, the Provider must also provide twenty-four (24) hour coverage but may elect to provide +twenty-four (24) hour coverage by direct access or through arrangement with a triage system. The +triage system arrangement must be prior approved by the CONTRACTOR. +2.1.19 The Subcontractor shall submit all reports and clinical information required by the +CONTRACTOR, including Early Periodic Screening, Diagnosis, and Treatment (EPSDT), if +applicable. +PPA (SC) - Medicaid STD 05/01/2017 +Page 10 of 33 + +Start of Page No. = 11 +2.2 +PAYMENT +2.2.1 +CONTRACTOR, or its designee, shall be responsible for payment of services rendered to Medicaid +Managed Care Members in accordance with this subcontract and shall pay ninety percent (90%) of +all Clean Claims from practitioners, either in individual or group practice or who practice in shared +health facilities, within thirty (30) days of the date of receipt. The CONTRACTOR shall pay +ninety-nine percent (99%) of all Clean Claims from practitioners, either in individual or group +practice or who practice in shared health facilities, within ninety (90) days of the date of receipt. +The date of receipt is the date the CONTRACTOR receives the claim, as indicated by its data +stamp on the claim. The date of payment is the date of the check or other form of payment. +2.2.2 +The Subcontractor and provider may, by mutual written agreement, establish an alternative +payment schedule to the one presented. +2.2.3 +The Subcontractor shall accept payment made by the CONTRACTOR as payment-in-full for +covered services and Additional Services provided and shall not solicit or accept any surety or +guarantee of payment from the Medicaid Managed Care Member, except a specifically allowed by +1.7, Billing A Medicaid Managed Care Member. +2.2.4 +No Subcontract shall not contain any provision that provides incentives, monetary or otherwise, for +the withholding of Medically Necessary Services. +2.2.5 Any incentive plans for providers shall be in compliance with 42 CFR Part 434 (2009, as +amended), 42 CFR § 417.479 (2008, as amended), 42 CFR 422.208 and 42 CFR $422.210 (2008, +as amended). +ARTICLE II - DEFINITIONS +As used in this Agreement and each of its Attachments, each of the following terms (and the plural thereof, +when appropriate) shall have the meaning set forth herein. +2.1. +"Affiliate" means a person or entity directly or indirectly controlling, controlled by, or under +common control with Health Plan. +2.2. +"Attachment" means any document, including an addendum, schedule or exhibit, attached to this +Agreement as of the Effective Date or that becomes attached pursuant to Section 3.2 or Section 9.7, all of which are +incorporated herein by reference and may be amended from time to time as provided in this Agreement. +2.3. +"Clean Claim" has, as to each particular Product, the meaning set forth in the applicable Product +Attachment or, if no such definition exists, the Provider Manual. +2.4. +"Company" means, as appropriate in the context, Health Plan and/or one or more of its Affiliates, +except those specifically excluded by Health Plan. +2.5. +"Compensation Schedule" means at any given time the then effective schedule(s) of maximum +rates applicable to a particular Product under which Provider and Contracted Providers will be compensated for the +provision of Covered Services to Medicaid Managed Care Members. Such Compensation Schedule(s) will be set +forth or described in one or more Attachments to this Agreement, and may be included within a Product +Attachment. +2.6. +"Contracted Provider" means a physician, hospital, health care professional or any other provider +of items or services that is employed by or has a contractual relationship with Provider. The term "Contracted +Provider" includes Provider for those Covered Services provided by Provider. +PPA (SC) - Medicaid STD 05/01/2017 +Page 11 of 33 + +Start of Page No. = 12 +2.7. +"Coverage Agreement" means any agreement, program or certificate entered into, issued or agreed +to by Company or Payor, under which Company or Payor furnishes administrative services or other services in +support of a health care program for an individual or group of individuals, and which may include access to one or +more of Company's provider networks or vendor arrangements, except those excluded by Health Plan. +2.8. +"Covered Services" means those services and items for which benefits are available and payable +under the applicable Coverage Agreement and which are determined, if applicable, to be Medically Necessary. +2.9. +"Medically Necessary" or "Medical Necessity" shall have the meaning defined in the applicable +Coverage Agreement or applicable Regulatory Requirements. +2.10. "Participating Provider" means, with respect to a particular Product, any physician, hospital, +ancillary, or other health care provider that has contracted, directly or indirectly, with Health Plan to provide +Covered Services to Medicaid Managed Care Members, that has been approved for participation by Company, and +that is designated by Company as a "participating provider" in such Product. +2.11. "Payor" means the entity (including Company where applicable) that bears direct financial +responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered +Services rendered to Medicaid Managed Care Members under a Coverage Agreement and, if such entity is not +Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or +other services with respect to such Coverage Agreement. +2.12. +"Payor Contract" means the contract with a Payor, pursuant to which Company furnishes +administrative services or other services in support of the Coverage Agreements entered into, issued or agreed to by +a Payor, which services may include access to one or more of Company's provider networks or vendor +arrangements, except those excluded by Health Plan. The term "Payor Contract" includes Company's or other +Payor's contract with a governmental authority (also referred to herein as a "Governmental Contract") under which +Company or Payor arranges for the provision of Covered Services to Medicaid Managed Care Members. +2.13. +"Product" means any program or health benefit arrangement designated as a "product" by Health +Plan (e.g., Health Plan Product, Medicaid Product, PPO Product, Payor-specific Product, etc.) that is now or +hereafter offered by or available from or through Company (and includes the Coverage Agreements that access, or +are issued or entered into in connection with such product, except those excluded by Health Plan). +2.14. +"Product Attachment" means an Attachment setting forth requirements, terms and conditions +specific or applicable to one or more Products, including certain provisions that must be included in a provider +agrecment under the Regulatory Requirements, which may be alternatives to, or in addition to, the requirements, +terms and conditions set forth in this Agreement or the Provider Manual. +2.15. "Provider Manual" means the provider manual and any billing manuals, adopted by Company or +Payor which include, without limitation, requirements relating to utilization management, quality management, +grievances and appeals, and Product-specific, Payor-specific and State-specific requirements, as may be amended +from time to time by Company or Payor. +2.16. +"Regulatory Requirements" means all applicable federal and state statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and standards and +requirements of any accrediting or certifying organization, including, but not limited to, the requirements set forth +in a Product Attachment. +2.17. +"State" is defined as the state identified in the applicable Attachment. +ARTICLE III - PRODUCTS AND SERVICES +PPA (SC) - Medicaid STD 05/01/2017 +Page 12 of 33 + +Start of Page No. = 13 +3.1. +Contracted Providers. Provider shall, and shall cause each Contracted Provider, to comply with +and abide by the agreements, representations, warranties, acknowledgements, certifications, terms and conditions of +this Agreement (including the provisions of Schedule A that are applicable to Provider, a Contracted Provider, or +their services, and any other Attachments), and the Provider Manual, and fulfill all of the duties, responsibilities and +obligations imposed on Provider and Contracted Providers under this Agreement (including each Attachment), and +the Provider Manual. +3.2. +Participation in Products. Subject to the other provisions of this Agreement, each Contracted +Provider may be identified as a Participating Provider in the Product identified designated on Schedule B of this +Agreement or added to this Agreement in accordance with Section 2.2 hereof. +3.2.1. Provider shall, at all times during the term of this Agreement, require each of its +Contracted Providers to, subject to Company's approval, participate as Participating Providers in the Product +identified that is designated on Schedule B to this Agreement or added to this Agreement in accordance with +Section 3.2 hereof. +3.2.2. A Contracted Provider may only identify itself as a Participating Provider for those +Products in which the Contracted Provider actually participates as provided in this Agreement. Provider +acknowledges that Company or Payor may have, develop or contract to develop various Products or provider +networks that have a variety of provider panels, program components and other requirements. No Company or +Payor warrants or guarantees that any Contracted Provider: (i) will participate in all or a minimum number of +provider panels, (ii) will be utilized by a minimum number of Medicaid Managed Care Members, or (iii) will +indefinitely remain a Participating Provider or member of the provider panel for a particular network or Product. +3.2.3. +Attached hereto as Schedule C-1 is the initial list of the Contracted Providers as of the +Effective Date. Provider shall provide Health Plan, from time to time or on a periodic basis as requested by Health +Plan, with a complete and accurate list containing the names, office telephone numbers, addresses, tax identification +numbers, hospital affiliations, specialties and board status (if applicable), State license number, and National +Provider Identifier of Contracted Providers and such other information as mutually agreed upon by the Parties, and +shall provide Health Plan with a list of modifications to such list at least thirty (30) days prior to the effective date +of such changes, when possible. Provider shall provide such lists in a manner and format mutually acceptable to +the Parties. +3.2.4. Provider may add new providers to this Agreement as Contracted Providers. In such case, +Provider shall provide written notice to Health Plan of the prospective addition(s), and shall use best efforts to +provide such notice at least sixty (60) days in advance of such addition. Provider shall maintain written agreements +with each of its Contracted Providers (other than Provider) that require the Contracted Providers to comply with the +terms and conditions of this Agreement and that address and comply with the Regulatory Requirements. +3.2.5. If Company desires to add one or more Contracted Providers to an additional Product, +Company or Payor, as applicable, will provide advance written notice (electronic or paper) thereof to Provider, +along with the applicable Product Attachment and the new Compensation Schedule, if any. The applicable +Contracted Providers will not be designated as Participating Providers in such additional Product if Provider opts +out of such additional Product by giving Company or Payor, as applicable, written notice of its decision to opt-out +within thirty (30) days of Company's or Payor's, as applicable, giving of written notice. If Provider timely +provides such opt-out notice, the applicable Contracted Providers will not be considered Participating Providers in +such Product. If Provider does not timely provide such opt-out notice, then each applicable Contracted Provider +shall be a Participating Provider in such additional Product on the terms and conditions set forth in this Agreement +and the applicable Product Attachment. +3.3. Covered Services. Each Contracted Provider shall provide Covered Services described or +referenced in the applicable Product Attachment(s) to Medicaid Managed Care Members in those Products in which +the Contracted Provider is a Participating Provider, in accordance with this Agreement. Each Contracted Provider +shall provide Covered Services to Medicaid Managed Care Members with the same degree of care and skill as +PPA (SC) - Medicaid STD 05/01/2017 +Page 13 of 33 + +Start of Page No. = 14 +customarily provided to patients who are not Medicaid Managed Care Members, within the scope of the Contracted +Provider's license and in accordance with generally accepted standards of the Contracted Provider's practice and +business and in accordance with the provisions of this Agreement, the Provider Manual, and Regulatory +Requirements. +3.4. +Provider Manual; Policies and Procedures. Provider and Contracted Providers shall at all times +cooperate and comply with the requirements, policies, programs and procedures ("Policies") of Company and +Payor, which may be described in the Provider Manual and include, but are not limited to, the following: +credentialing criteria and requirements; notification requirements; medical management programs; claims and +billing, quality assessment and improvement, utilization review and management, disease management, case +management, on-site reviews, referral and prior authorization, and grievance and appeal procedures; coordination +of benefits and third party liability policies; carve-out and third party vendor programs; and data reporting +requirements. The failure to comply with such Policies could result in a denial or reduction of payment to the +Provider or Contracted Provider or a denial or reduction of the Medicaid Managed Care Member's benefits. Such +Policies do not in any way affect or remove the obligation of Contracted Providers to render care. Health Plan +shall make the Provider Manual available to Provider and Contracted Providers via one or more designated +websites or alternative means. Upon Provider's reasonable request, Health Plan shall provide Provider with a copy +of the Provider Manual. In the event of a material change to the Provider Manual, Health Plan will use reasonable +efforts to notify Provider in advance of such change. Such notice may be given by Health Plan through a periodic +provider newsletter, an update to the on-line Provider Manual, or any other written method (electronic or paper). +3.5. +Credentialing Criteria. Provider and each Contracted Provider shall complete Company's and/or +Payor's credentialing and/or recredentialing process as required by Company's and/or Payor's credentialing +Policies, and shall at all times during the term of this Agreement meet all of Company's and/or Payor's +credentialing criteria. Provider and each Contracted Provider represents, warrants and agrees: (a) that it is +currently, and for the duration of this Agreement shall remain: (i) in compliance with all applicable Regulatory +Requirements, including licensing laws; (ii) if applicable, accredited by The Joint Commission or the American +Osteopathic Association; and (iii) a Medicare participating provider under the federal Medicare program and a +Medicaid participating provider under applicable federal and State laws; and (b) that all Contracted Providers and +all employees and contractors thereof will perform their duties in accordance with all Regulatory Requirements, as +well as applicable national, State and local standards of professional ethics and practice. No Contracted Provider +shall provide Covered Services to Medicaid Managed Care Members or identify itself as a Participating Provider +unless and until the Contracted Provider has been notified, in writing, by Company that such Contracted Provider +has successfully completed Company's credentialing process. +3.6. +Eligibility Determinations. Provider or Contracted Provider shall timely verify whether an +individual seeking Covered Services is a Medicaid Managed Care Member. Company or Payor, as applicable, will +make available to Provider and Contracted Providers a method, whereby Provider and Contracted Providers can +obtain, in a timely manner, general information about eligibility and coverage. Company or Payor, as applicable, +does not guarantee that persons identified as Medicaid Managed Care Members are eligible for benefits or that all +services or supplies are Covered Services. If Company, Payor or its delegate determines that an individual was not +a Medicaid Managed Care Member at the time services were rendered, such services shall not be eligible for +payment under this Agreement. In addition, Company will use reasonable efforts to include or contractually require +Payors to clearly display Company's name, logo or mailing address (or other identifier(s) designated from time to +time by Company) on each membership card. +3.7. +Referral and Preauthorization Procedures. Provider and Contracted Providers shall comply with +referral and preauthorization procedures adopted by Company and or Payor, as applicable, prior to referring a +Medicaid Managed Care Member to any individual, institutional or ancillary health care provider. Unless +otherwise expressly authorized in writing by Company or Payor, Provider and Contracted Providers shall refer +Medicaid Managed Care Members only to Participating Providers to provide the Covered Service for which the +Medicaid Managed Care Member is referred. Except as required by applicable law, failure of Provider and +Contracted Providers to follow such procedures may result in denial of payment for unauthorized treatment. +PPA (SC) - Medicaid STD 05/01/2017 +Page 14 of 33 + +Start of Page No. = 15 +3.8. +Treatment Decisions. No Company or Payor is liable for, nor will it exercise control over, the +manner or method by which a Contracted Provider provides items or services under this Agreement. Provider and +Contracted Providers understand that determinations of Company or Payor that certain items or services are not +Covered Services or have not been provided or billed in accordance with the requirements of this Agreement or the +Provider Manual are administrative decisions only. Such decisions do not absolve the Contracted Provider of its +responsibility to exercise independent judgment in treatment decisions relating to Medicaid Managed Care +Members. Nothing in this Agreement (i) is intended to interfere with Contracted Provider's relationship with +Medicaid Managed Care Members, or (ii) prohibits or restricts a Contracted Provider from disclosing to any +Medicaid Managed Care Member any information that the Contracted Provider deems appropriate regarding health +care quality, medical treatment decisions or alternatives. +3.9. +Carve-Out Vendors. Provider acknowledges that Company may, during the term of this +Agreement, carve-out certain Covered Services from its general provider contracts, including this Agreement, for +one or more Products as Company deems necessary or appropriate. Provider and Contracted Providers shall +cooperate with and, when medically appropriate, utilize all third party vendors designated by Company for those +Covered Services identified by Company from time to time for a particular Product. +3.10. +Disparagement Prohibition. Provider, each Contracted Provider and the officers of Company shall +not disparage the other during the term of this Agreement or in connection with any expiration, termination or non- +renewal of this Agreement. Neither Provider nor Contracted Provider shall interfere with Company's direct or +indirect contractual relationships including, but not limited to, those with Medicaid Managed Care Members or +other Participating Providers. Nothing in this Agreement should be construed as limiting the ability of either +Health Plan, Company, Provider or a Contracted Provider to inform Medicaid Managed Care Members that this +Agreement has been terminated or otherwise expired or, with respect to Provider, to promote Provider to the +general public or to post information regarding other health plans consistent with Provider's usual procedures, +provided that no such promotion or advertisement is specifically directed at one or more Medicaid Managed Care +Members. In addition, nothing in this provision should be construed as limiting Company's ability to use and +disclose information and data obtained from or about Provider or Contracted Provider, including this Agreement, to +the extent determined reasonably necessary or appropriate by Company in connection with its efforts to comply +with Regulatory Requirements and to communicate with regulatory authorities. +3.11. +Nondiscrimination In addition to the nondiscrimination provisions set forth in Article I, Section +2.1.12, Provider and each Contracted Provider will provide Covered Services to Medicaid Managed Care Members +without discrimination on account of race, sex, sexual orientation, age, color, religion, national origin, place of +residence, health status, type of Payor, source of payment (e.g., Medicaid generally or a State-specific health care +program), physical or mental disability or veteran status, and will ensure that its facilities are accessible as required +by Title III of the Americans With Disabilities Act of 1991. Provider and Contracted Providers recognize that, as a +governmental contractor, Company or Payor may be subject to various federal laws, executive orders and +regulations regarding equal opportunity and affirmative action, which also may be applicable to subcontractors, and +Provider and each Contracted Provider agree to comply with such requirements as described in any applicable +Attachment. +3.12. Notice of Certain Events. Provider shall give written notice to Health Plan of: (i) any event of +which notice must be given to a licensing or accreditation agency or board; (ii) any change in the status of +Provider's or a Contracted Provider's license; (iii) termination, suspension, exclusion or voluntary withdrawal of +Provider or a Contracted Provider from any state or federal health care program, including but not limited to +Medicaid; or (iv) any settlements or judgments in connection with a lawsuit or claim filed or asserted against +Provider or a Contracted Provider alleging professional malpractice involving a Medicaid Managed Care Member. +In any instance described in subsection (i)-(iii) above, Provider must notify Health Plan or Payor in writing within +ten (10) days, and in any instance described in subsection (iv) above, Provider must notify Health Plan or Payor in +writing within thirty (30) days, from the date it first obtains knowledge of the pending of the same. +3.13. Use of Name. Provider and each Contracted Provider hereby authorizes each Company or Payor to +use their respective names, telephone numbers, addresses, specialties, certifications, hospital affiliations (if any), +PPA (SC) - Medicaid STD 05/01/2017 +Page 15 of 33 + +Start of Page No. = 16 +and other descriptive characteristics of their facilities, practices and services for the purpose of identifying the +Contracted Providers as "Participating Providers" in the applicable Products. Provider and Contracted Providers +may only use the name of the applicable Company or Payor for purposes of identifying the Products in which they +participate, and may not use the registered trademark or service mark of Company or Payor without prior written +consent. +3.14. Compliance with Regulatory Requirements. Provider, each Contracted Provider and Company +agrce to carry out their respective obligations under this Agreement and the Provider Manual, other than the +provision of services under the Medicaid Managed Care Program which are addressed in Article I, Section E.1, in +accordance with all applicable Regulatory Requirements, including, but not limited to, the requirements of the +Health Insurance Portability and Accountability Act, as amended, and any regulations promulgated thereunder. If, +due to Provider's or Contracted Provider's noncompliance with applicable Regulatory Requirements or this +Agreement, sanctions or penalties are imposed on Company, Company may, in its sole discretion, offset such +amounts against any amounts due Provider or Contracted Providers from any Company or require Provider or the +Contracted Provider to reimburse Company for such amounts. +3.15. +Program Integrity Required Disclosures. Provider agrees to furnish to Health Plan complete and +accurate information necessary to permit Company to comply with the collection of disclosures requirements +specified in 42 C.F.R. Part 455 Subpart B or any other applicable State or federal requirements, within such time +period as is necessary to permit Company to comply with such requirements. Such requirements include but are +not limited to: (i) 42 C.F.R. $455.105, relating to (a) the ownership of any subcontractor with whom Provider has +had business transactions totaling more than $25,000 during the 12-month period ending on the date of the request +and (b) any significant business transaction between Provider and any wholly owned supplier or subcontractor +during the five (5) year period ending on the date of the request; (ii) 42 C.F.R. 455.104, relating to individuals or +entities with an ownership or controlling interest in Provider; and (iii) 42 C.F.R. 455.106, relating to individuals +with an ownership or controlling interest in Provider, or who are managing employees of Provider, who have been +convicted of a crime. +ARTICLE) IV - CLAIMS SUBMISSION, PROCESSING, AND COMPENSATION +4.1. +Claims or Encounter Data Submission. As provided in the Provider Manual and/or Policies, +Contracted Providers shall submit to Payor or its delegate claims for payment for Covered Services rendered to +Medicaid Managed Care Members. Contracted Provider shall submit encounter data to Payor or its delegate in a +timely fashion, which must contain statistical and descriptive medical and patient data and identifying information, +if and as required in the Provider Manual. Payor or its delegate reserves the right to deny payment to the +Contracted Provider if the Contracted Provider fails to submit claims for payment or encounter data in accordance +with the Provider Manual and/or Policies. +4.2. +Compensation. The compensation for Covered Services provided to a Medicaid Managed Care +Member ("Compensation Amount") will be the appropriate amount under the applicable Compensation Schedule in +effect on the date of service for the Product in which the Medicaid Managed Care Member participates. Subject to +the terms of this Agreement and the Provider Manual, Provider and Contracted Providers shall accept the +Compensation Amount as payment in full for the provision of Covered Services. Subject to the terms of this +Agreement, Payor shall pay or arrange for payment of each Clean Claim received from a Contracted Provider for +Covered Services provided to a Medicaid Managed Care Member in accordance with the applicable Compensation +Amount less any applicable copayments, cost-sharing or other amounts that are the Medicaid Managed Care +Member's financial responsibility under the applicable Coverage Agreement. +4.3. +Financial Incentives. The Parties acknowledge and agree that nothing in this Agreement shall be +construed to create any financial incentive for Provider or a Contracted Provider to withhold Covered Services. +4.4. +Hold Harmless. Provider and each Contracted Provider agree that in no event, including but not +limited to non-payment by a Payor, a Payor's insolvency, or breach of this Agreement, shall Provider or a +Contracted Provider bill, charge, collect a deposit from, seek compensation, remuneration or reimbursement from, +PPA (SC) - Medicaid STD 05/01/2017 +Page 16 of 33 + +Start of Page No. = 17 +or have any recourse against a Medicaid Managed Care Member or person acting on the Medicaid Managed Care +Member's behalf, other than Payor, for Covered Services provided under this Agreement. Nothing in Article I, +Section C of this Agreement, shall prohibit collection of any applicable copayments, cost-sharing or other amounts +that are the Medicaid Managed Care Member's financial responsibility under the applicable Coverage Agreement. +This provision survives termination or expiration of this Agreement for any reason, will be construed for the benefit +of Medicaid Managed Care Members, and supersedes any oral or written agreement entered into between Provider +or a Contracted Provider and a Medicaid Managed Care Member. +4.5. +Recovery Rights. Payor or its delegate shall have the right to immediately offset or recoup any and +all amounts owed by Provider or a Contracted Provider to Payor or Company against amounts owed by the Payor or +Company to the Provider or Contracted Provider. Provider and Contracted Providers agree that all recoupment and +any offset rights under this Agreement will constitute rights of recoupment authorized under State or federal law +and that such rights will not be subject to any requirement of prior or other approval from any court or other +government authority that may now have or hereafter have jurisdiction over Provider or a Contracted Provider. +ARTICLE V - RECORDS AND INSPECTIONS +5.1. +Records. Each Contracted Provider shall maintain medical, financial and administrative records +related to items or services provided to Medicaid Managed Care Members, including but not limited to a complete +and accurate permanent medical record for each such Medicaid Managed Care Member, in such form and detail as +are required by applicable Regulatory Requirements and consistent with generally accepted medical standards. +5.2. +Access. Provider and each Contracted Provider shall provide access to their respective books and +records to each of the following, including any delegate or duly authorized agent thereof, subject to applicable +Regulatory Requirements: (i) Company and Payor, during regular business hours and upon prior notice; (ii) +appropriate State and federal authorities, to the extent such access is necessary to comply with Regulatory +Requirements; and (iii) accreditation organizations. Provider and each Contracted Provider shall provide copies of +such records at no expense to any of the foregoing that may make such request. Each Contracted Provider also +shall obtain any authorization or consent that may be required from a Medicaid Managed Care Member in order to +release medical records and information to Company or Payor or any of their delegates. Provider and each +Contracted Provider shall cooperate in and allow on-site inspections of its, his or her facilities and records by any +Company, Payor, their delegates, any authorized government officials, and accreditation organizations. Provider +and each Contracted Provider shall compile information necessary for the expeditious completion of such on-site +inspection in a timely manner. +5.3. +Record Transfer. Subject to applicable Regulatory Requirements, each Contracted Provider shall +cooperate in the timely transfer of Medicaid Managed Care Members' medical records to any other health care +provider, at no charge and when required. +ARTICLE INSURANCE AND INDEMNIFICATION +6.1. +Insurance. During the term of this Agreement and for any applicable continuation period as set +forth in Section 8.3 of this Agreement, Provider and each Contracted Provider shall maintain policies of general and +professional liability insurance and other insurance necessary to insure Provider and such Contracted Provider, +respectively; their respective employees; and any other person providing services hereunder on behalf of Provider +or such Contracted Provider, as applicable, against any claim(s) of personal injuries or death alleged to have been +caused or caused by their performance under this Agreement. Such insurance shall include, but not be limited to, +any "tail" or prior acts coverage necessary to avoid any gap in coverage. Insurance shall be through a licensed +carrier acceptable to Health Plan, and in a minimum amount of one million dollars ($1,000,000) per occurrence, +and three million dollars ($3,000,000) in the aggregate unless a lesser amount is accepted by Health Plan or where +State law mandates otherwise. Provider and each Contracted Provider will provide Health Plan with at least fifteen +(15) days prior written notice of cancellation, non-renewal, lapse, or adverse material modification of such +coverage. Upon Health Plan's request, Provider and each Contracted Provider will furnish Health Plan with +evidence of such insurance. +PPA (SC) Medicaid STD 05/01/2017 +Page 17 of 33 + +Start of Page No. = 18 +6.2. +Indemnification by Provider and Contracted Provider. Provider and each Contracted Provider shall +indemnify and hold harmless (and at Health Plan's request defend) Company and Payor and all of their respective +officers, directors, agents and employees from and against any and all third party claims for any loss, damages, +liability, costs, or expenses (including reasonable attorney's fees) judgments or obligations arising from or relating +to any negligence, wrongful act or omission, or breach of this Agreement by Provider, a Contracted Provider, or +any of their respective officers, directors, agents or employees. +6.3. +Indemnification by Health Plan. Health Plan agrees to indemnify and hold harmless (and at +Provider's request defend) Provider, Contracted Providers, and their officers, directors, agents and employees from +and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable +attorney's fees), judgments, or obligations arising from or relating to any negligence, wrongful act or omission or +breach of this Agreement by Company or its directors, officers, agents or employees. +ARTICLE VII - DISPUTE RESOLUTION +7.1. Informal Dispute Resolution. Any dispute between Provider and/or a Contracted Provider, as +applicable (the "Provider Party"), and Health Plan and/or Company, as applicable (including any Company acting +as Payor) (the "Administrator Party"), with respect to or involving the performance under, termination of, or +interpretation of this Agreement, or any other claim or cause of action hereunder, whether sounding in tort, contract +or under statute (a "Dispute") shall first be addressed by exhausting the applicable procedures in the Provider +Manual pertaining to claims payment, credentialing, utilization management, or other programs. If, at the +conclusion of these applicable procedures, the matter is not resolved to satisfaction of the Provider Party and the +Administrator Party, or if there are no applicable procedures in the Provider Manual, then the Provider Party and +the Administrator Party shall engage in a period of good faith negotiations between their designated representatives +who have authority to settle the Dispute, which negotiations may be initiated by either the Provider Party or the +Administrator Party upon written request to the other, provided such request takes place within one year of the date +on which the requesting party first had, or reasonably should have had, knowledge of the event(s) giving rise to the +Dispute. If the matter has not been resolved within sixty (60) days of such request, either the Provider Party or the +Administrator Party may, as its sole and exclusive forum for the litigation of the Dispute or any part thereof, initiate +arbitration pursuant to Section 7.2 below by providing written notice to the other party. +7.2. +Arbitration. If either the Provider Party or the Administrator Party wishes to pursue the Dispute as +provided in Section 7.1, such party shall submit it to binding arbitration conducted in accordance with the +Commercial Arbitration Rules of the American Arbitration Association ("AAA"). In no event may any arbitration +be initiated more than one (1) year following, as applicable, the end of the sixty (60) day negotiation period set +forth in Section 7.1, or the date of notice of termination. Arbitration proceedings shall be conducted by an +arbitrator chosen from the National Healthcare Panel at a mutually agreed upon location within the State. The +arbitrator shall not award any punitive or exemplary damages of any kind, shall not vary or ignore the provisions of +this Agreement, and shall be bound by controlling law. The Parties and the Contracted Providers, on behalf of +themselves and those that they may now or hereafter represent, agree to and do hereby waive any right to pursue, +on a class basis, any Dispute. Each of the Provider Party and the Administrator Party shall bear its own costs and +attorneys' fees related to the arbitration except that the AAA's Administrative Fees, all Arbitrator Compensation +and travel and other expenses, and all costs of any proof produced at the direct request of the arbitrator shall be +borne equally by the applicable parties, and the arbitrator shall not have the authority to order otherwise. The +existence of a Dispute or arbitration proceeding shall not in and of itself constitute cause for termination of this +Agreement. Except as hereafter provided, during an arbitration proceeding, each of the Provider Party and the +Administrator Party shall continue to perform its obligations under this Agreement pending the decision of the +arbitrator. Nothing herein shall bar either the Provider Party or the Administrator Party from seeking emergency +injunctive relief to preclude any actual or perceived breach of this Agreement, although such party shall be +obligated to file and pursue arbitration at the earliest reasonable opportunity. Judgment on the award rendered may +be entered in any court having jurisdiction thereof. Nothing contained in this Article VII shall limit a Party's right +to terminate this Agreement with or without cause in accordance with Section 8.2. +PPA (SC) - Medicaid STD 05/01/2017 +Page 18 of 33 + +Start of Page No. = 19 +ARTICLE VIII - TERM AND TERMINATION +8.1. +Term. This Agreement is effective as of the Health Plan Effective Date, and will remain in effect +for an initial term ("Initial Term") of three (3) year(s), after which it will automatically renew for successive terms +of one (1) year each (cach a "Renewal Term"), unless this Agreement is sooner terminated as provided in this +Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one +hundred eighty (180) days prior to the end of the then-current term. In addition, either Party may elect to not renew +a Contracted Provider's participation as a Participating Provider in a particular Product for the next Renewal Term, +by giving Provider written notice of such non-renewal not less than one hundred eighty (180) days prior to the, as +applicable, last day of the Initial Term or applicable Renewal Term; in such event, Provider shall immediately +notify the affected Contracted Provider of such non-renewal. Termination of any Contracted Provider's +participation in a particular Product will not have the effect of terminating either this Agreement or the Contracted +Provider's participation in any other Product in which the Contract Provider participates under this Agreement. +8.2. +Termination. This Agreement, or the participation of Provider or a Contracted Provider as a +Participating Provider in one or more Products, may be terminated or suspended as set forth below. +8.2.1. Upon Notice. This Agreement may be terminated by either Party giving the other Party at +least one hundred eighty (180) days prior written notice of such termination. The participation of any Contracted +Provider as a Participating Provider in a Product may be terminated by either Party giving the other Party at least +one hundred eighty (180) days prior written notice of such termination; in such event, Provider shall immediately +notify the affected Contracted Provider of such termination. +8.2.2. With Cause. This Agreement, or the participation of any Contracted Provider as a +Participating Provider in one or more Products under this Agreement, may be terminated by either Party giving at +least ninety (90) days prior written notice of termination to the other Party if such other Party (or the applicable +Contracted Provider) is in breach of any material term or condition of this Agreement and such other Party (or the +Contracted Provider) fails to cure the breach within the sixty (60) day period immediately following the giving of +written notice of such breach. Any notice given pursuant to this Section 8.2.2 must describe the specific breach. In +the case of a termination of a Contracted Provider, Provider shall immediately notify the affected Contracted +Provider of such termination. +8.2.3. Suspension of Participation. Unless expressly prohibited by applicable Regulatory +Requirements, Health Plan has the right to immediately suspend or terminate the participation of a Contracted +Provider in any or all Products by giving written notice thereof to Provider when Health Plan determines that (i) +based upon available information, the continued participation of the Contracted Provider appears to constitute an +immediate threat or risk to the health, safety or welfare of Medicaid Managed Carc Members, or (ii) the Contracted +Provider's fraud, malfeasance or non-compliance with Regulatory Requirements is reasonably suspected. Provider +shall immediately notify the affected Contracted Provider of such suspension. During such suspension, the +Contracted Provider shall, as directed by Health Plan, discontinue the provision of all or a particular Covered +Service to Medicaid Managed Care Members. During the term of any suspension, the Contracted Provider shall +notify Medicaid Managed Care Members that his or her status as a Participating Provider has been suspended. +Such suspension will continue until the Contracted Provider's participation is reinstated or terminated. +8.2.4. Insolvency. This Agreement may be terminated immediately by a Party giving written +notice thereof to the other Party if the other Party is insolvent or has bankruptcy proceedings initiated against it. +8.2.5. Credentialing. The status of a Contracted Provider as a Participating Provider in one or +more Products may be terminated immediately by Health Plan giving written notice thereof to Provider if the +Contracted Provider fails to adhere to Company's or Payor's credentialing criteria, including, but not limited to, if +the Contracted Provider (i) loses, relinquishes, or has materially affected its license to provide Covered Services in +the State, (ii) fails to comply with the insurance requirements set forth in this Agreement; or (iii) is convicted of a +criminal offense related to involvement in any state or federal health care program or has been terminated, +suspended, barred, voluntarily withdrawn as part of a settlement agreement, or otherwise excluded from any state or +PPA (SC)-'Medicaid STD 05/01/2017 +Page 19 of 33 + +Start of Page No. = 20 +federal health care program. Provider shall immediately notify the affected Contracted Provider of such +termination. +8.3. +Effect of Termination. After the effective date of termination of this Agreement or a Contracted +Provider's participation in a Product, this Agreement shall remain in effect for purposes of those obligations and +rights arising prior to the effective date of termination. Upon such a termination, each affected Contracted Provider +(including Provider, if applicable) shall (i) continue to provide Covered Services to Medicaid Managed Care +Members in the applicable Product(s) during the longer of the ninety (90) day period following the date of such +termination or such other period as may be required under any Regulatory Requirements, and, if requested by +Company, each affected Contracted Provider (including Provider, if applicable) shall continue to provide, as a +Participating Provider, Covered Services to Medicaid Managed Care Members until such Medicaid Managed Care +Members are assigned or transferred to another Participating Provider in the applicable Product(s), and (ii) continue +to comply with and abide by all of the applicable terms and conditions of this Agreement, including, but not limited +to, Section 4.4 (Hold Harmless) hereof, in connection with the provision of such Covered Services during such +continuation period. During such continuation period, each affected Contracted Provider (including Provider, if +applicable) will be compensated in accordance with this Agreement and shall accept such compensation as payment +in full. +8.4. +Survival of Obligations. All provisions hereof that by their nature are to be performed or complied +with following the expiration or termination of this Agreement, including without limitation Sections 3.8, 3.10, 4.2, +4.4, 4.5, 5.2, 6.1, 6.2, 6.3, 7.2, 8.3, and 8.4 and Article IX, survive the expiration or termination of this Agreement. +ARTICLE IX - ISCELLANEOUS +9.1. +Relationship of Parties. The relationship between or among Health Plan, Company, Provider, and +any Contracted Provider hereunder is that of independent contractors. None of the provisions of this Agreement +will be construed as creating any agency, partnership, joint venture, employee-employer, or other relationship. +References herein to the rights and obligations of any Company under this Agreement are references to the rights +and obligations of each Company individually and not collectively. A Company is only responsible for performing +its respective obligations hereunder with respect to a particular Product, Coverage Agreement, Payor Contract, +Covered Service or Medicaid Managed Care Member. A breach or default by an individual Company shall not +constitute a breach or default by any other Company, including but not limited to Health Plan. +9.2. +Conflicts Between Certain Documents. If there is any conflict between this Agreement and the +Provider Manual, this Agreement will control. In the event of any conflict between this Agreement and any +Product Attachment, the Product Attachment will control as to such Product. +9.3. +Assignment. This Agreement is intended to secure the services of and be personal to Provider and +may not be assigned, sublet, delegated, subcontracted or transferred by Provider without Health Plan's prior written +consent. Health Plan shall have the right, exercisable in its sole discretion, to assign or transfer all or any portion of +its rights or to delegate all or any portion of its interests under this Agreement or any Attachment to an Affiliate, +successor of Health Plan, or purchaser of the assets or stock of Health Plan, or the line of business or business unit +primarily responsible for carrying out Health Plan's obligations under this Agreement. +9.4. +Headings. The headings of the sections of this Agreement are inserted merely for the purpose of +convenience and do not limit, define, or extend the specific terms of the section so designated. +9.5. +Governing Law. The interpretation of this Agreement and the rights and obligations of Health Plan +Company, Provider and any Contracted Providers hereunder will be governed by and construed in accordance +with applicable federal and State laws. +9.6. +Third Party Beneficiary. This Agreement is entered into by the Parties signing it for their benefit, +as well as, in the case of Health Plan, the benefit of Company, and in the case of Provider, the benefit of each +PPA (SC) - Medicaid STD 05/01/2017 +Page 20 of 33 + +Start of Page No. = 21 +Contracted Provider. Except as specifically provided in Section 4.4 hereof, no Medicaid Managed Care Member or +third party, other than Company, will be considered a third party beneficiary of this Agreement. +9.7. +Amendment. Except as otherwise provided in this Agreement, this Agreement may be amended +only by written agreement of duly authorized representatives of the Parties. +9.7.1. Health Plan may amend this Agreement by giving Provider written notice of the +amendment to the extent such amendment is deemed necessary or appropriate by Health Plan to comply with any +Regulatory Requirements. Any such amendment will be deemed accepted by Provider upon the giving of such +notice. +9.7.2. Health Plan may amend this Agreement by giving Provider written notice (electronic or +paper) of the proposed amendment. Unless Provider notifies Health Plan in writing of its objection to such +amendment during the thirty (30) day period following the giving of such notice by Health Plan, Provider shall be +deemed to have accepted the amendment. If Provider objects to any proposed amendment to either the base +agreement or any Attachment, Health Plan may exclude one or more of the Contracted Providers from being +Participating Providers in the applicable Product (or any component program of, or Coverage Agreement in +connection with, such Product). +9.8. +Entire Agreement. All prior or concurrent agreements, promises, negotiations or representations +either oral or written, between Health Plan and Provider relating to a subject matter of this Agreement, which are +not expressly set forth in this Agreement, are of no force or effect. +9.9. +Severability. The invalidity or unenforceability of any terms or provisions hereof will in no way +affect the validity or enforceability of any other terms or provisions. +9.10. Waiver. The waiver by either Party of the violation of any provision or obligation of this +Agreement will not constitute the waiver of any subsequent violation of the same or other provision or obligation. +9.11. Notices. Except as otherwise provided in this Agreement, any notice required or permitted to be +given hercunder is deemed to have been given when such written notice has been personally delivered or deposited +in the United States mail, postage paid, or delivered by a service that provides written receipt of delivery, addressed +as follows: +PPA (SC) - Medicaid STD 05/01/2017 +Page 21 of 33 + +Start of Page No. = 22 +To Health Plan at: +To Provider at: +Attn: President +Attn: Sample Name 3 +Sample Name 2, Inc. +Sample Name 1, PhD +123 Maple Street, Springfield +456 Oak Avenue, Greenville +Columbia, SC 29201 +North Charleston, SC 29406 +example.email@company.net +or to such other address as such Party may designate in writing. Notwithstanding the previous paragraph, +Health Plan may provide notices by electronic mail, through its provider newsletter or on its provider +website. +9.12. Force Majeure. Neither Party shall be liable or deemed to be in default for any delay or failure to +perform any act under this Agreement resulting, directly or indirectly, from acts of God, civil or military authority, +acts of public enemy, war, accidents, fires, explosions, earthquake, flood, strikes or other work stoppages by either +Party's employees, or any other similar cause beyond the reasonable control of such Party. +9.13. Proprietary Information. Each Party is prohibited from, and shall prohibit its Affiliates and +Contracted Providers from, disclosing to a third party the substance of this Agreement, or any information of a +confidential nature acquired from the other Party (or Affiliate or Contracted Provider thereof) during the course of +this Agreement, except to agents of such Party as necessary for such Party's performance under this Agreement, or +as required by a Payor Contract or applicable Regulatory Requirements. Provider acknowledges and agrees that all +information relating to Company's programs, policies, protocols and procedures is proprietary information and +Provider shall not disclose such information to any person or entity without Health Plan's express written consent. +9.14. +Authority. The individuals whose signatures are set forth below represent and warrant that they are +duly empowered to execute this Agreement. Provider represents and warrants that it has all legal authority to +contract on behalf of and to bind all Contracted Providers to the terms of the Agreement with Health Plan. +PPA (SC) - Medicaid STD 05/01/2017 +Page 22 of 33 + +Start of Page No. = 23 +THIS AGREEMENT CONTAINS A BINDING ARBITRATION PROVISION +THAT MAY BE ENFORCED BY THE PARTIES. +IN WITNESS WHEREOF, the Parties hereto have executed this Agreement effective as of the date set forth +beneath their respective signatures. +HEALTH PLAN: +PROVIDER: +Sample Name2, Inc. +Sample Name1, PhD +(Legibly Print Name of Provider) +It +Authorized Signature: +Smith +Authorized Signature: +Print Name:-First Last +Print Name: Sample Name1, PhD +Title: Plan President and CEO +Title: Clinical Psychologist +Signature Date: +11/1/18 +Signature Date: 6-15-18 +ECM #: 123456 +Tax Identification Number: 123456789 +[ +To be completed by Health Plan only: +State Medicaid Number AB1234 +Effective Date: +SEP 0 7 2018 +National Provider Identifier: 1234567890 +I +PPA (SC) - Medicaid STD 05/01/2017 +Page 23 of 33 + +This page has 2 signature. + +Start of Page No. = 24 +PARTICIPATING PROVIDER AGREEMENT +SCHEDULE A +CONTRACTED PROVIDER-SPECIFIC PROVISIONS +Provider and Contracted Providers shall comply with the applicable provisions of this Schedule A. +1 +Hospitals. If Provider or a Contracted Provider is a hospital ("Hospital"), the following provisions +apply. +1.1 +24 Hour Coverage. Each Hospital shall be available to provide Covered Services to +Medicaid Managed Care Members twenty-four (24) hours per day, seven (7) days per week. +1.2 +Emergency Care. Each Hospital shall provide Emergency Care (as hereafter defined) in +accordance with Regulatory Requirements. The Contracted Provider shall notify Company's medical management +department of any emergency room admissions by electronic file sent within twenty-four (24) hours or by the next +business day of such admission. "Emergency Care" (or derivative thereof) has, as to each particular Product, the +meaning set forth in the applicable Coverage Agreement or Product Attachment. If there is no definition in such +documents, "Emergency Care" means inpatient and/or outpatient Covered Services furnished by a qualified +provider that are needed to evaluate or stabilize an Emergency Medical Condition. "Emergency Medical +Condition" means a medical condition manifesting itself by acute symptoms of sufficient severity (including severe +pain) that a prudent layperson, who possesses an average knowledge of health and medicine, could reasonably +expect the absence of immediate medical attention to result in the following: (i) placing the health of the individual +(or, with respect to a pregnant woman, the health of the woman or her unborn child) in serious jeopardy; (ii) serious +impairment to bodily functions; or (iii) serious dysfunction of any bodily organ or part. +1.3 +Staff Privileges. Each Hospital shall assist in granting staff privileges or other appropriate +access to Company's Participating Providers who are qualified medical or ostcopathic physicians, provided they +meet the reasonable standards of practice and credentialing standards established by the Hospital's medical staff +and bylaws, rules, and regulations. +1.4 +Discharge Planning. Each Hospital agrees to cooperate with Company's system for the +coordinated discharge planning of Medicaid Managed Care Members, including the planning of any necessary +continuing care. +1.5 +Credentialing Criteria. Each Hospital shall (a) currently, and for the duration of this +Agreement, remain accredited by the Joint Commission or American Osteopathic Association, as applicable; and +(b) ensure that all employees of Hospital perform their duties in accordance with all applicable local, State and +federal licensing requirements and standards of professional ethics and practice. +2 +Practitioners. If Provider or Contracted Provider is a physician or other health care practitioner +(including physician extenders) ("Practitioner"), the following provisions apply. +2.1 +Contracted Professional Qualifications. At all times during the term of this Agreement, +Practitioner shall, as applicable, maintain medical staff membership and admitting privileges with at least one +hospital that is a Participating Provider ("Participating Hospital") with respect to each Product in which the +Practitioner participates. Upon Company's request, Practitioner shall furnish evidence of the foregoing to +Company. If Practitioner does not have such admitting privileges, Provider or the Practitioner shall provide +Company with a written statement from another Participating Provider who has such admitting privileges, in good +standing, certifying that such individual agrees to assume responsibility for providing inpatient Covered Services to +Medicaid Managed Care Members who are patients of the applicable Practitioner. +PPA (SC) - Medicaid STD 05/01/2017 +Page 24 of 33 + +Start of Page No. = 25 +2.2 +Acceptance of New Patients. To the extent that Practitioner is accepting new patients, such +Practitioner must also accept new patients who are Medicaid Managed Care Members with respect to the Products +in which such Practitioner participates. Practitioner shall notify Company in writing forty-five (45) days prior to +such Practitioner's decision to no longer accept Medicaid Managed Care Members with respect to a particular +Product. In no event will an established patient of any Practitioner be considered a new patient. +2.3 +Preferred Drug List/Drug Formulary. If applicable to the Medicaid Managed Care +Member's coverage, Practitioners shall use commercially reasonable efforts, when medically appropriate under the +circumstances, to comply with formulary or preferred drug list when prescribing medications for Medicaid +Managed Care Members. +3 +Ancillary Providers. If Provider or Contracted Provider is an ancillary provider (including but not +limited to a home health agency, durable medical equipment provider, sleep center, pharmacy, ambulatory surgery +center, nursing facility, laboratory or urgent care center) ("Ancillary Provider"), the following provisions apply. +3.1 +Acceptance of New Patients. To the extent that Ancillary Provider is accepting new +patients, such Ancillary Provider must also accept new patients who are Medicaid Managed Care Members with +respect to the Products in which such Ancillary Provider participates. Ancillary Provider shall notify Company in +writing forty-five (45) days prior to such Ancillary Provider's decision to no longer accept Medicaid Managed Care +Members with respect to a particular Product. In no event will an established patient of any Ancillary Provider be +considered a new patient. +4 +FQHC. If Provider or a Contracted Provider is a federally qualified health center ("FQHC"), the +following provision applies. +4.1 +FOHC Insurance. To the extent FQHC's employees are deemed to be federal employees +qualified for protection under the Federal Tort Claims Act ("FTCA") and Health Plan has been provided with +documentation of such status issued by the U.S. Department of Health and Human Services (such status to bc +referred to as "FTCA Coverage"), Section 6.1 of this Agreement will not apply to those Contracted Providers with +FTCA Coverage. FQHC shall provide evidence of such FTCA Coverage to Health Plan at any time upon request. +FQHC shall promptly notify Health Plan if, any time during the term of this Agreement, any Contracted Provider is +no longer eligible for, or if FQHC becomes aware of any fact or circumstance that would jeopardize, FTCA +Coverage. Section 6.1 of this Agreement will apply to a Contracted Provider immediately upon such Contracted +Provider's loss of FTCA Coverage for any reason. +5 +HCBS Providers. If a Provider or a Contracted Provider provides Home and Community-Based +Services ("HCBS"), the following provisions apply. +5.1 +CLTC Provider Manual. Provider shall provide Covered Services in accordance with the +terms of the Division of Community Long Term Care ("CLTC") Provider Manual. +5.2 +HCBS Waiver Authorization. Provider shall not provide HCBS Covered Services to +Medicaid Managed Care Members without the required HCBS waiver authorization. +5.3 +Conditions for Reimbursement. No payment shall be made to the Provider unless the +Provider has strictly conformed to the policies and procedures of the HCBS Waiver Program, including but not +limited to not providing HCBS Covered Services without prior authorization of Health Plan. For the purposes of +this Exhibit, "HCBS Waiver Program" shall mean any special Medicaid program operated under a waiver approved +by the Centers for Medicare and Medicaid Services which allows the provision of a special package of approved +services to Medicaid Managed Care Members. +5.4 +Acknowledgement. Health Plan acknowledges that Provider is a provider of HCBS +Covered Services and is not necessarily a provider of medical or health care services. Nothing in this Agreement is +intended to require Provider to provide medical or health care services that Provider does not routinely provide. +PPA (SC) - Medicaid STD 05/01/2017 +Page 25 of 33 + +Start of Page No. = 26 +5.5 +Notification Requirements. Provider or the applicable Contracted Provider shall provide +the following notifications to Health Plan, via written notice or via telephone contact at a number to be provided by +Health Plan, within the following time frames: +a) +Provider or the applicable Contracted Provider shall notify Health Plan of a Medicaid +Managed Care Member's visit to the emergency department of any hospital, or of a Medicaid Managed Care +Member's hospitalization, within 24 hours of becoming aware of such visit or hospitalization. +b) +Provider or the applicable Contracted Provider shall notify Health Plan of any change to a +Medicaid Managed Care Member's plan of care and/or service plan, within 24 hours of becoming aware of such +change. +c) +Provider or the applicable Contracted Provider shall notify Health Plan if a Medicaid +Managed Care Member misses an appointment with Provider, within 24 hours of becoming aware of such missed +appointment. +d) +Provider or the applicable Contracted Provider shall notify Health Plan of any change in a +Medicaid Managed Care Member's medical or behavioral health condition, within 24 hours of becoming aware of +such change. (Examples of changes in condition are set forth in the Provider Manual.) +e) +Provider or the applicable Contracted Provider shall notify Health Plan of any safety issue +identified by Provider or Contracted Provider or its agent or subcontractor, within 24 hours of the identification of +such safety issue. (Examples of safety issues are set forth in the Provider Manual.) +f) +Provider or the applicable Contracted Provider shall notify Health Plan of any change in +Provider's or Contracted Provider's key personnel, within 24 hours of such change. +5.6 +Minimum Data Set. If Contracted Provider is a nursing facility, Provider or such +Contracted Provider shall submit to Health Plan or its designee the Minimum Data Set as defined by CMS and +required under federal law and Health Plan policy as it relates to all Medicaid Managed Care Members who are +residents in Contracted Provider's facility. Such submission shall be via electronic mail, facsimile transmission, or +other manner and format reasonably requested by Health Plan. +5.7 +Quality Improvement Plan. Each Contracted Provider shall participate in Health Plan's +HCBS quality improvement plan. Each Contracted Provider shall permit Health Plan to access such Contracted +Providers' assessment and quality data upon reasonable advance notice, which may be given by electronic mail. +5.8 +Electronic Visit Verification. If Contracted Provider is a personal care aide, Contracted +Provider shall comply with Health Plan's electronic visit verification system requirements where applicable. +5.9 +Criminal Background Checks. Provider shall conduct a criminal background check on +each Contracted Provider prior to the commencement of services under this Agreement and as requested by Health +Plan thereafter. Provider shall provide the results of such background checks to Health Plan within a reasonable +time period following the completion thereof. Provider agrees to immediately notify Health Plan of any criminal +convictions of any Contracted Provider. Provider shall pay any costs associated with such criminal background +checks. +PPA (SC) - Medicaid STD 05/01/2017 +Page 26 of 33 + +Start of Page No. = 27 +PARTICIPATING PROVIDER AGREEMENT +SCHEDULE B +PRODUCT PARTICIPATION +Provider will be designated as a "Participating Provider" in the Medicaid Managed Care Program as of the date of +successful completion of credentialing in accordance with this Agreement. +PPA (SC) - Medicaid STD 05/01/2017 +Page 27 of 33 + +Start of Page No. = 28 +PARTICIPATING PROVIDER AGREEMENT +SCHEDULE C-1 +CONTRACTED PROVIDERS +NOTE: This Schedule is intended to capture all groups, clinics and facilities participating under the Agreement +(i.e., are Contracted Providers under this Agreement) as of the Effective Date. +PPA (SC) - Medicaid STD 05/01/2017 +Page 28 of 33 + + +-------Table Start-------- +b3b918fd-5a39-42be-a9b5-b9f691ab3b95 +[['ENTITY/GROUP/CLINIC/FACILITY NAME', 'TAX ID #', 'NPI #'], ['Sample name 1, PhD', '123456789', '1234567890'], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None], [None, None, None]] + SCHEDULE C-1 CONTRACTED PROVIDERS NOTE: This Schedule is intended to capture all groups, clinics and facilities participating under the Agreement (i.e., are Contracted Providers under this Agreement) as of the Effective Date. +-------Table End-------- + +Start of Page No. = 29 +PARTICIPATING PROVIDER AGREEMENT +SCHEDULE C-2 +Covered Services to be provided include the following (check all that apply): +PPA (SC) - Medicaid STD 05/01/2017 +Page 29 of 33 + + +-------Table Start-------- +213df661-696e-4b3b-811c-31e0a9d5980c +[['COVERED SERVICE APPLICABLE ONLY IF CHECKED', 'COVERED SERVICES', 'REMARKS'], [None, 'Ambulatory Surgical Services', None], [None, 'Audiology Services', None], [None, 'Childbirth Education Services', None], [None, 'Chiropractic Services', None], [None, 'Corneal Transplants', None], [None, 'Developmental Evaluation Services', None], [None, 'Dialysis, Outpatient', 'Limited to Emergent'], [None, 'Durable Medical Equipment and Supplies', None], [None, 'Early and Periodic Screening, Diagnostic, and Treatment Services', None], [None, 'Emergency Transportation Services', None], [None, 'Emergency Services', None], [None, 'Family Planning Services', None], [None, 'Federally Qualified Health Center Services', None], [None, 'Home and Community Based Services (HCBS)', None], [None, 'Home Health Services', None], [None, 'Hospice Services', None], [None, 'Inpatient Hospital Services', None], [None, 'Laboratory Services', 'See Physician Office STAT Lab list found in Provider Manual'], [None, 'Radiological Services', 'Management of high cost diagnostic/imaging services, including CTs, MRIs, MRAs, PETs and Nuclear Cardiology services, performed in the outpatient setting require prior authorization from care coordination vendor'], ['X', 'Mental Health/Drug Abuse Assessment Services', None], [None, 'Nurse Midwife Services', None], [None, 'Nurse Practitioner Services', None], [None, 'Nursing Facility Services', None], [None, 'Obstetrical Services', None], [None, 'Occupational Therapy Services', None], [None, 'Orthotic and Prosthetic Services', None], [None, 'Oral Surgery', None]] + PARTICIPATING PROVIDER AGREEMENT SCHEDULE C-2 Covered Services to be provided include the following (check all that apply): +-------Table End-------- + +Start of Page No. = 30 +PPA (SC) - Medicaid STD 05/01/2017 +Page 30 of 33 + + +-------Table Start-------- + +[['COVERED SERVICE APPLICABLE ONLY IF CHECKED', 'COVERED SERVICES', 'REMARKS'], [None, 'Outpatient Hospital Services', None], [None, 'Pharmacy Services', 'Specialty drugs and injectibles obtained from specialty pharmaceutical vendor'], [None, 'Physical Therapy Services', None], [None, 'Physician Services', None], [None, 'Podiatric Services', None], [None, 'Pregnancy-Related Services', None], [None, 'Intermittent Home Nursing Services', None], [None, 'Rural Health Clinic Services', None], [None, 'Speech Therapy Services', None], [None, 'Swing Bed Services', None], [None, 'Urgent Care', None]] +None +-------Table End-------- + +Start of Page No. = 31 +Attachment A: Medicaid +EXHIBIT 1 +COMPENSATION SCHEDULE +PRACTITIONER SERVICES +BEHAVIORAL HEALTH +Sample Name1, PhD +This compensation schedule ("Compensation Schedule") sets forth the maximum reimbursement amounts for +behavioral health Covered Services provided by Contracted Providers to Medicaid Managed Care Members +enrolled in a Medicaid Product. Where the Contracted Provider's tax identification number ("TIN") has been +designated by the Payor as subject to this Compensation Schedule, Payor shall pay or arrange for payment of a +Clean Claim for Covered Services rendered by the Contracted Provider according to the terms of, and subject to the +requirements set forth in, the Agreement and this Compensation Schedule. Payment under this Compensation +Schedule shall consist of the Allowed Amount as set forth herein less all applicable Cost-Sharing Amounts. All +capitalized terms used in this Compensation Schedule shall have the meanings set forth in the Agreement, the +applicable Product Attachment, or the Definitions section set forth at the end of this Compensation Schedule. +The maximum compensation for practitioner Covered Services rendered to a Medicaid Managed Care Member, +shall be the "Allowed Amount." Except as otherwise provided in this Compensation Schedule, the Allowed +Amount for practitioner Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent +(100%) of the Payor's Medicaid fee schedule. +If there is no established payment amount on the Payor's Medicaid fee schedule for a Covered Service provided to +a Medicaid Managed Care Member, Payor may establish a payment amount to apply in determining the Allowed +Amount. Until such time as Payor establishes such a payment amount, the maximum compensation shall be twenty +five percent (25%) of Allowable Charges. +Additional Provisions: +1. Code Change Updates. Payor utilizes nationally recognized coding structures (including, without limitation, +revenue codes, CPT codes, HCPCS codes, ICD codes, national drug codes, ASA relative values, etc., or their +successors) for basic coding and descriptions of the services rendered. Updates to billing-related codes shall +become effective on the date ("Code Change Effective Date") that is the later of: (i) the first day of the month +following sixty (60) days after publication by the governmental agency having authority over the applicable +Product of such governmental agency's acceptance of such code updates, (ii) the effective date of such code +updates as determined by such governmental agency or (iii) if a date is not established by such governmental +agency or the applicable Product is not regulated by such governmental agency, the date that changes are made +to nationally recognized codes. Such updates may include changes to service groupings. Claims processed +prior to the Code Change Effective Date shall not be reprocessed to reflect any such code updates. +2. Fee Change Updates. Updates to the fee schedule shall become effective on the effective date of such fee +schedule updates, as determined by the Payor ("Fee Change Effective Date"). The date of implementation of +any fee schedule updates, i.e. the date on which such fee change is first used for reimbursement ("Fee Change +Implementation Date"), shall be the later of: (i) the first date on which Payor is reasonably able to implement +the update in the claims payment system; or (ii) the Fee Change Effective Date. Claims processed prior to the +Fee Change Implementation Date shall not be reprocessed to reflect any updates to such fee schedule, even if +service was provided after the Fee Change Effective Date. +3. +Claim Form - Professional. Contracted Provider when submitting outpatient or professional claims (billed on a +CMS-1500 claim form, or its successor) spanning multiple dates of service: (i) is required to identify each date +PPA (SC) - Medicaid STD 05/01/2017 +Page 31 of 33 + +Start of Page No. = 32 +of service; and (ii) must contain modifiers as identified in the Provider Manual. Applicable modifiers should be +placed in the first modifier field for claims payment. +4. Primary Contact Billing. If Medicaid Managed Care Member sees more than one health care professional +during an encounter, the NPI billed on the CMS-1500 claim form, or its successor form, should indicate the +primary contact. The primary contact is defined as the health care professional who spends the greatest amount +of time with the client during services. +5. Provider Type. Services must be provided by the appropriate provider type or specialty as defined in the +Provider Manual. +6. Modifiers. Unless specifically indicated otherwise, fee amounts listed in the fee schedule represent global fees +and may be subject to reductions based on appropriate Modifier (for example, professional and technical +modifiers). As used in the previous sentence, "global fees" refers to services billed without a Modifier, for +which the fee amount includes both the professional component and the technical component. Modifiers must +be used as appropriate and be specific to primary contact, as applicable. +7. Place of Service Pricing Rules. This fee schedule follows CMS guidelines for determining when services are +priced at the facility or non-facility fee schedule. +8. +Provider Documentation. Provider is required to maintain treatment plans, progress notes, and other similar +documentation as identified in the Provider Manual. +9. Authorizations. Authorization requirements are as defined in this Agreement or in the Provider Manual. +Service limits, unless specified in this Compensation Schedule, are as defined by the Provider Manual. +10. Level of Care. All reimbursement under this Compensation Schedule shall correspond to the level of care +authorized by Payor. +11. Payment under this Compensation Schedule. All payments under this Compensation Schedule are subject to +the terms and conditions set forth in the Agreement, the Provider Manual and any applicable billing manual and +claims processing policies. +Definitions: +1. Allowable Charges means a Contracted Provider's billed charges for services that qualify as Covered Services. +2. +Allowed Amount means the amount designated as the maximum amount payable to a Contracted Provider for +any particular Covered Service provided to any particular Medicaid Managed Care Member, pursuant to +this +Agreement or its Attachments for Covered Services. +3. +Contracted Provider means a physician, hospital, health care professional or any other provider of items or +services that is employed by or has a contractual relationship with Provider, also known in the Agreement as +"Group", "Practitioner" or "Facility". The term "Contracted Provider" includes Provider for those Covered +Services provided by Provider. +4. Cost-Sharing Amounts means any amounts payable by a Medicaid Managed Care Member, such as +copayments, cost-sharing, coinsurance, deductibles or other amounts that are the Medicaid Managed Care +Member's financial responsibility under the applicable Coverage Agreement, if applicable. +5. +Per Encounter includes all services rendered to a Medicaid Managed Care Member within a 23-hour period +unless paid on the basis of an all-inclusive Per Diem rate or DRG pricing methodology, including, but not +limited to, physician and other professional fees billed by the Facility, nursing care, diagnostic and therapeutic +PPA (SC) - Medicaid STD 05/01/2017 +Page 32 of 33 + +Start of Page No. = 33 +facility and ancillary services, and, if applicable, room and board charges. +services, durable medical equipment, supplies (including, but not limited to anesthesia supplies), medications, +PPA (SC) - Medicaid STD 05/01/2017 +Page 33 of 33 \ No newline at end of file diff --git a/assets/sampleOne/cnc_arch.pdf b/assets/sampleOne/cnc_arch.pdf new file mode 100644 index 00000000..22d0473f Binary files /dev/null and b/assets/sampleOne/cnc_arch.pdf differ diff --git a/assets/sampleOne/cnc_arch.txt b/assets/sampleOne/cnc_arch.txt new file mode 100644 index 00000000..0ea64c96 --- /dev/null +++ b/assets/sampleOne/cnc_arch.txt @@ -0,0 +1,447 @@ +Document Index +INDIVIDUAL PRODUCT ATTACHMENT 1 +2. 3Individual Product Attachment. 3 +EXHIBIT 1 6TO THE INDIVIDUAL PRODUCT ATTACHMENT 6REGULATORY REQUIREMENTS 6 +EXHIBIT 1-A TO THE INDIVIDUAL PRODUCT ATTACHMENT 9REGULATORY REQUIREMENTS 9SUMMARY DISCLOSURE FORM 9 +IMPORTANT INFORMATION -- PLEASE READ CAREFULLY 9 +EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT 11 +PROVIDER COMPENSATION SCHEDULE 11 +COMMERCIAL-EXCHANGE PRODUCT 11PROFESSIONAL SERVICES 11 +Additional Provisions: 11 +Definitions: 12 +Note: 12 + + + +Start of Page No. = 1 +INDIVIDUAL PRODUCT ATTACHMENT +THIS INDIVIDUAL PRODUCT ATTACHMENT (referred to herein as this +"Attachment") is made and entered into between Berkley Community Health Care ("HMO") +and +("Provider"). +WHEREAS, HMO and Provider entered into that certain provider agreement, including +all Attachments, as may have been amended and supplemented from time to time (the +"Agreement"), pursuant to which Provider agrees to provide to covered persons those covered +services described in the Agreement; +WHEREAS, HMO desires (i) to include Participating Providers (as hereafter defined) as +participating providers in the "Individual Product," as defined and described in this +Attachment, for the purposes of participating in health care reform programs on and off health +care exchanges, and (ii) to add the Individual Product Attachment (as defined below) as a +binding attachment to the Agreement; +NOW THEREFORE, in consideration of the foregoing, and for other good and valuable +consideration, the Agreement is amended as set forth below. +1. +Amendment. +1.1 +Effective Date. This Attachment is effective as of +, 20 +("Effective Date"). +1.2 +Defined Terms. All capitalized terms not specifically defined in this Attachment +will have the meanings given to such terms in the Agreement. +1.3 +Modification to Defined Terms. For purposes of the Individual Product only, +Article I of the Agreement is hereby amended by deleting the definitions in the Agreement for +the following quoted terms and inserting in lieu thereof the definitions set forth below. +"Covered Person" means any individual entitled to receive Covered Services +pursuant to the terms of a Coverage Agreement. +"Covered Services" means those services and items for which benefits are +available and payable under the applicable Coverage Agreement and which are +determined, if applicable, to be medically necessary under the applicable Coverage +Agreement. +"Emergency" or "Emergency Care" has the meaning set forth in the Covered +Person's Coverage Agreement. +"Emergency Medical Condition" has the meaning set forth in the Covered +Person's Coverage Agreement. +1 + +Start of Page No. = 2 +"Medically Necessary" has the meaning set forth in the Covered Person's +Coverage Agreement. +"Participating Health Care Provider" or "Participating Provider" means, with +respect to a particular Product, any physician, hospital, ancillary, or other health care +provider that has contracted, directly or indirectly, with HMO or Payor to provide +Covered Services to Covered Persons, and that is designated by HMO or Payor as a +"participating provider" in such Product. +"Payor" means the entity that bears direct financial responsibility for paying from +its own funds, without reimbursement from another entity, the cost of Covered Services +rendered to Covered Persons under a Coverage Agreement. +"Payor Contract" means the contract with a Payor, pursuant to which HMO or an +Affiliate furnishes administrative services or other services in support of the Coverage +Agreements entered into, issued or agreed to by a Payor, which services may include +access to one or more of provider networks or vendor arrangements of HMO or an +Affiliate. The term "Payor Contract" includes a contract with a governmental authority +(also referred to herein as a "Governmental Contract") under which HMO, an Affiliate or +Payor arranges for the provision of Covered Services to eligible individuals. +"Provider Manual" means the manuals, requirements, policies and procedures +adopted by the HMO, an Affiliate, Payor, or its delegate to be followed by Participating +Providers, including, without limitation, those relating to utilization management, quality +management, grievances and appeals, and Product-specific, Payor-specific and State- +specific requirements, as the same may be amended from time to time by the HMO, an +Affiliate, Payor or its delegate. +1.4 +New Definitions. For purposes of the Individual Product only, Article I of the +Agreement is hereby amended by adding the new defined terms and definitions set forth below +to the end of that Article; such quoted terms, when appearing with initial capital letters in this +Amendment and Attachment or the Agreement, will have the meanings set forth below. +"Compensation Schedule" means at any given time the then effective schedule(s) +of maximum rates applicable to the Individual Product under which Provider and +Participating Providers will be compensated for the provision of Covered Services to +Covered Persons. Such Compensation Schedule(s) will be set forth or described in an +exhibit to the Individual Product Attachment. +"Individual Product" means those programs and health benefit arrangements +offered by or available from or through HMO or a Payor that provide incentives to +Covered Persons to utilize the services of certain contracted providers. The Individual +Product includes those Coverage Agreements entered into, issued or agreed to by a Payor +under which HMO an Affiliate, or its delegate furnishes administrative services or other +services in support of a health care program for an individual or group of individuals, +2 + +Start of Page No. = 3 +which may include access to one or more of the HMO 's or Payor's provider networks or +vendor arrangements. The Individual Product does not apply to any Coverage +Agreements that are specifically covered by another Product Attachment to the +Agreement. +"Coverage Agreement" means any agreement, program or certificate entered into, +issued or agreed to by a Payor, under which the Payor arranges for the delivery of health +care services to Covered Persons through one or more network(s) of providers or other +vendor arrangements. +"Product" means any program or health benefit arrangement designated as a +"product" by HMO or a Payor (e.g., HMO Product, Medicaid Product, Individual +Product, Payor-specific Product, etc.) that is now or hereafter offered by or available +from or through HMO, an Affiliate or a Payor that provides Covered Persons in such +product with incentives or access to Participating Providers in such product. For +purposes of the Individual Product Attachment, "Product" means the Individual Product. +"Product Attachment" means an Attachment setting forth certain requirements, +terms and conditions specific to one or more Products, including certain provisions that +must be included in a provider agreement under the laws of the State, which may be +alternatives to, or in addition to, the requirements, terms and conditions set forth in the +Agreement or the Provider Manual. +"Regulatory Requirements" means all applicable statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and +standards and requirements of any accrediting or certifying organization, including, but +not limited to, the requirements set forth in a Product Attachment. +"State" means the State of Ohio, unless otherwise defined in an Attachment for +purposes of that Attachment. +2. +Individual Product Attachment. +2.1 +Product Attachment. +This Section 2 constitutes the "Individual Product +Attachment" ("Product Attachment") and is incorporated into the Agreement between Provider +and HMO. It supplements the Agreement by setting forth specific terms and conditions that +apply to the Individual Product with respect to which a Participating Provider has agreed to +participate, and with which a Participating Provider must comply in order to maintain such +participation. +2.2 +Participation. +(a) +Unless otherwise specified in this Product Attachment and as limited by +Section 2.2(b) below, all Participating Providers under the Agreement will participate in the +Individual Product as "Participating Providers," and will provide to Covered Persons enrolled in +or covered by a Individual Product, upon the same terms and conditions contained in the +3 + +Start of Page No. = 4 +Agreement, as supplemented or modified by this Product Attachment, those Covered Services +that are provided by Participating Providers pursuant to the Agreement. In providing such +services, Provider shall, and shall cause Participating Providers, to comply with and abide by the +provisions of the Agreement, including this Product Attachment and the Provider Manual. +(b) +Provider and Participating Providers may only identify themselves as a +Participating Provider for those Individual Products in which the Participating Provider actually +participates as provided in the Agreement and this Product Attachment. Provider acknowledges +that HMO, an Affiliate or a Payor may have, develop or contract to develop various Individual +Products or provider networks that have a variety of provider panels, program components and +other requirements, and that all or certain of HMO's duties with respect to the Individual Product +may be delegated to an Affiliate, a Payor or their delegates. Neither HMO nor any Payor +warrants or guarantees that any Participating Provider: (i) will participate in all or a minimum +number of provider panels, (ii) will be utilized by a minimum number of Covered Persons, or +(iii) will indefinitely remain a Participating Provider or member of the provider panel for a +particular network or Individual Product. +2.3 +Attachment. This Product Attachment includes at Exhibit 1 the Regulatory +Requirements with which Participating Providers are required to comply in connection with their +participation in the Individual Product. Any additional Regulatory Requirements that may apply +to Participating Providers are or will be set forth in the Provider Manual or another Attachment +and are incorporated herein by this reference. This Product Attachment also includes a +Compensation Schedule at Exhibit 2. +2.4 +Term. The term of the Participating Providers' participation in the Individual +Product will commence as of the Effective Date and, thereafter, will be coterminous with the +term of the Agreement unless terminated pursuant to the Agreement or this Product Attachment. +The participation of any Participating Provider as a "Participating Provider" in an Individual +Product may be terminated by either party giving the other party at least ninety (90) days' prior +written notice of such termination; in such event, Provider shall immediately notify the affected +Participating Provider of such termination. +2.5 +Conflict and Construction. +This Amendment and Attachment modifies, +supplements and forms a part of the Agreement. Except as otherwise provided in this +Amendment and Attachment, the terms and conditions of the Agreement will remain unchanged +and +in full force and effect. In the event of any conflict or inconsistency between the provisions +of the Agreement (or any other Attachment) and the provisions of this Product Attachment, the +terms and conditions of this Product Attachment will govern with respect to health care services, +supplies or accommodations (including Covered Services) rendered to Covered Persons enrolled +in or covered by the Individual Product. To the extent Provider or any Participating Provider is +unclear about its, his or her respective duties and obligations, Provider or the applicable +Participating Provider shall request clarification from HMO. +4 + +Start of Page No. = 5 +IN WITNESS WHEREOF, the Parties hereto have executed and delivered this +Amendment as of the date first set forth above. +HMO: +Provider: +Berkley +Community Health +Care +Authorized Signature +Authorized Signature +Printed Name: John Snow +Printed Name: +Title: Vice President, Network +Management +Title: +Date: +Date: +Tax ID Number: +State Medicaid Number: +5 + +This page has 0 signature. + +Start of Page No. = 6 +EXHIBIT 1 +TO THE INDIVIDUAL PRODUCT ATTACHMENT +REGULATORY REQUIREMENTS +This Exhibit sets forth the provisions that are required by State or federal law to be +included in the Agreement with respect to the Individual Product. To the extent that a Payor, +Coverage Agreement, or Covered Person is subject to the law cited in the parenthetical at the end +of a provision on this Exhibit, such provision will apply to the rendering of Covered Services to a +Covered Person of such Payor, to a Covered Person with such Coverage Agreement, or to such +Covered Person, as applicable. +OH-1 Services. The Provider Manual describes (a) the specific health care services for +which each Participating Provider is responsible, including limitations or conditions on such +services (if any); (b) the rights and responsibilities of HMO and a Payor, and of the Participating +Providers, with respect to administrative policies and programs, including, but not limited to, +payments systems, utilization review, quality assurance, assessment, and improvement programs, +credentialing, confidentiality requirements, and any applicable federal or state programs; and (c) +the specifics of any obligation on a Participating Provider that is a primary care provider to +provide, or to arrange for the provision of, Covered Services twenty-four (24) hours per day, +seven (7) days per week. The procedures for the resolution of disputes arising out of the +Agreement are sent forth in the Agreement or Provider Manual. (OHIO REV. CODE §§ +1751.13(C)(1); 1751.13(C)(4); 1751.13(C)(10); 1751.13(C)(11)) +OH-2 Covered Person Hold Harmless. Each Participating Provider agrees that in no +event, including but not limited to nonpayment by HMO or the Payor, insolvency of HMO or the +Payor, or breach of the Agreement, shall the Participating Provider bill, charge, collect a deposit +from, seek remuneration or reimbursement from, or have any recourse against, a Covered Person +or person to whom health care services have been provided, or person acting on behalf of the +Covered Person, for Covered Services provided pursuant to the Agreement. This does not +prohibit the Participating Provider from collecting co-insurance, deductibles, or copayments as +specifically provided in the evidence of coverage, or fees for uncovered health care services +delivered on a fee-for-service basis to persons referenced above, nor from any recourse against +HMO, the Payor or their respective successors. This Section shall survive the termination of the +Agreement with respect to Covered Services provided under the Agreement during the time the +Agreement was in effect, regardless of the reason for the termination, including the insolvency of +the Payor. (OHIO REV. CODE § 1751.13(C)(2); 1751.13(C)(12); 1751.60(C)) +OH-3 Continuity of Care. Each Participating Provider shall continue to provide +Covered Services to patients that were Covered Persons under the Agreement in the event of +HMO's or the Payor's insolvency or discontinuance of operations. Each Participating Provider +shall continue to provide Covered Services to patients that were Covered Persons under the +Agreement as needed to complete any Medically Necessary procedures commenced but +unfinished at the time of HMO's or the Payor's insolvency or discontinuance of operations. The +completion of a Medically Necessary procedure shall include the rendering of all Covered +Services that constitute Medically Necessary follow-up care for that procedure. The foregoing +6 + +Start of Page No. = 7 +does not require the Participating Provider to continue to provide any Covered Service after the +occurrence of any of the following: (a) the end of the thirty-day period following the entry of a +liquidation order under Chapter 3903 of the Ohio Revised Code; (b) the end of the Covered +Person's period of coverage for a contractual prepayment or premium; (c) the Covered Person +obtains equivalent coverage with another health insuring corporation or insurer, or the Covered +Person's employer obtains such coverage for the Covered Person; (d) the Covered Person or the +Covered Person's employer terminates coverage under the Coverage Agreement or Payor +Contract; (e) a liquidator effects a transfer of HMO's or the Payor's obligations under the +contract under Section 3903.21(A)(8) of the Ohio Revised Code. (OHIO REV. CODE § +1751.13(C)(3)) +OH-4 Records. Each Participating Provider shall keep confidential and make available +those health records maintained by the Participating Provider to monitor and evaluate the quality +of care, to conduct evaluations and audits, and to determine on a concurrent or retrospective +basis the necessity of and appropriateness of health care services provided to Covered Persons. +Each Participating Provider shall make these health records available to appropriate State and +federal authorities involved in assessing the quality of care or in investigating the grievances or +complaints of Covered Persons. Each Participating Provider shall comply with applicable State +and federal laws related to the confidentiality of medical or health records. (OHIO REV. CODE § +1751.13(C)(5)) +OH-5 Assignment. The contractual rights and responsibilities under the Agreement may +not be assigned or delegated by the Participating Provider without the prior written consent of +HMO. (OHIO REV. CODE 1751.13(C)(6)) +OH-6 Insurance. Each Participating Provider shall maintain adequate professional +liability and malpractice insurance, and shall notify HMO not more than ten (10) days after the +Participating Provider's receipt of notice of any reduction or cancellation of such coverage. +(OHIO REV. CODE § 1751.13(C)(7)) +OH-7 Covered Person Rights. Each Participating Provider shall observe, protect, and +promote the rights of Covered Persons as patients. Each Participating Provider shall provide +health care services without discrimination on the basis of a patient's participation in the health +care plan, age, sex, ethnicity, religion, sexual preference, health status, or disability, and without +regard to the source of payments made for health care services rendered to a patient. This +requirement shall not apply to circumstances when the Participating Provider appropriately does +not render services due to limitations arising from the Participating Provider's lack of training +experience, or skill, or due to licensing restrictions. (OHIO REV. CODE §§ 1751.13(C)(8); +1751.13(C)(9)) +OH-8 Definitions. The terms used in the Agreement and defined by Chapter 1751 of the +Ohio Revised Code are to be construed when used in the Agreement in a manner consistent with +those statutory definitions (OHIO REV. CODE § 1751.13(C)(13)) +OH-9 Payor's Role. Each Participating Provider acknowledges that the Payor is a third- +party beneficiary to the Agreement, and that each Payor retains the right to approve or +7 + +Start of Page No. = 8 +disapprove the participation of the Participating Provider with respect to any provider panel or +network available for a particular Coverage Agreement. (OHIO REV. CODE § 1751.13(F)) +OH-10 Oversight. Each Participating Provider acknowledges HMO's statutory +responsibility to monitor and oversee the offering of Covered Services to Covered Persons. +(OHIO REV. CODE § 1751.13(G)) +OH-11 Third Party Access. The Agreement applies to network rental arrangements. One +purpose of the Agreement is selling, renting or giving HMO rights to the services of the +Participating Provider, including other preferred provider organizations, and the third party +accessing the Participating Provider's services is any of the following: (i) a Payor or a third-party +administrator or other entity responsible for administering claims on behalf of the Payor; (ii) a +preferred provider organization or preferred provider network that receives access to the +Participating Provider's services pursuant to an arrangement with the preferred provider +organization or preferred provider network in a contract with the Participating Provider that is in +compliance with Ohio Rev. Code § 3963.02(A)(1)(c), and is required to comply with all of the +terms, conditions, and affirmative obligations to which the originally contracted primary +participating provider network is bound under its contract with the Participating Provider, +including, but not limited to, obligations concerning patient steerage and the timeliness and +manner of reimbursement; (iii) an entity that is engaged in the business of providing electronic +claims transport between HMO and the Payor or third-party administrator and complies with all +of the applicable terms, conditions, and affirmative obligations of HMO's contract with the +Participating Provider including, but not limited to, obligations concerning patient steerage and +the timeliness and manner of reimbursement; (iv) an employer or other entity providing coverage +for health care services to its employees or members, and that employer or entity has a contract +with HMO or its Affiliate for the administration or processing of claims for payment for services +provided pursuant to the Agreement with the Participating Provider; or (v) an entity that is an +Affiliate or subsidiary of HMO or is providing administrative services to, or receiving +administrative services from, HMO or an Affiliate or subsidiary of HMO. (OHIO REV. CODE § +3963.02) +OH-12 Summary Disclosure Form. The summary disclosure form, attached hereto as +Exhibit 1-A, is incorporated herein by this reference. (OHIO REV. CODE § 3963.03) +8 + +Start of Page No. = 9 +EXHIBIT 1-A TO THE INDIVIDUAL PRODUCT ATTACHMENT +REGULATORY REQUIREMENTS +SUMMARY DISCLOSURE FORM +(1) Compensation terms +(a) Manner of payment +[X] Fee for service +[] Capitation +[] Risk +[ ] Other +See +(b) Fee schedule available at http://www.cms.gov/CenterProvider-Type/All-Fee-For- +Service-Providers +(c) Fee calculation schedule available at Exhibit 2 of the Individual Product Attachment +(d) Identity of internal processing edits available at www.BCHPohio.com +(e) Information in (c) and (d) is not required if information in (b) is provided +(2) List of products or networks covered by this contract +[x _CFC Medicaid +[x ] _ABD Medicaid +[x _Medicare Advantage +[ x] _Individual Product +(3) Term of this contract 3 years with automatic renewal +(4) Contracting entity or payer responsible for processing payment available at +www.company.com +(5) Internal mechanism for resolving disputes regarding contract terms available at +www.company.com +(6) Addenda to contract Title Subject +(a) State of Ohio Medicaid Addendum +(b) Medicare Advantage Addendum +(c) Individual Product Attachment +(7) Telephone number to access a readily available mechanism, such as a specific web site +address, to allow a participating provider to receive the information in (1) through (6) from +the payer. 1-866-296-8371 +IMPORTANT INFORMATION -- PLEASE READ CAREFULLY +The information provided in this Summary Disclosure Form is a guide to the attached Health +Care Contract as defined in section 3963.01(G) of the Ohio Revised Code. The terms and +conditions of the attached Health Care Contract constitute the contract rights of the parties. +Reading this Summary Disclosure Form is not a substitute for reading the entire Health Care +9 + +Start of Page No. = 10 +Contract. When you sign the Health Care Contract, you will be bound by its terms and +conditions. These terms and conditions may be amended over time pursuant to section 3963.04 +of the Ohio Revised Code. You are encouraged to read any proposed amendments that are sent to +you after execution of the Health Care Contract. Nothing in this Summary Disclosure Form +creates any additional rights or causes of action in favor of either party. +10 + +Start of Page No. = 11 +EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT +PROVIDER COMPENSATION SCHEDULE +COMMERCIAL-EXCHANGE PRODUCT +PROFESSIONAL SERVICES +For Covered Services provided to Covered Persons, Payor shall pay Provider the lesser of: (i) the +Provider's Allowable Charges; or (ii) one hundred percent (100%) of the Payor Medicare fee +schedule in effect on the date of service and specific to the services rendered, less any applicable +coinsurance or deductible. This fee schedule is based on the CMS/Medicare RBRVS relative +values and for certain codes alternative fee sources may be used. +Additional Provisions: +Code Change Updates. Updates to existing billing-related codes shall become effective on the +date ("Code Change Effective Date") that is the later of: (i) the first day of the month following +thirty (30) days after publication by the governmental agency having authority over the +applicable product of such governmental agency's acceptance of such code updates; or (ii) the +effective date of such code updates, as determined by such governmental agency. Claim +processed prior to the Code Change Effective Date shall not be reprocessed to reflect any code +updates. +Modifier. Unless specifically indicated otherwise, Fee Amounts listed in the fee schedule +represent global fees and may be subject to reductions based on appropriate Modifier (for +example, professional and technical modifiers). As used in the previous sentence, "global fees" +refers to services billed without a Modifier, for which the Fee Amount includes both the +professional component and the technical component. Any co-payment, deductible or +coinsurance that the customer is responsible to pay under the customer's benefit contract will be +subtracted from the listed Fee Amount in determining the amount to be paid by the payer. The +actual payment amount is also subject to matters described in this agreement, such as the +Payment Policies. +Fee Sources. In the event CMS contains no published fee amount, alternate (or "gap fill") Fee +Sources may be used to supply the Fee Basis amount for deriving the Fee Amount. At such time +in the future as CMS publishes its own RBRVS value for that CPT/HCPCS code, Payor will use +the CMS fee amount for that code and no longer use the alternate Fee Source. +Anesthesia Modifier Pricing Rules. The dollar amount that will be used in the calculation of +time-based and non-time based Anesthesia Management fees in accordance with the Anesthesia +Payment Policy. Unless specifically stated otherwise, the Anesthesia Conversion Factor +indicated is fixed and will not change. The Anesthesia Conversion Factor is based on an +anesthesia time unit value of 15 minutes. +11 + +Start of Page No. = 12 +Multiple Procedure Pricing Rules. Multiple procedures performed during the same day will be +reimbursed at 100% for the primary procedure, 50% for the second procedure, and 50% for the +third procedure, subsequent procedures shall not be eligible for reimbursement. +Place of Service Pricing Rules. This fee schedule follows CMS guidelines for determining when +services are priced at the facility or non-facility fee schedule (with the exception of services +performed at Ambulatory Surgery Centers, POS 24, which will be priced at the facility fee +schedule). +Fee Change Updates. Updates to such fee schedule shall become effective on the date ("Fee +Change Effective Date") that is the later of: (i) the first day of the month following thirty (30) +days after publication by the governmental agency having authority over the applicable product +of such governmental agency's acceptance of such fee schedule updates; or (ii) the effective date +of such fee schedule updates, as determined by such governmental agency. Claims processed +prior to the Fee Change Effective Date shall not be reprocessed to reflect any updates to such fee +schedule. +Payment under this Exhibit. All payments under this Exhibit are subject to the terms and +conditions set forth in the Agreement, the Provider Manual and the Billing Manual. +Definitions: +1. Allowable Charges mean those Provider billed charges for services that qualify as +Covered Services +Note: +1. Except as modified or supplemented by this Attachment, the compensation set forth in +this Exhibit for the provision of Covered Services to Covered Persons enrolled in or +covered by the Commercial-Exchange Product is subject to all of the other provisions in +the Agreement (including the Provider Manual) that affect or relate to compensation for +Covered Services provided to Covered Persons. +12 \ No newline at end of file diff --git a/assets/sampleOne/hn_0109.pdf b/assets/sampleOne/hn_0109.pdf new file mode 100644 index 00000000..3e767f5c Binary files /dev/null and b/assets/sampleOne/hn_0109.pdf differ diff --git a/assets/sampleOne/hn_0109.txt b/assets/sampleOne/hn_0109.txt new file mode 100644 index 00000000..6ce5470e --- /dev/null +++ b/assets/sampleOne/hn_0109.txt @@ -0,0 +1,125 @@ +Document Index +EXHIBIT A-1 2 +COMMERCIAL BENEFIT PROGRAMS 2 +DIRECT NETWORK FEE-FOR-SERVICE 2RATE EXHIBIT 2 +MEDICARE ADVANTAGE PROGRAM 3DIRECT NETWORK FEE-FOR-SERVICE 3RATE EXHIBIT 3 +I. Payment Rates 3 +MEDI-CAL BENEFIT PROGRAM 4DIRECT NETWORK FEE-FOR-SERVICE 4RATE EXHIBIT 4 + + + +Start of Page No. = 1 +7.14 +Status as Independent Entities. None of the provisions of this Agreement is intended to create, +nor +shall be deemed or construed to create any relationship between Provider and All Health or a Payor other than +that of independent entities contracting with each other solely for the purpose of effecting the provisions of this +Agreement. Neither Provider nor All Health /Payor, nor any of their respective agents, employees or representatives +shall be construed to be the agent, employee or representative of the other. +7.15 +Addenda. Each Addendum to this Agreement is made a part of this Agreement as though set +forth fully herein. Any provision of an Addendum that is in conflict with any provision of this Agreement shall take +precedence and supersede the conflicting provision of this Agreement with respect to the subject matter of the +Addendum. +7.16 +Calculation of Time. The parties agree that for purposes of calculating time under this +Agreement, any time period of less than ten (10) days shall be deemed to refer to business days and any time period +of ten (10) days or more shall be deemed to refer to calendar days unless the term "business" precedes the term +"days". +7.17 +Waiver of Breach. The waiver of any breach of this Agreement by either party shall not +constitute a continuing waiver of any subsequent breach of either the same or any other provision(s) of this +Agreement. Further, any such waiver shall not be construed to be a waiver on the part of such party to enforce strict +compliance in the future and to exercise any right or remedy related thereto. +THIS CONTRACT CONTAINS A BINDING ARBITRATION CLAUSE, WHICH MAY BE ENFORCED +BY THE PARTIES. +IN WITNESS WHEREOF, the parties have executed this Agreement. +PROVIDER +ALL HEALTH +Smoke +Signature +Health Net Signature +Harvey +DUONG M.S. +Steve Carrol +Print Name +Print Name +MEDICAL DIRECTOR +VP Provider Network Management & Strategy +Title +Title +Dummy Group Name, Inc. +Group Name (If Applicable) +Date +3/28/2011 +01-2345678 +Tax Identification Number +Effective Date +4/15/2011 +2/2/2011 +Date +California Provider Participation Agreement +18 +Fee-For-Service Direct Network Template +HN-DN-PPA-11-03-2010 + +This page has 2 signature. + +Start of Page No. = 2 +EXHIBIT A-1 +COMMERCIAL BENEFIT PROGRAMS +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT +Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health or Payor shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary +Covered Services delivered under commercial Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges. +California Provider Participation Agreement +22 +Fee-For-Service Direct Network Template +HN-DN-PPA-11-03-2010 + + +-------Table Start-------- +7436be95-25d1-41ad-9abb-1d9e85b85440 +[['Category of Service', 'Compensation'], ['Covered Services delivered or arranged by Provider, excluding Laboratory services', '95% of CMS Allowable'], ['Anesthesia Services when provided by an Anesthesiologist or Certified Registered Nurse Anesthetist (American Society of Anesthesiology (ASA) unit scale)', '$39 / ASA unit'], ['Medical/Surgical Services by an Anesthesiologist or Certified Registered Nurse Anesthetist', '95% of CMS Allowable'], ['Laboratory Services performed in Provider or Professional Provider office', '95% of CMS Allowable'], ['Pharmaceuticals', '95% of the Average Wholesale Price (AWP)'], ['OB Services - CPT 59400: Global Obstetric care with vaginal delivery - CPT 59510: Global Obstetric care with cesarean delivery - CPT 59610: Vaginal Delivery after previous cesarean delivery - CPT 59618: Attempted vaginal delivery, resulting in cesarean', '$1,700.00 $1,700.00 $1,700.00 $1,700.00'], ['Immunizations', '95% of the Average Wholesale Price (AWP) as determined by Health Net.'], ['General Health Panel - CPT 80050: General Health Panel - CPT 80055: Obstetric Panel', '$20.00 $15.00'], ['By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established', '75% of billed charges for Covered Services']] + DIRECT NETWORK FEE-FOR-SERVICE RATE EXHIBIT +-------Table End-------- + +Start of Page No. = 3 +EXHIBIT B-1 +MEDICARE ADVANTAGE PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT +I. Payment Rates +Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges. +California Provider Participation Agreement +27 +Fee-For-Service Direct Network Template +HN-DN-PPA-11-03-2010 + + +-------Table Start-------- + +[['Category of Service', 'Compensation'], ['Covered Services delivered or arranged by Provider', '100% of CMS Allowable'], ['General Health Panel - CPT 80050: General Health Panel - CPT 80055: Obstetric Panel', '$20.00 $15.00'], ['By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established', '75% of billed charges for Covered Services']] +None +-------Table End-------- + +Start of Page No. = 4 +EXHIBIT C-1 +MEDI-CAL BENEFIT PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT +Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered pursuant to this Addendum, the lesser of: 100% of the State of California Medi-Cal Fee Schedule +rates in effect at the time of service, subject to any adjustments made by the State of California under the applicable +Medi-Cal Fee-For-Service Program; (ii) Fee-for-service rates for the commercial Benefit Program set forth in +Addendum A, Exhibit A-1; or (iii) Provider's billed charges. +California Provider Participation Agreement +34 +Fee-For-Service Direct Network Template +HN-DN-PPA-11-03-2010 \ No newline at end of file diff --git a/assets/sampleOne/hn_23-70.pdf b/assets/sampleOne/hn_23-70.pdf new file mode 100644 index 00000000..3586eea9 Binary files /dev/null and b/assets/sampleOne/hn_23-70.pdf differ diff --git a/assets/sampleOne/hn_23-70.txt b/assets/sampleOne/hn_23-70.txt new file mode 100644 index 00000000..9bfbc19e --- /dev/null +++ b/assets/sampleOne/hn_23-70.txt @@ -0,0 +1,313 @@ +Document Index +14001190 1 +to the 2PROVIDER SERVICES AGREEMENT 2between 2ALL HEALTH, INC. AFFILIATES 2and 2 +AMENDMENT 2 +THE REGENTS OF THE SCHOOL 2OF CALIFORNIA UCDD HEALTHCARE NETWORK 2 +ADDENDUM E 6 +FEE-FOR-SERVICE COMPENSATION SCHEDULE 6 +Assistant Surgeons: 6 +For Obstetrical Care: 6 +For Anesthesiology Services: 6 + + + +Start of Page No. = 1 +14001190 +Pages: 5 +1) TODAY'S DATE: 2010-01-29 +2) DOCUMENT TYPE +XCONTRACT +CORRESPONDENCE +TERM SHEET +3) PROVIDER TYPE +HOSP +PPG +ANCILLARY +POP +CLINIC +FQHC +4) PROVIDER SYSTEM: +5) PROVIDER NAME: UDCC Medical Group +6) +FOR AGREEMENTS INCLUDING ALL FORMS OF CONTRACTS: +AGREEMENT - DOCUMENT TYPE +PPA +AGR +(AMD +LOA +AAD +SET +CDM +EFFECTIVE DATE: 2005-01-01 +- 7) FOR SUPPORTING DOCUMENTS (ALL NON CONTRACTS): +DOCUMENT TYPE +TS +REI +SRS +COR +FND +OTHER: +YEAR RANGE: +8) TAX ID NUMBER: +12-3456789 +POST SCANNING +Scanned Electronic Document Verified +(initial please) +Placed in Electronic Provider Contract Files folder +(initial please) +Original Files removed and placed in Original Files Room +(initial please) +Conversion to Digital Files Completed +(initial please) + +Start of Page No. = 2 +AMENDMENT +to the +PROVIDER SERVICES AGREEMENT +between +ALL HEALTH, INC. AFFILIATES +and +THE REGENTS OF THE SCHOOL +OF CALIFORNIA UCDD HEALTHCARE NETWORK +The Provider Services Agreement ("Agreement") effective January 1, 2000, between The Regents of the School +of California, a Constitutional Corporation; on behalf of the UCDD Medical Group a Participating Physician Council +("PPC"), and All Health, Inc. Affiliates ("AHI"), as subsequently amended, is hereby further amended effective +January 1, 2005. +AHI and PPC hereby agree to amend the Agreement as follows: +1. +Section 4.3 Billing and Payment subsections (a), (c), and (d) only are hereby deleted and replaced as follows: +(a) +Billing. Provider shall submit to AHI or Payor via AHI's electronic claims submission +program or by hard copy, clean, complete and accurate claims for Contracted Services in accordance +with the Operations Manual and the applicable Benefit Program. Provider shall submit claims within +ninety (90) days of rendering Contracted Services. Where AHI is the secondary payor under +Coordination of Benefits, such ninety (90) day period shall commence immediately after the primary +payor has paid or denied the claim. If AHI does not receive the requested information from +Provider within said ninety (90) days, claim (s) shall be denied without recourse to resubmit and +AHI shall have no liability for such claim. +AHI shall not be under any obligation to pay Provider for any claim not timely submitted as set +forth above. Provider shall not seek payment from any Member in the event AHI does not pay +Provider for a claim not timely submitted. +(c) +Adjustments and Appeals Provider. shall submit requests for adjustments and/or +appeals regarding claim payments to AHI within three hundred sixty-five days (365) calendar days +after the date of the payment of such claim to Provider. In the event Provider fails to appeal a +claim within such time period, Provider shall not have the right to appeal such claim. +(d) +Offsetting AHI shall have the right to offset any amounts owed to AHI by PPG, +including but not limited to, amounts owed by PPG under loans guaranteed by AHI, errors, or AHI +interim payment for Contracted Services, including Capitation payments. Notwithstanding any +other provision of this Agreement or any other contract to the contrary, only deficits in the shared +risk programs which provide financial incentives for the control or management of Shared Risk +Services' expenses or utilization will neither be collected from PPG by AHI nor offset against +PPG Capitation; provided however, that AHI shall not be restricted from (i) offsetting such +deficits against payments to PPG including, but not limited to, surpluses from other shared risk +programs, stop loss payments, bonus or other incentive program payments; (ii) establishing +reasonable withholds from Capitation approved by DMHC as set forth in the applicable +Addendum to offset PPG liability when the cost of Shared Risk Services exceed the Shared Risk +Budget (Withhold Fund); or (iii) carrying forward such shared risk program deficits to be applied +against future year's program surpluses and Withhold Fund. Each PPG numbered site. shall be +calculated as a separate entity and any payments to or from PPG with multiple sites shall be net +amount due/owed from all sites. In no event shall PPG be required to make any cash payment to +AHI for any deficit in a shared risk program for institutional services. +To the extent AHI identifies financial liabilities, including overpayments, owed to AHI by PPG +under this Agreement, the intent to collect such financial liabilities shall be communicated to PPG. +Proof of such liabilities and the methodology used to make such determination shall be subject to +UCDD 2005 Amd.d +Effective January 1, 2005 + +Start of Page No. = 3 +external actuarial review, with PPG bearing the cost of such review. No collection of such +liabilities shall occur until PPG has a reasonable opportunity to conduct such review, provided that +such review occurs within ten (10) business days of communication to PPG by AHI +Concurrently, to the extent that PPG identifies financial liabilities owed to PPG by AH| +under +this +Agreement, the intent to collect such financial liabilities shall be communicated to AHI. Proof of +such liability, and the methodology used to make such determination shall be subject to external +actuarial review, with AHI bearing the cost of such review. No collection of such liability shall +occur until AHI has a reasonable opportunity to conduct such review, provided that such review +occurs within ten (10) days of communication to AHI by PP.G. +2. +Addendum B, Section B.1.1, Capitation Rates, is hereby deleted in its entirety and replaced with the +following: +1.1 +Capitation Rates. PPG Capitation for Standard HMO Members shall be determined on a +monthly basis by multiplying the following normalized PMPM rates by the age, sex and benefit +plan factors set forth in Addendum B for each assigned Member. Normalized rates represent the +PMPM prior to the adjustment for PPG's assigned Members' age, sex and benefit plan. Actual +PPG gross Capitation shall fluctuate from month to month to the extent that PPG's age, sex and +benefit plan mix fluctuates. +3. +Addendum B, Section C.1.1, Capitation Rates, is hereby deleted in its entirety and replaced with the +following: +1.1 +Capitation Rates. PPG Capitation for Small Group HMO Members shall be determined +on a monthly basis by multiplying the following normalized PMPM. rates by the age, sex and +benefit plan factors set forth in Addendum B for each assigned Member. Normalized PMPM rates +represent the PMPM prior to the adjustment for PPG's assigned Members' age, sex and benefit +plan. Actual PPG gross Capitation shall fluctuate from month to month to the extent that PPG's +age, sex and benefit plan mix fluctuates. +4. +Addendum C, Section B.2.1, Compensation for PPG Capitated Services, is deleted and replaced with the +following: +2.1 +Compensation for PPG Capitated Services. As compensation for rendering PPG +Capitated Services as defined herein, HMO shall pay PPG Capitation at forty. one and fifty eight +hundreds percent (41.58%) of Monthly Revenue as set forth below for each Medicare HMO Member +eligible to receive such services from PPG during any particular month. +Capitation shall be computed on the basis of the most current information available and shall be +paid by HMO by wire transfer on or before the fifteenth (15th) day of each month or the first +business day following the fifteenth if the fifteenth is a holiday or on a weekend or within two (2) +days of CMS's payment to HMO; whichever is later. Each Capitation payment shall be +accompanied by a remittance summary. The remittance summary identifies the total Capitation +payable and those Medicare HMO Members for whom Capitation is being paid. In the event of a +Capitation error, resulting in an overpayment or underpayment to PPG, HMO shall adjust +subsequent Capitation to offset such error. +UCDD Amendment 1/1/05 +2 + + +-------Table Start-------- + +[['Effective Period', 'Standard HMO'], ['January 1, 2005', '$75.15 PMPM']] +None +-------Table End-------- +-------Table Start-------- + +[['Effective Period', 'Small Group HMO'], ['January 1, 2005', '$67.59 PMPM']] +None +-------Table End-------- + +Start of Page No. = 4 +Per PPG's request and upon receipt of reconciliation report from PPG, AHI agrees to reevaluate +the withhold amount of $1.57 PMPM for the mental health and substance abuse services as set +forth in section 6 of this Amendment for the period of January 1, 2005-December 31,2005. Based +upon audit result AHI will adjust the capitation accordingly to ensure that the equivalent withhold +against Monthly Revenue does not exceed $1.57 PMPM for this period only. +AHI agrees to offer PPG's participating providers for Mental Health and substance abuse services +and will make best effort to direct Medicare HMO members to these providers. +5. +Addendum C, Section B.3.1, Shared Risk Budget, is deleted in its entirety and is replaced with the +following: +3.1 +Shared Risk Budget. At the final settlement, upon the event of a deficit, as a +contingency for any PPG liability, HMO shall deduct two percent %) of PPG's Capitation and +place such amount in the Withhold Fund as described in this Agreement. Each month, HMO shall +fund the Shared Risk Budget for each eligible Medicare HMO Member at forty-three and forty +three hundredths percent (43.43%) of Monthly Revenue. +6. +Addendum C.2, DIVISION OF FINANCIAL RESPONSIBILITY MATRIX OF HMO AND PPG +CAPITATED SERVICES MEDICARE BENEFIT PROGRAM, of the Agreement shall be amended only for the +following Service categories as indicated below: +7. +Addendum E is deleted in its entirety and is replaced with a new Addendum E attached. +8. +Addendum F.1 Fee-For-Service Compensation Schedule is amended by adding the following: +Injectables: As to injectables for which HMO is responsible for reimbursement, HMO shall +compensate PPG at one hundred ten percent (110%) of the State of California Medi-Cal Fee +Schedule rates in effect at the time of service. If such medication is not listed on the Medi-Cal Fee +Schedule, the value will be determined by the Average Wholesale Price (AWP) as calculated by +HNI in accordance with the Medi-Cal methodology +Such rates shall be payment-in-full, except for applicable copayments. HMO shall reimburse PPG +at such rates, less applicable copayment. HMO shall not be responsible for reimbursing the +Member Physicians for such injectables. PPG shall seek reimbursement from HMO for such +injectables and shall submit claims for such services to HMO using the CMS 1500 Form and the +appropriate CPT-4, HCPCS and NDC codes. +UCDD Amendment 1/1/05 +-3-- + + +-------Table Start-------- +c11f6b8d-47e5-4a67-9d2b-6fe6f18fd08e +[[None, 'PPG CAPITATED SERVICES', 'HMO RISK SERVICES', 'SHARED RISK/HOSPITAL CAPITATED SERVICES'], ['CHEMICAL DEPENDENCE', None, None, None], ['(Rehabilitation Services)', None, None, None], ['- Inpatient Facility Component', None, 'X', None], ['- Inpatient Professional Component', '[ ]', 'X', None], ['- Outpatient Facility Component', None, None, None], ['- Outpatient Professional Component', None, None, None], ['- Inpatient Detox Facility Component', None, None, 'X'], ['- Inpatient Detox Professional Component', None, None, None], ['MENTAL HEALTH-Inpatient -', None, None, None], ['- Facility Component', '[ ]', '[X]', '[ ]'], ['- Professional Component', None, None, None], ['MENTAL HEALTH - Outpatient', None, None, None], ['Facility Component', '[ ]', 'X [X]', '[ ]'], ['- Professional Component', None, None, None]] + 6. Addendum C.2, DIVISION OF FINANCIAL RESPONSIBILITY MATRIX OF HMO AND PPG CAPITATED SERVICES MEDICARE BENEFIT PROGRAM, of the Agreement shall be amended only for the following Service categories as indicated below: 7. Addendum E is deleted in its entirety and is replaced with a new Addendum E attached. +-------Table End-------- + +Start of Page No. = 5 +9. +AHI I shall pay PPG eighty-five thousand dollars ($85,000) as a lump sum payment for PPG to use to fund a +twenty four month e-visit program with Relay Health ("E-Visit Program"). PPG shall use such monies to implement +the E-Visit Program for Commercial Members from January 1; 2005 through December 31 2006. PPG shall provide +information regarding the usage and benefits of the E-Visit Program to AHI upon request. In the event that PPG and +Relay Health do not execute an agreement by July 1, 2005, PPG shall pay AHI eighty-five thousand dollars, +($85,000) within thirty (30) days of such date. +In consideration for all of the payment terms set forth herein, including but not limited to the increase in the +Commercial rates, PPG understands and agrees that HNI shall be the exclusive Medicare Advantage payor +contracted with Provider, for any and all Medicare Advantage products including, but not limited to, HMO products, +PPO products or demonstration projects, from January 1, 2005 through December 31, 2006. +10. +Except as otherwise provided in this Amendment, all other terms and conditions of the Agreement remain +unchanged and in full force and effect. +IN WITNESS WHEREOF, the parties hereto have executed this Amendment on the dates indicated below. +UDCC Medical Group +All Health, Inc. Affiliates +Hemith +Signature +Street +Signature +Tom Pete +Kinjal Dave +CFO, UDCC Health Sciences +Network Management & Development Officer +1/20/05 +2-2-05 +Date +Date +Provider Tax Identification Number: 12-3456789 +UDCC Amendment 1/1/05 +-4- + +This page has 2 signature. + +Start of Page No. = 6 +ADDENDUM E +FEE-FOR-SERVICE COMPENSATION SCHEDULE +PPG or Member Physician shall be compensated for non-capitated Contracted Services, less applicable Copayments, in +an amount equal to the lesser of: (a) one hundred ten percent (110%) of the Medicare allowable charges based on the +Medicare Resource Based Relative Value Scale (RBRVS) unit values and CMS Geographical Practice Cost Indices as +published in the most current published edition of the Federal Register; or (b) seventy-five percent (75%) of PPG's +allowable billed charges. +For "by report".-procedures, procedures not listed, or procedures with relativities not established in RBRVS, PPG shall +be compensated at sixty percent (60%) of PPG or the Participating Provider's billed charges, less any applicable +Copayment. +Injectables and HMO Designated Vendor. As to injectables, for which HMO is responsible for reimbursement, +PPG shall obtain such injectables from the HMO designated vendors as described in the Operations Manual. If such +injectables are not available from the HMO designated vendor, PPG shall be compensated at the lesser of: a) the +PPG's billed charges; b) the CMS Single Drug Pricer c) the Average Wholesale Price (AWP) as established by First +Databank, Medispan, MDX and as reflected in HMO's database which is updated semi-annually, less ten percent +(10%); or d) the lowest acquisition cost provided through services made available by HMO. AWP reimbursement is +based on the lowest AWP for the specific antigen. Multi-dose vials shall be reimbursed on a per dose basis. +Assistant Surgeons: +PPG or Participating Provider shall be compensated for Contracted Services at twenty percent (20%) of the surgeon's +reimbursement as determined above. +For Obstetrical Care: +Compensation for obstetrical services shall be at the lesser of the PPG's billed charges, or: +For Anesthesiology Services: +PPG shall be compensated for anesthesiology services which are Covered Services at the lesser of (a) $34. 00 per unit +value in accordance with the American Society of Anesthesiology (ASA) unit scale, or (b) 75% of the PPG's usual +billed charges. +OB Epidural shall be compensated under the unit value conversion factor stated above for Anesthesiology and applied +to the ASA Base Units and Time Units as set forth below: +BASE UNITS: +TIME UNITS: +CONFIDENTIAL, PROPRIETARY AND TRADE SECRET +UCDD Amendment 1/1/05 +-5- + + +-------Table Start-------- +196c8e04-d288-4bae-b6a5-6f91e415c2cf +[['CPT 59400-Global Obstetric care with vaginal delivery', '$1700.00'], ['CPT 59510-Global Obstetric care with Cesarean delivery', '$1700.00']] + Compensation for obstetrical services shall be at the lesser of the PPG's billed charges, or: +-------Table End-------- +-------Table Start-------- +e5b15a0a-377a-4534-b3aa-ad5a33399276 +[['00955 - Continuous epidural, labor and vaginal delivery', '5 units'], ['00857 - Continuous epidural, labor and C-Section', '7 units'], ['00850 - Planned C-Section', '7 units']] + Compensation for obstetrical services shall be at the lesser of the PPG's billed charges, or: BASE UNITS: +-------Table End-------- +-------Table Start-------- +267e60c0-1116-4569-8c82-0e2fc14ffeb7 +[[None, None], ['Start up time:', 'up to three units for first hour of labor time, plus'], ['Labor time:', 'two units for each additional hour of labor, plus'], ['Surgery time:', 'one unit for each fifteen minute interval of surgical time if labor goes: into C-Section, or of planned C-Section']] + Compensation for obstetrical services shall be at the lesser of the PPG's billed charges, or: BASE UNITS: TIME UNITS: +-------Table End-------- \ No newline at end of file diff --git a/assets/sampleOne/hn_24-83.pdf b/assets/sampleOne/hn_24-83.pdf new file mode 100644 index 00000000..377de21e Binary files /dev/null and b/assets/sampleOne/hn_24-83.pdf differ diff --git a/assets/sampleOne/hn_24-83.txt b/assets/sampleOne/hn_24-83.txt new file mode 100644 index 00000000..b47da7c3 --- /dev/null +++ b/assets/sampleOne/hn_24-83.txt @@ -0,0 +1,126 @@ +Document Index +06/15/2016 04:18 FAX 1 +002/003 1 +06/30/2016 23:54 FAX 2 +003/005 2 +BENEFIT PROGRAMS AND AFFILIATES 2 +I. 2BENEFIT PROGRAMS 2 +II. Affiliates. 2 +ADDENDUM B 3 +PREFFERRED PROVIDER ORGANIZATION (PPO) 3EXCLUSIVE PROVIDER ORGANIZATION (EPO) 3BENEFIT PROGRAMS 3Fee For Service Compensation Schedule 3 +Compensation for Covered Services: 3 +For Anesthesiology Services: 3 + + + +Start of Page No. = 1 +06/15/2016 04:18 FAX +002/003 +IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of the effective date set forth on this +signature page. +All Health Inc. Affiliates +PHYSICIAN +Smith +Leslie K. Meser +(PRINT NAME) +Mashi 6.00m +All Health +Signature +Signature +Effective Date +11/19/04 +Date +Physician Specialty +Internal Medicine +Physician Federal Tax Identification Number: +123-45-6789 +Primary Office +Address: +456 Oak Avenue, Greenville County, +CA, 92222 +Billing Address: +some +Telephone Number: 123-456-7890 +Facsimile Number: 123-456-7890 +Medicare Certified: +YES +NO +CHDP Certified: +YES +NO +Medical License # B99999 +K00001 +UPIN # +PPO/EPO I +All Products April 2004 +13 + +This page has 2 signature. + +Start of Page No. = 2 +06/30/2016 23:54 FAX +003/005 +ADDENDUM A +BENEFIT PROGRAMS AND AFFILIATES +I. +BENEFIT PROGRAMS +Benefit Program participation included under this Agreement is as follows: +II. Affiliates. +Upon execution of this Agreement, the Affiliates primarily using this Agreement include, but are +not limited to, the following: All Health of California, Inc; All Health Life Insurance Company; +Health Foundation Systems Life and Health Insurance Company: All Health Federal Services; +FFD Managed Care Services, Inc.; FFD Claims Services, Inc. The Affiliates are defined in +Section 1.1 of this Agreement. +Notwithstanding the foregoing, Physician agrees that any other Affiliate of HNI not listed above may access +the rates set forth in this Agreement and Addenda. This would include Members of non-California based affiliates +who may be treated by Physician. +PPO/EPO +All Products April 2004 +14 + + +-------Table Start-------- +c832aecc-a2f3-4c61-a810-271937dabb25 +[['BENEFIT PROGRAM', 'ADDENDUM', 'Physician PARTICIPATION Yes/No', 'Effective Date of Benefit Program'], ['PPO/EPO', 'B', 'Yes', 'Upon Execution of Agreement'], ['Commercial HMO/ Commercial POS', 'C', 'Yes -', 'Upon Written Notice from HNI'], ['Medicare HM0/ Medicare POS Medicare Select', 'C', 'Yes', 'Upon Written Notice From HNI'], ['Medi-Cal', 'D', 'Yes', 'Upon Written Notice from HNI'], ['CHAMPUS/TRICARE', 'E', 'NA', 'NA'], ['Occupational Medicine', 'F', 'Yes', 'Upon Written Notice from HNI'], ['Healthy Families', 'G', 'Yes', 'Upon Written Notice from HNI']] + Benefit Program participation included under this Agreement is as follows: +-------Table End-------- + +Start of Page No. = 3 +ADDENDUM B +PREFFERRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule +This Addendum shall take effect on the Effective Date set forth on the signature page of this Agreement. +Compensation for Covered Services: +Compensation shall be based on the Resource Based Relative Value Scale (RBRVS), the Conversion Factors (CF) and +the Geographic Practice Cost Indices (GPCI) adjustment factors promulgated by the Centers for Medicare and Medicaid +Services (CMS). +Physician shall be compensated for Covered Services in an amount, less applicable Copayments and/or coinsurance, that +is equal to the lesser of: (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for "by +report" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% +of billed charges not to exceed usual, reasonable and customary charges, or (c) Physicians usual billed charges. +Medications: Medications provided or administered by Physician shall be billed using HCPC codes if +available and shall be compensated at the lesser of (a) 90% of the HCFA participating provider fee schedule +for Physician's locality, or (b) for medications for which a HCPC code has not been established Physician shall +bill using the NDC code, drug and manufacturer name and shall be compensated at the Average Wholesale +Price, or (c) Physician's billed charge amount not to exceed usual, reasonable and customary charges. +Immunizations: Immunization administered by Physician shall be billed using CPT-4 codes and shall be +compensated at the lesser of a) the Physician's billed charges, or b) the Average Wholesale Price (AWP) as +established by MediSpan less ten percent (10%). This AWP fee schedule is reviewed and subject to +adjustment on a semi annual basis. +Laboratory Procedures: Compensation for laboratory procedures provided and administered by Physician +shall be at the lesser of 90% of the HCFA participating provider fee schedule for Physician locality, or +Physician's usual billed charge amount not to exceed usual, reasonable and customary charges. +For Obstetrical Care: Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: +CPT 59400-Global Obstetric care with vaginal delivery. +$1700.00 +CPT 59510-Global Obstetric care with Cesarean delivery +$1700.00 +For Anesthesiology Services: +Physician shall be compensated for anesthesiology services which are Covered Services at the lesser of (a) $39.00 per +unit value in accordance with the American Society of Anesthesiology (ASA) unit scale, or (b) 75% of the Physician's +usual billed charges. +PPO/EPO +All Products April 2004 +15 \ No newline at end of file diff --git a/assets/sampleOne/investment_pdf_sample-ABC.csv b/assets/sampleOne/investment_pdf_sample-ABC.csv new file mode 100644 index 00000000..91fdc21f --- /dev/null +++ b/assets/sampleOne/investment_pdf_sample-ABC.csv @@ -0,0 +1,3291 @@ +,Contract Name,Agreement_Name (Contract Title),PAYER NAME,Health Plan State,Affiliate (Y/N),Credentialing Application Indicator,Term Clause,Contract Auto-Renewal Indicator,Termination Date,Termination Upon Notice - Days,Termination With Cause - Days,Non-Renewal Language,Non-Renewal - Days,Amend Contract Upon notice Flag (Y/N),Timeframe to Object - Days,Assignments Clause (Y/N),Contract Effective Date,IRS #,IRS_Name,MULTIPLE IRS NAMES,NPI (10-digits),NPI Name,PROV_GROUP_TIN_SIGNATORY,PROV_TIN_OTHER,PROV_NPI_OTHER,Notice to Provider Name,Notice to Provider Address,Sequestration Language,Sequestration Reductions (Y/N),Parent Agreement Code,Pages,Page_Num,Attachment/Exhibit,Line of Business,Provider Type,Provider Type - Level 2,IP/OP,Service Type,Plan Type,"Lesser of Logic language, included (Y/N)",Lesser of Rate,Reimb. Methodology,Reimb. Methodology_Short,If rate is % of Payor or MCR [STANDARD],If rate is % of Payor or MCR [STANDARD]_Short,FLAT FEE,Default Term,Default Rate,"Inclusion of essential RBRVS ""Fee Source"" Language (Y/N)","CDM Neutralization Language, included (Y/N)",CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE,"IP - DSH/IME/UC, included (Y/N)",IP - Stoploss Catastrophic Threshold,Exclusions,Not to Exceed,Escalator or COLA (Y/N),"Escalator I, Eff. Date",Delegated Function Indicator,Delegated Terms,ECM,National Agreement Indicator,Cost Settlement (Y/N),Cost Settlement (Language),Late Paid Claims (Y/N),Late Paid Claims (Language),Deemer Amendment,Regulatory Requirements,Recovery Rights,Arbitration and Disputes,Exclusivity Requirement (Y/N),Exclusivity Requirement (Language),Payor,Participation in Products,Clean Claim,Independent Review (Y/N),Independent Review (Language),Indemnification,Access to Medical Records,Member Confinement Days Language (Y/N),Member Confinement Days Language (Language),Network Access Fees (Y/N),Network Access Fees (Language),Payment in Advance of Claims Submission Language (Y/N),Payment in Advance of Claims Submission Language,Eligibility Verification,Preauthorization,Policies and Procedures,Insurance Requirement,Carve-Out Vendors,Conflicts Between Certain Documents (Y/N),Conflicts Between Certain Documents (Language),Relationship of Parties (Y/N),Relationship of Parties (Language),Nonstandard Appeals Process (Y/N),Nonstandard Appeals Process (Language),Product Removal,Disparagement Prohibition (Y/N),Disparagement Prohibition (Language),Claims Editing Language (Y/N),Claims Editing Language (Language),Guarantee of Provider Yield (Y/N),Guarantee of Provider Yield (Language),HCBS Services,Add On Reimbursement (Y/N),Add On Reimbursement (Language),PMPM,Single Code Multiple Rates (Y/N),Single Code Multiple Rates (Language),Invoice Pricing (Y/N),Invoice Pricing (Language),Medical Necessity Language (Y/N),Medical Necessity Language (Language),Template,Provider-Based Billing Exclusion (Y/N),Provider-Based Billing Exclusion (Language) +0,Filename: tx_76-06.txt,PARTICIPATING PROVIDER AGREEMENT,"SUFFOLK HealthPlan, Inc.",Texas,Y,N,,N,,,,,,N,,N,,,BEST HEALTHCARE PROVIDER,BEST HEALTHCARE PROVIDER,,,,,,BEST HEALTHCARE PROVIDER,,,N,76-06,2,,,,,,,,,,,,,,,,,,,,,,,,,,,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable federal and state statutes, regulations, regulatory guidance, judicial or administrative rulings, requirements of Governmental Contracts and standards and requirements of any accrediting or certifying organization, including, but not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.",,"""Clean Claim"" has, as to each particular Product, the meaning set forth in the applicable Product Attachment or, if no such definition exists, the Provider Manual.",N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,,,N,,,,Y,N, +1,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,24.0,"EXHIBIT B-1 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,STAR,N,,All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +2,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,24.0,"EXHIBIT B-1 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,STAR+PLUS,N,,All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +3,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,24.0,"EXHIBIT B-1 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,CHIP Perinatal,N,,All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +4,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,25.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +5,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,25.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services,Medicaid,Y,100% of AC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: Applied Behavior Analysis (ABA) Services and Rates",,,,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +6,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Medicaid,N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +7,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Group adaptive behavior treatment by protocol, administered by technician under the direction of a physician or other QHP, face-to-face with 2 or more patients, each 15 minutes",Medicaid,N,,"Procedure Code : 97154 | Description : Group adaptive behavior treatment by protocol, administered by technician under the direction of a physician or other QHP, face-to-face with 2 or more patients, each 15 minutes | Rate Per Unit (15 minutes) : $ $11.00",Flat Fee,,,$11.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +8,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Adaptive behavior treatment, with protocol modification, administered by physician or other QHP, which includes simultaneous direction of technician, face-to-face with one patient, each 15 minutes",Medicaid,N,,"Procedure Code : 97155 | Description : Adaptive behavior treatment, with protocol modification, administered by physician or other QHP, which includes simultaneous direction of technician, face-to-face with one patient, each 15 minutes | Rate Per Unit (15 minutes) : $ 30.00",Flat Fee,,,$30.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +9,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Health Insurance Marketplace (HIM),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +10,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Limited Network Plan (Kelsey Marketplace),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +11,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Local Mental Health Authority (LMHA),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +12,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Chemical Dependency (CD) Treatment Facility,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +13,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Early Childhood Intervention (ECI) Provider,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +14,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Mental Health Targeted Case Management,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +15,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Non- Local Mental Health Authority (LMHA),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +16,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Applied Behavior Analysis (ABA),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +17,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Family adaptive behavior treatment guidance administered by physician or other QHP (with or without the patient present). face-to-face with guardians(s)/caregiver(s), each 15 minutes",Applied Behavior Analysis (ABA),N,,"Procedure Code : 97156 | Description : Family adaptive behavior treatment guidance administered by physician or other QHP (with or without the patient present). face-to-face with guardians(s)/caregiver(s), each 15 minutes | Rate Per Unit (15 minutes) : $ 30.00",Flat Fee,,,$30.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +18,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Multiple-family group adaptive behavior treatment guidance administered by physician or other qualified healthcare professional (without the patient present) face-to-face with multiple sets of guardians(s)/ caregiver(s),Applied Behavior Analysis (ABA),N,,Procedure Code : 97157 | Description : Multiple-family group adaptive behavior treatment guidance administered by physician or other qualified healthcare professional (without the patient present) face-to-face with multiple sets of guardians(s)/ caregiver(s) | Rate Per Unit (15 minutes) : $ 22.00,Flat Fee,,,$22.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +19,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Group adaptive behavior treatment with protocol modifications, administered by a physician or other QHP, face to face with multiple patents', each 15 minutes",Medicaid,N,,"Procedure Code : 97158 | Description : Group adaptive behavior treatment with protocol modifications, administered by a physician or other QHP, face to face with multiple patents', each 15 minutes | Rate Per Unit (15 minutes) : $ 22.00",Flat Fee,,,$22.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +20,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Adaptive behavior treatment with protocol modification, each 15 minutes of technician's time face-to-face with a patient requiring the following components: *administered by the physician or other qualified healthcare professional who is on site, * with the assistance of two or more technicians, *for a patient who exhibits destructive behavior, *completed in an environment that is customized to a patient's behavior",Medicaid,N,,"Procedure Code : 0373T | Description : Adaptive behavior treatment with protocol modification, each 15 minutes of technician's time face-to-face with a patient requiring the following components: *administered by the physician or other qualified healthcare professional who is on site, * with the assistance of two or more technicians, *for a patient who exhibits destructive behavior, *completed in an environment that is customized to a patient's behavior | Rate Per Unit (15 minutes) : $ 45.00",Flat Fee,,,$45.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +21,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Local Mental Health Authority (LMHA),N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +22,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Chemical Dependency (CD) Treatment Facility,N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +23,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Early Childhood Intervention (ECI) Provider,N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +24,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Non- Local Mental Health Authority (LMHA),N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +25,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Local Mental Health Authority (LMHA),N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +26,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Chemical Dependency (CD) Treatment Facility,N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +27,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Early Childhood Intervention (ECI) Provider,N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +28,Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90.0,90.0,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90.0,Y,,Y,09/01/2019,12-3456789,ABC Center,ABC Center,1234567890.0,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,26.0,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Non- Local Mental Health Authority (LMHA),N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,N,N,,N,,,,N,,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,,,N,,N,,,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",N,N, +29,Filename: hn_23-70.txt,AMENDMENT TO THE PROVIDER SERVICES AGREEMENT,"All Health, Inc. Affiliates",California,N,N,,N,,,,,,N,,N,01/01/2005,12-3456789,UCDD Medical Group,"The Regents of the School of California UCDD Healthcare Network, UCDD Medical Group",,,,,,,,,N,23-70,6,3.0,"AMENDMENT +to the +PROVIDER SERVICES AGREEMENT +between +ALL HEALTH, INC. AFFILIATES +and +THE REGENTS OF THE SCHOOL +OF CALIFORNIA UCDD HEALTHCARE NETWORK",MEDICARE,Professional,,,Medicare HMO,Medicare HMO,N,,"As compensation for rendering PPG Capitated Services as defined herein, HMO shall pay PPG Capitation at forty one and fifty eight hundreds percent (41.58%) of Monthly Revenue as set forth below for each Medicare HMO Member eligible to receive such services from PPG during any particular month.",% of Monthly Revenue,41.58% of Monthly Revenue,0.4158,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,"(d) +Offsetting AHI shall have the right to offset any amounts owed to AHI by PPG, +including but not limited to, amounts owed by PPG under loans guaranteed by AHI, errors, or AHI +interim payment for Contracted Services, including Capitation payments. Notwithstanding any +other provision of this Agreement or any other contract to the contrary, only deficits in the shared +risk programs which provide financial incentives for the control or management of Shared Risk +Services' expenses or utilization will neither be collected from PPG by AHI nor offset against +PPG Capitation; provided however, that AHI shall not be restricted from (i) offsetting such +deficits against payments to PPG including, but not limited to, surpluses from other shared risk +programs, stop loss payments, bonus or other incentive program payments; (ii) establishing +reasonable withholds from Capitation approved by DMHC as set forth in the applicable +Addendum to offset PPG liability when the cost of Shared Risk Services exceed the Shared Risk +Budget (Withhold Fund); or (iii) carrying forward such shared risk program deficits to be applied +against future year's program surpluses and Withhold Fund. Each PPG numbered site. shall be +calculated as a separate entity and any payments to or from PPG with multiple sites shall be net +amount due/owed from all sites. In no event shall PPG be required to make any cash payment to +AHI for any deficit in a shared risk program for institutional services. + +To the extent AHI identifies financial liabilities, including overpayments, owed to AHI by PPG +under this Agreement, the intent to collect such financial liabilities shall be communicated to PPG. +Proof of such liabilities and the methodology used to make such determination shall be subject to +UCDD 2005 Amd.d +Effective January 1, 2005 + + +external actuarial review, with PPG bearing the cost of such review. No collection of such +liabilities shall occur until PPG has a reasonable opportunity to conduct such review, provided that +such review occurs within ten (10) business days of communication to PPG by AHI + +Concurrently, to the extent that PPG identifies financial liabilities owed to PPG by AH| +under +this +Agreement, the intent to collect such financial liabilities shall be communicated to AHI. Proof of +such liability, and the methodology used to make such determination shall be subject to external +actuarial review, with AHI bearing the cost of such review. No collection of such liability shall +occur until AHI has a reasonable opportunity to conduct such review, provided that such review +occurs within ten (10) days of communication to AHI by PP.G.",,Y,"In consideration for all of the payment terms set forth herein, including but not limited to the increase in the +Commercial rates, PPG understands and agrees that HNI shall be the exclusive Medicare Advantage payor +contracted with Provider, for any and all Medicare Advantage products including, but not limited to, HMO products, +PPO products or demonstration projects, from January 1, 2005 through December 31, 2006.",,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,$75.15,N,,N,,,,N,N, +30,Filename: hn_23-70.txt,AMENDMENT TO THE PROVIDER SERVICES AGREEMENT,"All Health, Inc. Affiliates",California,N,N,,N,,,,,,N,,N,01/01/2005,12-3456789,UCDD Medical Group,"The Regents of the School of California UCDD Healthcare Network, UCDD Medical Group",,,,,,,,,N,23-70,6,3.0,"AMENDMENT +to the +PROVIDER SERVICES AGREEMENT +between +ALL HEALTH, INC. AFFILIATES +and +THE REGENTS OF THE SCHOOL +OF CALIFORNIA UCDD HEALTHCARE NETWORK",MEDICARE,Professional,,,PPG Capitated Services,Medicare HMO,N,,"As compensation for rendering PPG Capitated Services as defined herein, HMO shall pay PPG Capitation at forty one and fifty eight hundreds percent (41.58%) of Monthly Revenue as set forth below for each Medicare HMO Member eligible to receive such services from PPG during any particular month.",% of Monthly Revenue,41.58% of Monthly Revenue,0.4158,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,"(d) +Offsetting AHI shall have the right to offset any amounts owed to AHI by PPG, +including but not limited to, amounts owed by PPG under loans guaranteed by AHI, errors, or AHI +interim payment for Contracted Services, including Capitation payments. Notwithstanding any +other provision of this Agreement or any other contract to the contrary, only deficits in the shared +risk programs which provide financial incentives for the control or management of Shared Risk +Services' expenses or utilization will neither be collected from PPG by AHI nor offset against +PPG Capitation; provided however, that AHI shall not be restricted from (i) offsetting such +deficits against payments to PPG including, but not limited to, surpluses from other shared risk +programs, stop loss payments, bonus or other incentive program payments; (ii) establishing +reasonable withholds from Capitation approved by DMHC as set forth in the applicable +Addendum to offset PPG liability when the cost of Shared Risk Services exceed the Shared Risk +Budget (Withhold Fund); or (iii) carrying forward such shared risk program deficits to be applied +against future year's program surpluses and Withhold Fund. Each PPG numbered site. shall be +calculated as a separate entity and any payments to or from PPG with multiple sites shall be net +amount due/owed from all sites. In no event shall PPG be required to make any cash payment to +AHI for any deficit in a shared risk program for institutional services. + +To the extent AHI identifies financial liabilities, including overpayments, owed to AHI by PPG +under this Agreement, the intent to collect such financial liabilities shall be communicated to PPG. +Proof of such liabilities and the methodology used to make such determination shall be subject to +UCDD 2005 Amd.d +Effective January 1, 2005 + + +external actuarial review, with PPG bearing the cost of such review. No collection of such +liabilities shall occur until PPG has a reasonable opportunity to conduct such review, provided that +such review occurs within ten (10) business days of communication to PPG by AHI + +Concurrently, to the extent that PPG identifies financial liabilities owed to PPG by AH| +under +this +Agreement, the intent to collect such financial liabilities shall be communicated to AHI. Proof of +such liability, and the methodology used to make such determination shall be subject to external +actuarial review, with AHI bearing the cost of such review. No collection of such liability shall +occur until AHI has a reasonable opportunity to conduct such review, provided that such review +occurs within ten (10) days of communication to AHI by PP.G.",,Y,"In consideration for all of the payment terms set forth herein, including but not limited to the increase in the +Commercial rates, PPG understands and agrees that HNI shall be the exclusive Medicare Advantage payor +contracted with Provider, for any and all Medicare Advantage products including, but not limited to, HMO products, +PPO products or demonstration projects, from January 1, 2005 through December 31, 2006.",,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,$75.15,N,,N,,,,N,N, +31,Filename: cnc_50-16.txt,PARTICIPATING PROVIDER AGREEMENT,"Sample Name 2, Inc.",South Carolina,Y,Y,"ARTICLE VIII - TERM AND TERMINATION + +8.1. Term. This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term ('Initial Term') of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (each a 'Renewal Term'), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term. In addition, either Party may elect to not renew a Contracted Provider's participation as a Participating Provider in a particular Product for the next Renewal Term, by giving Provider written notice of such non-renewal not less than one hundred eighty (180) days prior to the, as applicable, last day of the Initial Term or applicable Renewal Term; in such event, Provider shall immediately notify the affected Contracted Provider of such non-renewal. Termination of any Contracted Provider's participation in a particular Product will not have the effect of terminating either this Agreement or the Contracted Provider's participation in any other Product in which the Contract Provider participates under this Agreement. + +8.2. Termination. This Agreement, or the participation of Provider or a Contracted Provider as a Participating Provider in one or more Products, may be terminated or suspended as set forth below. + +8.2.1. Upon Notice. This Agreement may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination. The participation of any Contracted Provider as a Participating Provider in a Product may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination; in such event, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.2. With Cause. This Agreement, or the participation of any Contracted Provider as a Participating Provider in one or more Products under this Agreement, may be terminated by either Party giving at least ninety (90) days prior written notice of termination to the other Party if such other Party (or the applicable Contracted Provider) is in breach of any material term or condition of this Agreement and such other Party (or the Contracted Provider) fails to cure the breach within the sixty (60) day period immediately following the giving of written notice of such breach. Any notice given pursuant to this Section 8.2.2 must describe the specific breach. In the case of a termination of a Contracted Provider, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.3. Suspension of Participation. Unless expressly prohibited by applicable Regulatory Requirements, Health Plan has the right to immediately suspend or terminate the participation of a Contracted Provider in any or all Products by giving written notice thereof to Provider when Health Plan determines that (i) based upon available information, the continued participation of the Contracted Provider appears to constitute an immediate threat or risk to the health, safety or welfare of Medicaid Managed Care Members, or (ii) the Contracted Provider's fraud, malfeasance or non-compliance with Regulatory Requirements is reasonably suspected. Provider shall immediately notify the affected Contracted Provider of such suspension. During such suspension, the Contracted Provider shall, as directed by Health Plan, discontinue the provision of all or a particular Covered Service to Medicaid Managed Care Members. During the term of any suspension, the Contracted Provider shall notify Medicaid Managed Care Members that his or her status as a Participating Provider has been suspended. Such suspension will continue until the Contracted Provider's participation is reinstated or terminated. + +8.2.4. Insolvency. This Agreement may be terminated immediately by a Party giving written notice thereof to the other Party if the other Party is insolvent or has bankruptcy proceedings initiated against it. + +8.2.5. Credentialing. The status of a Contracted Provider as a Participating Provider in one or more Products may be terminated immediately by Health Plan giving written notice thereof to Provider if the Contracted Provider fails to adhere to Company's or Payor's credentialing criteria, including, but not limited to, if the Contracted Provider (i) loses, relinquishes, or has materially affected its license to provide Covered Services in the State, (ii) fails to comply with the insurance requirements set forth in this Agreement; or (iii) is convicted of a criminal offense related to involvement in any state or federal health care program or has been terminated, suspended, barred, voluntarily withdrawn as part of a settlement agreement, or otherwise excluded from any state or federal health care program. Provider shall immediately notify the affected Contracted Provider of such termination. + +8.3. Effect of Termination. After the effective date of termination of this Agreement or a Contracted Provider's participation in a Product, this Agreement shall remain in effect for purposes of those obligations and rights arising prior to the effective date of termination. Upon such a termination, each affected Contracted Provider (including Provider, if applicable) shall (i) continue to provide Covered Services to Medicaid Managed Care Members in the applicable Product(s) during the longer of the ninety (90) day period following the date of such termination or such other period as may be required under any Regulatory Requirements, and, if requested by Company, each affected Contracted Provider (including Provider, if applicable) shall continue to provide, as a Participating Provider, Covered Services to Medicaid Managed Care Members until such Medicaid Managed Care Members are assigned or transferred to another Participating Provider in the applicable Product(s), and (ii) continue to comply with and abide by all of the applicable terms and conditions of this Agreement, including, but not limited to, Section 4.4 (Hold Harmless) hereof, in connection with the provision of such Covered Services during such continuation period. During such continuation period, each affected Contracted Provider (including Provider, if applicable) will be compensated in accordance with this Agreement and shall accept such compensation as payment in full. + +8.4. Survival of Obligations. All provisions hereof that by their nature are to be performed or complied with following the expiration or termination of this Agreement, including without limitation Sections 3.8, 3.10, 4.2, 4.4, 4.5, 5.2, 6.1, 6.2, 6.3, 7.2, 8.3, and 8.4 and Article IX, survive the expiration or termination of this Agreement.",Y,,180.0,90.0,"This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term (""Initial Term"") of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (cach a ""Renewal Term""), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term.",180.0,Y,30.0,Y,09/07/2018,12-3456789,"Sample Name 1, PhD","Sample Name 1, PhD",1234567890.0,"Sample Name 1, PhD",,,,,"456 Oak Avenue, Greenville, North Charleston, SC 29406",,N,50-16,33,31.0,"Attachment A: Medicaid +EXHIBIT 1 +COMPENSATION SCHEDULE +PRACTITIONER SERVICES +BEHAVIORAL HEALTH +Sample Name1, PhD",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for practitioner Covered Services rendered to a Medicaid Managed Care Member, shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for practitioner Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,"If there is no established payment amount on the Payor's Medicaid fee schedule for a Covered Service provided to a Medicaid Managed Care Member, Payor may establish a payment amount to apply in determining the Allowed Amount. Until such time as Payor establishes such a payment amount, the maximum compensation shall be twenty five percent (25%) of Allowable Charges.",25% of AC,N,N,,N,,,,N,,N,,123456.0,N,N,,N,,"Unless Provider notifies Health Plan in writing of its objection to such amendment during the thirty (30) day period following the giving of such notice by Health Plan, Provider shall be deemed to have accepted the amendment. If Provider objects to any proposed amendment to either the base agreement or any Attachment, Health Plan may exclude one or more of the Contracted Providers from being Participating Providers in the applicable Product (or any component program of, or Coverage Agreement in connection with, such Product).","Provider and each Contracted Provider and Company agrcc to carry out their respective obligations under this Agreement and the Provider Manual, other than the provision of services under the Medicaid Managed Care Program which are addressed in Article I, Section E.1, in accordance with all applicable Regulatory Requirements, including, but not limited to, the requirements of the Health Insurance Portability and Accountability Act, as amended, and any regulations promulgated thereunder. If, due to Provider's or Contracted Provider's noncompliance with applicable Regulatory Requirements or this Agreement, sanctions or penalties are imposed on Company, Company may, in its sole discretion, offset such amounts against any amounts due Provider or Contracted Providers from any Company or require Provider or the Contracted Provider to reimburse Company for such amounts.","4.5. +Recovery Rights. Payor or its delegate shall have the right to immediately offset or recoup any and +all amounts owed by Provider or a Contracted Provider to Payor or Company against amounts owed by the Payor or +Company to the Provider or Contracted Provider. Provider and Contracted Providers agree that all recoupment and +any offset rights under this Agreement will constitute rights of recoupment authorized under State or federal law +and that such rights will not be subject to any requirement of prior or other approval from any court or other +government authority that may now have or hereafter have jurisdiction over Provider or a Contracted Provider.","ARTICLE VII - DISPUTE RESOLUTION + +7.1. Informal Dispute Resolution. Any dispute between Provider and/or a Contracted Provider, as applicable (the ""Provider Party""), and Health Plan and/or Company, as applicable (including any Company acting as Payor) (the ""Administrator Party""), with respect to or involving the performance under, termination of, or interpretation of this Agreement, or any other claim or cause of action hereunder, whether sounding in tort, contract or under statute (a ""Dispute"") shall first be addressed by exhausting the applicable procedures in the Provider Manual pertaining to claims payment, credentialing, utilization management, or other programs. If, at the conclusion of these applicable procedures, the matter is not resolved to satisfaction of the Provider Party and the Administrator Party, or if there are no applicable procedures in the Provider Manual, then the Provider Party and the Administrator Party shall engage in a period of good faith negotiations between their designated representatives who have authority to settle the Dispute, which negotiations may be initiated by either the Provider Party or the Administrator Party upon written request to the other, provided such request takes place within one year of the date on which the requesting party first had, or reasonably should have had, knowledge of the event(s) giving rise to the Dispute. If the matter has not been resolved within sixty (60) days of such request, either the Provider Party or the Administrator Party may, as its sole and exclusive forum for the litigation of the Dispute or any part thereof, initiate arbitration pursuant to Section 7.2 below by providing written notice to the other party. + +7.2. Arbitration. If either the Provider Party or the Administrator Party wishes to pursue the Dispute as provided in Section 7.1, such party shall submit it to binding arbitration conducted in accordance with the Commercial Arbitration Rules of the American Arbitration Association (""AAA""). In no event may any arbitration be initiated more than one (1) year following, as applicable, the end of the sixty (60) day negotiation period set forth in Section 7.1, or the date of notice of termination. Arbitration proceedings shall be conducted by an arbitrator chosen from the National Healthcare Panel at a mutually agreed upon location within the State. The arbitrator shall not award any punitive or exemplary damages of any kind, shall not vary or ignore the provisions of this Agreement, and shall be bound by controlling law. The Parties and the Contracted Providers, on behalf of themselves and those that they may now or hereafter represent, agree to and do hereby waive any right to pursue, on a class basis, any Dispute. Each of the Provider Party and the Administrator Party shall bear its own costs and attorneys' fees related to the arbitration except that the AAA's Administrative Fees, all Arbitrator Compensation and travel and other expenses, and all costs of any proof produced at the direct request of the arbitrator shall be borne equally by the applicable parties, and the arbitrator shall not have the authority to order otherwise. The existence of a Dispute or arbitration proceeding shall not in and of itself constitute cause for termination of this Agreement. Except as hereafter provided, during an arbitration proceeding, each of the Provider Party and the Administrator Party shall continue to perform its obligations under this Agreement pending the decision of the arbitrator. Nothing herein shall bar either the Provider Party or the Administrator Party from seeking emergency injunctive relief to preclude any actual or perceived breach of this Agreement, although such party shall be obligated to file and pursue arbitration at the earliest reasonable opportunity. Judgment on the award rendered may be entered in any court having jurisdiction thereof. Nothing contained in this Article VII shall limit a Party's right to terminate this Agreement with or without cause in accordance with Section 8.2.",N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Medicaid Managed Care Members under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.","A Contracted Provider may only identify itself as a Participating Provider for those Products in which the Contracted Provider actually participates as provided in this Agreement. Provider acknowledges that Company or Payor may have, develop or contract to develop various Products or provider networks that have a variety of provider panels, program components and other requirements. No Company or Payor warrants or guarantees that any Contracted Provider: (i) will participate in all or a minimum number of provider panels, (ii) will be utilized by a minimum number of Medicaid Managed Care Members, or (iii) will indefinitely remain a Participating Provider or member of the provider panel for a particular network or Product.","""Clean Claim"" means a claim that can be processed without obtaining additional information from the Provider of the service or from a third party.",N,,"6.2. Indemnification by Provider and Contracted Provider. Provider and each Contracted Provider shall indemnify and hold harmless (and at Health Plan's request defend) Company and Payor and all of their respective officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees) judgments or obligations arising from or relating to any negligence, wrongful act or omission, or breach of this Agreement by Provider, a Contracted Provider, or any of their respective officers, directors, agents or employees. + +6.3. Indemnification by Health Plan. Health Plan agrees to indemnify and hold harmless (and at Provider's request defend) Provider, Contracted Providers, and their officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees), judgments, or obligations arising from or relating to any negligence, wrongful act or omission or breach of this Agreement by Company or its directors, officers, agents or employees.","Provider and each Contracted Provider shall provide access to their respective books and records to each of the following, including any delegate or duly authorized agent thereof, subject to applicable Regulatory Requirements: (i) Company and Payor, during regular business hours and upon prior notice; (ii) appropriate State and federal authorities, to the extent such access is necessary to comply with Regulatory Requirements; and (iii) accreditation organizations. Provider and each Contracted Provider shall provide copies of such records at no expense to any of the foregoing that may make such request. Each Contracted Provider also shall obtain any authorization or consent that may be required from a Medicaid Managed Care Member in order to release medical records and information to Company or Payor or any of their delegates.",N,,N,,N,,"Provider or Contracted Provider shall timely verify whether an individual seeking Covered Services is a Medicaid Managed Care Member. Company or Payor, as applicable, will make available to Provider and Contracted Providers a method, whereby Provider and Contracted Providers can obtain, in a timely manner, general information about eligibility and coverage. Company or Payor, as applicable, does not guarantee that persons identified as Medicaid Managed Care Members are eligible for benefits or that all services or supplies are Covered Services. If Company, Payor or its delegate determines that an individual was not a Medicaid Managed Care Member at the time services were rendered, such services shall not be eligible for payment under this Agreement. In addition, Company will use reasonable efforts to include or contractually require Payors to clearly display Company's name, logo or mailing address (or other identifier(s) designated from time to time by Company) on each membership card.","Provider and Contracted Providers shall comply with referral and preauthorization procedures adopted by Company and or Payor, as applicable, prior to referring a Medicaid Managed Care Member to any individual, institutional or ancillary health care provider. Unless otherwise expressly authorized in writing by Company or Payor, Provider and Contracted Providers shall refer Medicaid Managed Care Members only to Participating Providers to provide the Covered Service for which the Medicaid Managed Care Member is referred. Except as required by applicable law, failure of Provider and Contracted Providers to follow such procedures may result in denial of payment for unauthorized treatment.","Provider and Contracted Providers shall at all times cooperate and comply with the requirements, policies, programs and procedures (""Policies"") of Company and Payor, which may be described in the Provider Manual and include, but are not limited to, the following: credentialing criteria and requirements; notification requirements; medical management programs; claims and billing, quality assessment and improvement, utilization review and management, disease management, case management, on-site reviews, referral and prior authorization, and grievance and appeal procedures; coordination of benefits and third party liability policies; carve-out and third party vendor programs; and data reporting requirements.","During the term of this Agreement and for any applicable continuation period as set forth in Section 8.3 of this Agreement, Provider and each Contracted Provider shall maintain policies of general and professional liability insurance and other insurance necessary to insure Provider and such Contracted Provider, respectively; their respective employees; and any other person providing services hereunder on behalf of Provider or such Contracted Provider, as applicable, against any claim(s) of personal injuries or death alleged to have been caused or caused by their performance under this Agreement. Such insurance shall include, but not be limited to, any ""tail"" or prior acts coverage necessary to avoid any gap in coverage. Insurance shall be through a licensed carrier acceptable to Health Plan, and in a minimum amount of one million dollars ($1,000,000) per occurrence, and three million dollars ($3,000,000) in the aggregate unless a lesser amount is accepted by Health Plan or where State law mandates otherwise. Provider and each Contracted Provider will provide Health Plan with at least fifteen (15) days prior written notice of cancellation, non-renewal, lapse, or adverse material modification of such coverage. Upon Health Plan's request, Provider and each Contracted Provider will furnish Health Plan with evidence of such insurance.","Provider acknowledges that Company may, during the term of this Agreement, carve-out certain Covered Services from its general provider contracts, including this Agreement, for one or more Products as Company deems necessary or appropriate. Provider and Contracted Providers shall cooperate with and, when medically appropriate, utilize all third party vendors designated by Company for those Covered Services identified by Company from time to time for a particular Product.",Y,"If there is any conflict between this Agreement and the Provider Manual, this Agreement will control. In the event of any conflict between this Agreement and any Product Attachment, the Product Attachment will control as to such Product.",Y,"9.1. Relationship of Parties. The relationship between or among Health Plan, Company, Provider, and any Contracted Provider hereunder is that of independent contractors. None of the provisions of this Agreement will be construed as creating any agency, partnership, joint venture, employee-employer, or other relationship. References herein to the rights and obligations of any Company under this Agreement are references to the rights and obligations of each Company individually and not collectively. A Company is only responsible for performing its respective obligations hereunder with respect to a particular Product, Coverage Agreement, Payor Contract, Covered Service or Medicaid Managed Care Member. A breach or default by an individual Company shall not constitute a breach or default by any other Company, including but not limited to Health Plan.",N,,,Y,"Provider, each Contracted Provider and the officers of Company shall not disparage the other during the term of this Agreement or in connection with any expiration, termination or non-renewal of this Agreement. Neither Provider nor Contracted Provider shall interfere with Company's direct or indirect contractual relationships including, but not limited to, those with Medicaid Managed Care Members or other Participating Providers. Nothing in this Agreement should be construed as limiting the ability of either Health Plan, Company, Provider or a Contracted Provider to inform Medicaid Managed Care Members that this Agreement has been terminated or otherwise expired or, with respect to Provider, to promote Provider to the general public or to post information regarding other health plans consistent with Provider's usual procedures, provided that no such promotion or advertisement is specifically directed at one or more Medicaid Managed Care Members. In addition, nothing in this provision should be construed as limiting Company's ability to use and disclose information and data obtained from or about Provider or Contracted Provider, including this Agreement, to the extent determined reasonably necessary or appropriate by Company in connection with its efforts to comply with Regulatory Requirements and to communicate with regulatory authorities.",N,,N,,,,,,N,,N,,,"2.2.4 +No Subcontract shall not contain any provision that provides incentives, monetary or otherwise, for the withholding of Medically Necessary Services.",Y,N, +32,Filename: cnc_50-16.txt,PARTICIPATING PROVIDER AGREEMENT,"Sample Name 2, Inc.",South Carolina,Y,Y,"ARTICLE VIII - TERM AND TERMINATION + +8.1. Term. This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term ('Initial Term') of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (each a 'Renewal Term'), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term. In addition, either Party may elect to not renew a Contracted Provider's participation as a Participating Provider in a particular Product for the next Renewal Term, by giving Provider written notice of such non-renewal not less than one hundred eighty (180) days prior to the, as applicable, last day of the Initial Term or applicable Renewal Term; in such event, Provider shall immediately notify the affected Contracted Provider of such non-renewal. Termination of any Contracted Provider's participation in a particular Product will not have the effect of terminating either this Agreement or the Contracted Provider's participation in any other Product in which the Contract Provider participates under this Agreement. + +8.2. Termination. This Agreement, or the participation of Provider or a Contracted Provider as a Participating Provider in one or more Products, may be terminated or suspended as set forth below. + +8.2.1. Upon Notice. This Agreement may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination. The participation of any Contracted Provider as a Participating Provider in a Product may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination; in such event, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.2. With Cause. This Agreement, or the participation of any Contracted Provider as a Participating Provider in one or more Products under this Agreement, may be terminated by either Party giving at least ninety (90) days prior written notice of termination to the other Party if such other Party (or the applicable Contracted Provider) is in breach of any material term or condition of this Agreement and such other Party (or the Contracted Provider) fails to cure the breach within the sixty (60) day period immediately following the giving of written notice of such breach. Any notice given pursuant to this Section 8.2.2 must describe the specific breach. In the case of a termination of a Contracted Provider, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.3. Suspension of Participation. Unless expressly prohibited by applicable Regulatory Requirements, Health Plan has the right to immediately suspend or terminate the participation of a Contracted Provider in any or all Products by giving written notice thereof to Provider when Health Plan determines that (i) based upon available information, the continued participation of the Contracted Provider appears to constitute an immediate threat or risk to the health, safety or welfare of Medicaid Managed Care Members, or (ii) the Contracted Provider's fraud, malfeasance or non-compliance with Regulatory Requirements is reasonably suspected. Provider shall immediately notify the affected Contracted Provider of such suspension. During such suspension, the Contracted Provider shall, as directed by Health Plan, discontinue the provision of all or a particular Covered Service to Medicaid Managed Care Members. During the term of any suspension, the Contracted Provider shall notify Medicaid Managed Care Members that his or her status as a Participating Provider has been suspended. Such suspension will continue until the Contracted Provider's participation is reinstated or terminated. + +8.2.4. Insolvency. This Agreement may be terminated immediately by a Party giving written notice thereof to the other Party if the other Party is insolvent or has bankruptcy proceedings initiated against it. + +8.2.5. Credentialing. The status of a Contracted Provider as a Participating Provider in one or more Products may be terminated immediately by Health Plan giving written notice thereof to Provider if the Contracted Provider fails to adhere to Company's or Payor's credentialing criteria, including, but not limited to, if the Contracted Provider (i) loses, relinquishes, or has materially affected its license to provide Covered Services in the State, (ii) fails to comply with the insurance requirements set forth in this Agreement; or (iii) is convicted of a criminal offense related to involvement in any state or federal health care program or has been terminated, suspended, barred, voluntarily withdrawn as part of a settlement agreement, or otherwise excluded from any state or federal health care program. Provider shall immediately notify the affected Contracted Provider of such termination. + +8.3. Effect of Termination. After the effective date of termination of this Agreement or a Contracted Provider's participation in a Product, this Agreement shall remain in effect for purposes of those obligations and rights arising prior to the effective date of termination. Upon such a termination, each affected Contracted Provider (including Provider, if applicable) shall (i) continue to provide Covered Services to Medicaid Managed Care Members in the applicable Product(s) during the longer of the ninety (90) day period following the date of such termination or such other period as may be required under any Regulatory Requirements, and, if requested by Company, each affected Contracted Provider (including Provider, if applicable) shall continue to provide, as a Participating Provider, Covered Services to Medicaid Managed Care Members until such Medicaid Managed Care Members are assigned or transferred to another Participating Provider in the applicable Product(s), and (ii) continue to comply with and abide by all of the applicable terms and conditions of this Agreement, including, but not limited to, Section 4.4 (Hold Harmless) hereof, in connection with the provision of such Covered Services during such continuation period. During such continuation period, each affected Contracted Provider (including Provider, if applicable) will be compensated in accordance with this Agreement and shall accept such compensation as payment in full. + +8.4. Survival of Obligations. All provisions hereof that by their nature are to be performed or complied with following the expiration or termination of this Agreement, including without limitation Sections 3.8, 3.10, 4.2, 4.4, 4.5, 5.2, 6.1, 6.2, 6.3, 7.2, 8.3, and 8.4 and Article IX, survive the expiration or termination of this Agreement.",Y,,180.0,90.0,"This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term (""Initial Term"") of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (cach a ""Renewal Term""), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term.",180.0,Y,30.0,Y,09/07/2018,12-3456789,"Sample Name 1, PhD","Sample Name 1, PhD",1234567890.0,"Sample Name 1, PhD",,,,,"456 Oak Avenue, Greenville, North Charleston, SC 29406",,N,50-16,33,32.0,"Attachment A: Medicaid +EXHIBIT 1 +COMPENSATION SCHEDULE +PRACTITIONER SERVICES +BEHAVIORAL HEALTH +Sample Name1, PhD",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for practitioner Covered Services rendered to a Medicaid Managed Care Member, shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for practitioner Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,"If there is no established payment amount on the Payor's Medicaid fee schedule for a Covered Service provided to a Medicaid Managed Care Member, Payor may establish a payment amount to apply in determining the Allowed Amount. Until such time as Payor establishes such a payment amount, the maximum compensation shall be twenty five percent (25%) of Allowable Charges.",25% of AC,N,N,,N,,,,N,,N,,123456.0,N,N,,N,,"Unless Provider notifies Health Plan in writing of its objection to such amendment during the thirty (30) day period following the giving of such notice by Health Plan, Provider shall be deemed to have accepted the amendment. If Provider objects to any proposed amendment to either the base agreement or any Attachment, Health Plan may exclude one or more of the Contracted Providers from being Participating Providers in the applicable Product (or any component program of, or Coverage Agreement in connection with, such Product).","Provider and each Contracted Provider and Company agrcc to carry out their respective obligations under this Agreement and the Provider Manual, other than the provision of services under the Medicaid Managed Care Program which are addressed in Article I, Section E.1, in accordance with all applicable Regulatory Requirements, including, but not limited to, the requirements of the Health Insurance Portability and Accountability Act, as amended, and any regulations promulgated thereunder. If, due to Provider's or Contracted Provider's noncompliance with applicable Regulatory Requirements or this Agreement, sanctions or penalties are imposed on Company, Company may, in its sole discretion, offset such amounts against any amounts due Provider or Contracted Providers from any Company or require Provider or the Contracted Provider to reimburse Company for such amounts.","4.5. +Recovery Rights. Payor or its delegate shall have the right to immediately offset or recoup any and +all amounts owed by Provider or a Contracted Provider to Payor or Company against amounts owed by the Payor or +Company to the Provider or Contracted Provider. Provider and Contracted Providers agree that all recoupment and +any offset rights under this Agreement will constitute rights of recoupment authorized under State or federal law +and that such rights will not be subject to any requirement of prior or other approval from any court or other +government authority that may now have or hereafter have jurisdiction over Provider or a Contracted Provider.","ARTICLE VII - DISPUTE RESOLUTION + +7.1. Informal Dispute Resolution. Any dispute between Provider and/or a Contracted Provider, as applicable (the ""Provider Party""), and Health Plan and/or Company, as applicable (including any Company acting as Payor) (the ""Administrator Party""), with respect to or involving the performance under, termination of, or interpretation of this Agreement, or any other claim or cause of action hereunder, whether sounding in tort, contract or under statute (a ""Dispute"") shall first be addressed by exhausting the applicable procedures in the Provider Manual pertaining to claims payment, credentialing, utilization management, or other programs. If, at the conclusion of these applicable procedures, the matter is not resolved to satisfaction of the Provider Party and the Administrator Party, or if there are no applicable procedures in the Provider Manual, then the Provider Party and the Administrator Party shall engage in a period of good faith negotiations between their designated representatives who have authority to settle the Dispute, which negotiations may be initiated by either the Provider Party or the Administrator Party upon written request to the other, provided such request takes place within one year of the date on which the requesting party first had, or reasonably should have had, knowledge of the event(s) giving rise to the Dispute. If the matter has not been resolved within sixty (60) days of such request, either the Provider Party or the Administrator Party may, as its sole and exclusive forum for the litigation of the Dispute or any part thereof, initiate arbitration pursuant to Section 7.2 below by providing written notice to the other party. + +7.2. Arbitration. If either the Provider Party or the Administrator Party wishes to pursue the Dispute as provided in Section 7.1, such party shall submit it to binding arbitration conducted in accordance with the Commercial Arbitration Rules of the American Arbitration Association (""AAA""). In no event may any arbitration be initiated more than one (1) year following, as applicable, the end of the sixty (60) day negotiation period set forth in Section 7.1, or the date of notice of termination. Arbitration proceedings shall be conducted by an arbitrator chosen from the National Healthcare Panel at a mutually agreed upon location within the State. The arbitrator shall not award any punitive or exemplary damages of any kind, shall not vary or ignore the provisions of this Agreement, and shall be bound by controlling law. The Parties and the Contracted Providers, on behalf of themselves and those that they may now or hereafter represent, agree to and do hereby waive any right to pursue, on a class basis, any Dispute. Each of the Provider Party and the Administrator Party shall bear its own costs and attorneys' fees related to the arbitration except that the AAA's Administrative Fees, all Arbitrator Compensation and travel and other expenses, and all costs of any proof produced at the direct request of the arbitrator shall be borne equally by the applicable parties, and the arbitrator shall not have the authority to order otherwise. The existence of a Dispute or arbitration proceeding shall not in and of itself constitute cause for termination of this Agreement. Except as hereafter provided, during an arbitration proceeding, each of the Provider Party and the Administrator Party shall continue to perform its obligations under this Agreement pending the decision of the arbitrator. Nothing herein shall bar either the Provider Party or the Administrator Party from seeking emergency injunctive relief to preclude any actual or perceived breach of this Agreement, although such party shall be obligated to file and pursue arbitration at the earliest reasonable opportunity. Judgment on the award rendered may be entered in any court having jurisdiction thereof. Nothing contained in this Article VII shall limit a Party's right to terminate this Agreement with or without cause in accordance with Section 8.2.",N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Medicaid Managed Care Members under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.","A Contracted Provider may only identify itself as a Participating Provider for those Products in which the Contracted Provider actually participates as provided in this Agreement. Provider acknowledges that Company or Payor may have, develop or contract to develop various Products or provider networks that have a variety of provider panels, program components and other requirements. No Company or Payor warrants or guarantees that any Contracted Provider: (i) will participate in all or a minimum number of provider panels, (ii) will be utilized by a minimum number of Medicaid Managed Care Members, or (iii) will indefinitely remain a Participating Provider or member of the provider panel for a particular network or Product.","""Clean Claim"" means a claim that can be processed without obtaining additional information from the Provider of the service or from a third party.",N,,"6.2. Indemnification by Provider and Contracted Provider. Provider and each Contracted Provider shall indemnify and hold harmless (and at Health Plan's request defend) Company and Payor and all of their respective officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees) judgments or obligations arising from or relating to any negligence, wrongful act or omission, or breach of this Agreement by Provider, a Contracted Provider, or any of their respective officers, directors, agents or employees. + +6.3. Indemnification by Health Plan. Health Plan agrees to indemnify and hold harmless (and at Provider's request defend) Provider, Contracted Providers, and their officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees), judgments, or obligations arising from or relating to any negligence, wrongful act or omission or breach of this Agreement by Company or its directors, officers, agents or employees.","Provider and each Contracted Provider shall provide access to their respective books and records to each of the following, including any delegate or duly authorized agent thereof, subject to applicable Regulatory Requirements: (i) Company and Payor, during regular business hours and upon prior notice; (ii) appropriate State and federal authorities, to the extent such access is necessary to comply with Regulatory Requirements; and (iii) accreditation organizations. Provider and each Contracted Provider shall provide copies of such records at no expense to any of the foregoing that may make such request. Each Contracted Provider also shall obtain any authorization or consent that may be required from a Medicaid Managed Care Member in order to release medical records and information to Company or Payor or any of their delegates.",N,,N,,N,,"Provider or Contracted Provider shall timely verify whether an individual seeking Covered Services is a Medicaid Managed Care Member. Company or Payor, as applicable, will make available to Provider and Contracted Providers a method, whereby Provider and Contracted Providers can obtain, in a timely manner, general information about eligibility and coverage. Company or Payor, as applicable, does not guarantee that persons identified as Medicaid Managed Care Members are eligible for benefits or that all services or supplies are Covered Services. If Company, Payor or its delegate determines that an individual was not a Medicaid Managed Care Member at the time services were rendered, such services shall not be eligible for payment under this Agreement. In addition, Company will use reasonable efforts to include or contractually require Payors to clearly display Company's name, logo or mailing address (or other identifier(s) designated from time to time by Company) on each membership card.","Provider and Contracted Providers shall comply with referral and preauthorization procedures adopted by Company and or Payor, as applicable, prior to referring a Medicaid Managed Care Member to any individual, institutional or ancillary health care provider. Unless otherwise expressly authorized in writing by Company or Payor, Provider and Contracted Providers shall refer Medicaid Managed Care Members only to Participating Providers to provide the Covered Service for which the Medicaid Managed Care Member is referred. Except as required by applicable law, failure of Provider and Contracted Providers to follow such procedures may result in denial of payment for unauthorized treatment.","Provider and Contracted Providers shall at all times cooperate and comply with the requirements, policies, programs and procedures (""Policies"") of Company and Payor, which may be described in the Provider Manual and include, but are not limited to, the following: credentialing criteria and requirements; notification requirements; medical management programs; claims and billing, quality assessment and improvement, utilization review and management, disease management, case management, on-site reviews, referral and prior authorization, and grievance and appeal procedures; coordination of benefits and third party liability policies; carve-out and third party vendor programs; and data reporting requirements.","During the term of this Agreement and for any applicable continuation period as set forth in Section 8.3 of this Agreement, Provider and each Contracted Provider shall maintain policies of general and professional liability insurance and other insurance necessary to insure Provider and such Contracted Provider, respectively; their respective employees; and any other person providing services hereunder on behalf of Provider or such Contracted Provider, as applicable, against any claim(s) of personal injuries or death alleged to have been caused or caused by their performance under this Agreement. Such insurance shall include, but not be limited to, any ""tail"" or prior acts coverage necessary to avoid any gap in coverage. Insurance shall be through a licensed carrier acceptable to Health Plan, and in a minimum amount of one million dollars ($1,000,000) per occurrence, and three million dollars ($3,000,000) in the aggregate unless a lesser amount is accepted by Health Plan or where State law mandates otherwise. Provider and each Contracted Provider will provide Health Plan with at least fifteen (15) days prior written notice of cancellation, non-renewal, lapse, or adverse material modification of such coverage. Upon Health Plan's request, Provider and each Contracted Provider will furnish Health Plan with evidence of such insurance.","Provider acknowledges that Company may, during the term of this Agreement, carve-out certain Covered Services from its general provider contracts, including this Agreement, for one or more Products as Company deems necessary or appropriate. Provider and Contracted Providers shall cooperate with and, when medically appropriate, utilize all third party vendors designated by Company for those Covered Services identified by Company from time to time for a particular Product.",Y,"If there is any conflict between this Agreement and the Provider Manual, this Agreement will control. In the event of any conflict between this Agreement and any Product Attachment, the Product Attachment will control as to such Product.",Y,"9.1. Relationship of Parties. The relationship between or among Health Plan, Company, Provider, and any Contracted Provider hereunder is that of independent contractors. None of the provisions of this Agreement will be construed as creating any agency, partnership, joint venture, employee-employer, or other relationship. References herein to the rights and obligations of any Company under this Agreement are references to the rights and obligations of each Company individually and not collectively. A Company is only responsible for performing its respective obligations hereunder with respect to a particular Product, Coverage Agreement, Payor Contract, Covered Service or Medicaid Managed Care Member. A breach or default by an individual Company shall not constitute a breach or default by any other Company, including but not limited to Health Plan.",N,,,Y,"Provider, each Contracted Provider and the officers of Company shall not disparage the other during the term of this Agreement or in connection with any expiration, termination or non-renewal of this Agreement. Neither Provider nor Contracted Provider shall interfere with Company's direct or indirect contractual relationships including, but not limited to, those with Medicaid Managed Care Members or other Participating Providers. Nothing in this Agreement should be construed as limiting the ability of either Health Plan, Company, Provider or a Contracted Provider to inform Medicaid Managed Care Members that this Agreement has been terminated or otherwise expired or, with respect to Provider, to promote Provider to the general public or to post information regarding other health plans consistent with Provider's usual procedures, provided that no such promotion or advertisement is specifically directed at one or more Medicaid Managed Care Members. In addition, nothing in this provision should be construed as limiting Company's ability to use and disclose information and data obtained from or about Provider or Contracted Provider, including this Agreement, to the extent determined reasonably necessary or appropriate by Company in connection with its efforts to comply with Regulatory Requirements and to communicate with regulatory authorities.",N,,N,,,,,,N,,N,,,"2.2.4 +No Subcontract shall not contain any provision that provides incentives, monetary or otherwise, for the withholding of Medically Necessary Services.",Y,N, +33,Filename: cnc_50-16.txt,PARTICIPATING PROVIDER AGREEMENT,"Sample Name 2, Inc.",South Carolina,Y,Y,"ARTICLE VIII - TERM AND TERMINATION + +8.1. Term. This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term ('Initial Term') of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (each a 'Renewal Term'), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term. In addition, either Party may elect to not renew a Contracted Provider's participation as a Participating Provider in a particular Product for the next Renewal Term, by giving Provider written notice of such non-renewal not less than one hundred eighty (180) days prior to the, as applicable, last day of the Initial Term or applicable Renewal Term; in such event, Provider shall immediately notify the affected Contracted Provider of such non-renewal. Termination of any Contracted Provider's participation in a particular Product will not have the effect of terminating either this Agreement or the Contracted Provider's participation in any other Product in which the Contract Provider participates under this Agreement. + +8.2. Termination. This Agreement, or the participation of Provider or a Contracted Provider as a Participating Provider in one or more Products, may be terminated or suspended as set forth below. + +8.2.1. Upon Notice. This Agreement may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination. The participation of any Contracted Provider as a Participating Provider in a Product may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination; in such event, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.2. With Cause. This Agreement, or the participation of any Contracted Provider as a Participating Provider in one or more Products under this Agreement, may be terminated by either Party giving at least ninety (90) days prior written notice of termination to the other Party if such other Party (or the applicable Contracted Provider) is in breach of any material term or condition of this Agreement and such other Party (or the Contracted Provider) fails to cure the breach within the sixty (60) day period immediately following the giving of written notice of such breach. Any notice given pursuant to this Section 8.2.2 must describe the specific breach. In the case of a termination of a Contracted Provider, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.3. Suspension of Participation. Unless expressly prohibited by applicable Regulatory Requirements, Health Plan has the right to immediately suspend or terminate the participation of a Contracted Provider in any or all Products by giving written notice thereof to Provider when Health Plan determines that (i) based upon available information, the continued participation of the Contracted Provider appears to constitute an immediate threat or risk to the health, safety or welfare of Medicaid Managed Care Members, or (ii) the Contracted Provider's fraud, malfeasance or non-compliance with Regulatory Requirements is reasonably suspected. Provider shall immediately notify the affected Contracted Provider of such suspension. During such suspension, the Contracted Provider shall, as directed by Health Plan, discontinue the provision of all or a particular Covered Service to Medicaid Managed Care Members. During the term of any suspension, the Contracted Provider shall notify Medicaid Managed Care Members that his or her status as a Participating Provider has been suspended. Such suspension will continue until the Contracted Provider's participation is reinstated or terminated. + +8.2.4. Insolvency. This Agreement may be terminated immediately by a Party giving written notice thereof to the other Party if the other Party is insolvent or has bankruptcy proceedings initiated against it. + +8.2.5. Credentialing. The status of a Contracted Provider as a Participating Provider in one or more Products may be terminated immediately by Health Plan giving written notice thereof to Provider if the Contracted Provider fails to adhere to Company's or Payor's credentialing criteria, including, but not limited to, if the Contracted Provider (i) loses, relinquishes, or has materially affected its license to provide Covered Services in the State, (ii) fails to comply with the insurance requirements set forth in this Agreement; or (iii) is convicted of a criminal offense related to involvement in any state or federal health care program or has been terminated, suspended, barred, voluntarily withdrawn as part of a settlement agreement, or otherwise excluded from any state or federal health care program. Provider shall immediately notify the affected Contracted Provider of such termination. + +8.3. Effect of Termination. After the effective date of termination of this Agreement or a Contracted Provider's participation in a Product, this Agreement shall remain in effect for purposes of those obligations and rights arising prior to the effective date of termination. Upon such a termination, each affected Contracted Provider (including Provider, if applicable) shall (i) continue to provide Covered Services to Medicaid Managed Care Members in the applicable Product(s) during the longer of the ninety (90) day period following the date of such termination or such other period as may be required under any Regulatory Requirements, and, if requested by Company, each affected Contracted Provider (including Provider, if applicable) shall continue to provide, as a Participating Provider, Covered Services to Medicaid Managed Care Members until such Medicaid Managed Care Members are assigned or transferred to another Participating Provider in the applicable Product(s), and (ii) continue to comply with and abide by all of the applicable terms and conditions of this Agreement, including, but not limited to, Section 4.4 (Hold Harmless) hereof, in connection with the provision of such Covered Services during such continuation period. During such continuation period, each affected Contracted Provider (including Provider, if applicable) will be compensated in accordance with this Agreement and shall accept such compensation as payment in full. + +8.4. Survival of Obligations. All provisions hereof that by their nature are to be performed or complied with following the expiration or termination of this Agreement, including without limitation Sections 3.8, 3.10, 4.2, 4.4, 4.5, 5.2, 6.1, 6.2, 6.3, 7.2, 8.3, and 8.4 and Article IX, survive the expiration or termination of this Agreement.",Y,,180.0,90.0,"This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term (""Initial Term"") of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (cach a ""Renewal Term""), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term.",180.0,Y,30.0,Y,09/07/2018,12-3456789,"Sample Name 1, PhD","Sample Name 1, PhD",1234567890.0,"Sample Name 1, PhD",,,,,"456 Oak Avenue, Greenville, North Charleston, SC 29406",,N,50-16,33,33.0,"Attachment A: Medicaid +EXHIBIT 1 +COMPENSATION SCHEDULE +PRACTITIONER SERVICES +BEHAVIORAL HEALTH +Sample Name1, PhD",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for practitioner Covered Services rendered to a Medicaid Managed Care Member, shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for practitioner Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,"If there is no established payment amount on the Payor's Medicaid fee schedule for a Covered Service provided to a Medicaid Managed Care Member, Payor may establish a payment amount to apply in determining the Allowed Amount. Until such time as Payor establishes such a payment amount, the maximum compensation shall be twenty five percent (25%) of Allowable Charges.",25% of AC,N,N,,N,,,,N,,N,,123456.0,N,N,,N,,"Unless Provider notifies Health Plan in writing of its objection to such amendment during the thirty (30) day period following the giving of such notice by Health Plan, Provider shall be deemed to have accepted the amendment. If Provider objects to any proposed amendment to either the base agreement or any Attachment, Health Plan may exclude one or more of the Contracted Providers from being Participating Providers in the applicable Product (or any component program of, or Coverage Agreement in connection with, such Product).","Provider and each Contracted Provider and Company agrcc to carry out their respective obligations under this Agreement and the Provider Manual, other than the provision of services under the Medicaid Managed Care Program which are addressed in Article I, Section E.1, in accordance with all applicable Regulatory Requirements, including, but not limited to, the requirements of the Health Insurance Portability and Accountability Act, as amended, and any regulations promulgated thereunder. If, due to Provider's or Contracted Provider's noncompliance with applicable Regulatory Requirements or this Agreement, sanctions or penalties are imposed on Company, Company may, in its sole discretion, offset such amounts against any amounts due Provider or Contracted Providers from any Company or require Provider or the Contracted Provider to reimburse Company for such amounts.","4.5. +Recovery Rights. Payor or its delegate shall have the right to immediately offset or recoup any and +all amounts owed by Provider or a Contracted Provider to Payor or Company against amounts owed by the Payor or +Company to the Provider or Contracted Provider. Provider and Contracted Providers agree that all recoupment and +any offset rights under this Agreement will constitute rights of recoupment authorized under State or federal law +and that such rights will not be subject to any requirement of prior or other approval from any court or other +government authority that may now have or hereafter have jurisdiction over Provider or a Contracted Provider.","ARTICLE VII - DISPUTE RESOLUTION + +7.1. Informal Dispute Resolution. Any dispute between Provider and/or a Contracted Provider, as applicable (the ""Provider Party""), and Health Plan and/or Company, as applicable (including any Company acting as Payor) (the ""Administrator Party""), with respect to or involving the performance under, termination of, or interpretation of this Agreement, or any other claim or cause of action hereunder, whether sounding in tort, contract or under statute (a ""Dispute"") shall first be addressed by exhausting the applicable procedures in the Provider Manual pertaining to claims payment, credentialing, utilization management, or other programs. If, at the conclusion of these applicable procedures, the matter is not resolved to satisfaction of the Provider Party and the Administrator Party, or if there are no applicable procedures in the Provider Manual, then the Provider Party and the Administrator Party shall engage in a period of good faith negotiations between their designated representatives who have authority to settle the Dispute, which negotiations may be initiated by either the Provider Party or the Administrator Party upon written request to the other, provided such request takes place within one year of the date on which the requesting party first had, or reasonably should have had, knowledge of the event(s) giving rise to the Dispute. If the matter has not been resolved within sixty (60) days of such request, either the Provider Party or the Administrator Party may, as its sole and exclusive forum for the litigation of the Dispute or any part thereof, initiate arbitration pursuant to Section 7.2 below by providing written notice to the other party. + +7.2. Arbitration. If either the Provider Party or the Administrator Party wishes to pursue the Dispute as provided in Section 7.1, such party shall submit it to binding arbitration conducted in accordance with the Commercial Arbitration Rules of the American Arbitration Association (""AAA""). In no event may any arbitration be initiated more than one (1) year following, as applicable, the end of the sixty (60) day negotiation period set forth in Section 7.1, or the date of notice of termination. Arbitration proceedings shall be conducted by an arbitrator chosen from the National Healthcare Panel at a mutually agreed upon location within the State. The arbitrator shall not award any punitive or exemplary damages of any kind, shall not vary or ignore the provisions of this Agreement, and shall be bound by controlling law. The Parties and the Contracted Providers, on behalf of themselves and those that they may now or hereafter represent, agree to and do hereby waive any right to pursue, on a class basis, any Dispute. Each of the Provider Party and the Administrator Party shall bear its own costs and attorneys' fees related to the arbitration except that the AAA's Administrative Fees, all Arbitrator Compensation and travel and other expenses, and all costs of any proof produced at the direct request of the arbitrator shall be borne equally by the applicable parties, and the arbitrator shall not have the authority to order otherwise. The existence of a Dispute or arbitration proceeding shall not in and of itself constitute cause for termination of this Agreement. Except as hereafter provided, during an arbitration proceeding, each of the Provider Party and the Administrator Party shall continue to perform its obligations under this Agreement pending the decision of the arbitrator. Nothing herein shall bar either the Provider Party or the Administrator Party from seeking emergency injunctive relief to preclude any actual or perceived breach of this Agreement, although such party shall be obligated to file and pursue arbitration at the earliest reasonable opportunity. Judgment on the award rendered may be entered in any court having jurisdiction thereof. Nothing contained in this Article VII shall limit a Party's right to terminate this Agreement with or without cause in accordance with Section 8.2.",N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Medicaid Managed Care Members under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.","A Contracted Provider may only identify itself as a Participating Provider for those Products in which the Contracted Provider actually participates as provided in this Agreement. Provider acknowledges that Company or Payor may have, develop or contract to develop various Products or provider networks that have a variety of provider panels, program components and other requirements. No Company or Payor warrants or guarantees that any Contracted Provider: (i) will participate in all or a minimum number of provider panels, (ii) will be utilized by a minimum number of Medicaid Managed Care Members, or (iii) will indefinitely remain a Participating Provider or member of the provider panel for a particular network or Product.","""Clean Claim"" means a claim that can be processed without obtaining additional information from the Provider of the service or from a third party.",N,,"6.2. Indemnification by Provider and Contracted Provider. Provider and each Contracted Provider shall indemnify and hold harmless (and at Health Plan's request defend) Company and Payor and all of their respective officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees) judgments or obligations arising from or relating to any negligence, wrongful act or omission, or breach of this Agreement by Provider, a Contracted Provider, or any of their respective officers, directors, agents or employees. + +6.3. Indemnification by Health Plan. Health Plan agrees to indemnify and hold harmless (and at Provider's request defend) Provider, Contracted Providers, and their officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees), judgments, or obligations arising from or relating to any negligence, wrongful act or omission or breach of this Agreement by Company or its directors, officers, agents or employees.","Provider and each Contracted Provider shall provide access to their respective books and records to each of the following, including any delegate or duly authorized agent thereof, subject to applicable Regulatory Requirements: (i) Company and Payor, during regular business hours and upon prior notice; (ii) appropriate State and federal authorities, to the extent such access is necessary to comply with Regulatory Requirements; and (iii) accreditation organizations. Provider and each Contracted Provider shall provide copies of such records at no expense to any of the foregoing that may make such request. Each Contracted Provider also shall obtain any authorization or consent that may be required from a Medicaid Managed Care Member in order to release medical records and information to Company or Payor or any of their delegates.",N,,N,,N,,"Provider or Contracted Provider shall timely verify whether an individual seeking Covered Services is a Medicaid Managed Care Member. Company or Payor, as applicable, will make available to Provider and Contracted Providers a method, whereby Provider and Contracted Providers can obtain, in a timely manner, general information about eligibility and coverage. Company or Payor, as applicable, does not guarantee that persons identified as Medicaid Managed Care Members are eligible for benefits or that all services or supplies are Covered Services. If Company, Payor or its delegate determines that an individual was not a Medicaid Managed Care Member at the time services were rendered, such services shall not be eligible for payment under this Agreement. In addition, Company will use reasonable efforts to include or contractually require Payors to clearly display Company's name, logo or mailing address (or other identifier(s) designated from time to time by Company) on each membership card.","Provider and Contracted Providers shall comply with referral and preauthorization procedures adopted by Company and or Payor, as applicable, prior to referring a Medicaid Managed Care Member to any individual, institutional or ancillary health care provider. Unless otherwise expressly authorized in writing by Company or Payor, Provider and Contracted Providers shall refer Medicaid Managed Care Members only to Participating Providers to provide the Covered Service for which the Medicaid Managed Care Member is referred. Except as required by applicable law, failure of Provider and Contracted Providers to follow such procedures may result in denial of payment for unauthorized treatment.","Provider and Contracted Providers shall at all times cooperate and comply with the requirements, policies, programs and procedures (""Policies"") of Company and Payor, which may be described in the Provider Manual and include, but are not limited to, the following: credentialing criteria and requirements; notification requirements; medical management programs; claims and billing, quality assessment and improvement, utilization review and management, disease management, case management, on-site reviews, referral and prior authorization, and grievance and appeal procedures; coordination of benefits and third party liability policies; carve-out and third party vendor programs; and data reporting requirements.","During the term of this Agreement and for any applicable continuation period as set forth in Section 8.3 of this Agreement, Provider and each Contracted Provider shall maintain policies of general and professional liability insurance and other insurance necessary to insure Provider and such Contracted Provider, respectively; their respective employees; and any other person providing services hereunder on behalf of Provider or such Contracted Provider, as applicable, against any claim(s) of personal injuries or death alleged to have been caused or caused by their performance under this Agreement. Such insurance shall include, but not be limited to, any ""tail"" or prior acts coverage necessary to avoid any gap in coverage. Insurance shall be through a licensed carrier acceptable to Health Plan, and in a minimum amount of one million dollars ($1,000,000) per occurrence, and three million dollars ($3,000,000) in the aggregate unless a lesser amount is accepted by Health Plan or where State law mandates otherwise. Provider and each Contracted Provider will provide Health Plan with at least fifteen (15) days prior written notice of cancellation, non-renewal, lapse, or adverse material modification of such coverage. Upon Health Plan's request, Provider and each Contracted Provider will furnish Health Plan with evidence of such insurance.","Provider acknowledges that Company may, during the term of this Agreement, carve-out certain Covered Services from its general provider contracts, including this Agreement, for one or more Products as Company deems necessary or appropriate. Provider and Contracted Providers shall cooperate with and, when medically appropriate, utilize all third party vendors designated by Company for those Covered Services identified by Company from time to time for a particular Product.",Y,"If there is any conflict between this Agreement and the Provider Manual, this Agreement will control. In the event of any conflict between this Agreement and any Product Attachment, the Product Attachment will control as to such Product.",Y,"9.1. Relationship of Parties. The relationship between or among Health Plan, Company, Provider, and any Contracted Provider hereunder is that of independent contractors. None of the provisions of this Agreement will be construed as creating any agency, partnership, joint venture, employee-employer, or other relationship. References herein to the rights and obligations of any Company under this Agreement are references to the rights and obligations of each Company individually and not collectively. A Company is only responsible for performing its respective obligations hereunder with respect to a particular Product, Coverage Agreement, Payor Contract, Covered Service or Medicaid Managed Care Member. A breach or default by an individual Company shall not constitute a breach or default by any other Company, including but not limited to Health Plan.",N,,,Y,"Provider, each Contracted Provider and the officers of Company shall not disparage the other during the term of this Agreement or in connection with any expiration, termination or non-renewal of this Agreement. Neither Provider nor Contracted Provider shall interfere with Company's direct or indirect contractual relationships including, but not limited to, those with Medicaid Managed Care Members or other Participating Providers. Nothing in this Agreement should be construed as limiting the ability of either Health Plan, Company, Provider or a Contracted Provider to inform Medicaid Managed Care Members that this Agreement has been terminated or otherwise expired or, with respect to Provider, to promote Provider to the general public or to post information regarding other health plans consistent with Provider's usual procedures, provided that no such promotion or advertisement is specifically directed at one or more Medicaid Managed Care Members. In addition, nothing in this provision should be construed as limiting Company's ability to use and disclose information and data obtained from or about Provider or Contracted Provider, including this Agreement, to the extent determined reasonably necessary or appropriate by Company in connection with its efforts to comply with Regulatory Requirements and to communicate with regulatory authorities.",N,,N,,,,,,N,,N,,,"2.2.4 +No Subcontract shall not contain any provision that provides incentives, monetary or otherwise, for the withholding of Medically Necessary Services.",Y,N, +34,Filename: hn_0109.txt,CALIFORNIA PROVIDER PARTICIPATION AGREEMENT,All Health,California,N,N,,N,,,,,,N,,N,04/15/2011,01-2345678,"Dummy Group Name, Inc.","Dummy Group Name, Inc.",,,,,,,,,N,109,4,2.0,"EXHIBIT A-1 +COMMERCIAL BENEFIT PROGRAMS +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",COMMERCIAL,Facility,,,Covered Services,Commercial,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health or Payor shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under commercial Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges.",% of BC,100% of BC,1.0,,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,N,N,,N,,,,N,,N,,,N,N,,N,,,,,"THIS CONTRACT CONTAINS A BINDING ARBITRATION CLAUSE, WHICH MAY BE ENFORCED BY THE PARTIES.",N,,,,,N,,,,N,,N,,N,,,,,,,N,,Y,"Status as Independent Entities. None of the provisions of this Agreement is intended to create, nor shall be deemed or construed to create any relationship between Provider and All Health or a Payor other than that of independent entities contracting with each other solely for the purpose of effecting the provisions of this Agreement. Neither Provider nor All Health /Payor, nor any of their respective agents, employees or representatives shall be construed to be the agent, employee or representative of the other.",N,,,N,,N,,N,,,,,,N,,N,,,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health or Payor shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary +Covered Services delivered under commercial Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",N,N, +35,Filename: hn_0109.txt,CALIFORNIA PROVIDER PARTICIPATION AGREEMENT,All Health,California,N,N,,N,,,,,,N,,N,04/15/2011,01-2345678,"Dummy Group Name, Inc.","Dummy Group Name, Inc.",,,,,,,,,N,109,4,3.0,"EXHIBIT B-1 +MEDICARE ADVANTAGE PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICARE ADVANTAGE,Professional,,,Covered Services delivered or arranged by Provider,Medicare Advantage,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges. + +Category of Service : Covered Services delivered or arranged by Provider | Compensation : 100% of CMS Allowable",% of CMS Allowable,100% of CMS Allowable,1.0,,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,N,N,,N,,,,N,,N,,,N,N,,N,,,,,"THIS CONTRACT CONTAINS A BINDING ARBITRATION CLAUSE, WHICH MAY BE ENFORCED BY THE PARTIES.",N,,,,,N,,,,N,,N,,N,,,,,,,N,,Y,"Status as Independent Entities. None of the provisions of this Agreement is intended to create, nor shall be deemed or construed to create any relationship between Provider and All Health or a Payor other than that of independent entities contracting with each other solely for the purpose of effecting the provisions of this Agreement. Neither Provider nor All Health /Payor, nor any of their respective agents, employees or representatives shall be construed to be the agent, employee or representative of the other.",N,,,N,,N,,N,,,,,,N,,N,,,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",N,N, +36,Filename: hn_0109.txt,CALIFORNIA PROVIDER PARTICIPATION AGREEMENT,All Health,California,N,N,,N,,,,,,N,,N,04/15/2011,01-2345678,"Dummy Group Name, Inc.","Dummy Group Name, Inc.",,,,,,,,,N,109,4,3.0,"EXHIBIT B-1 +MEDICARE ADVANTAGE PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICARE ADVANTAGE,Professional,,,General Health Panel - CPT 80050,Medicare Advantage,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges. + +Category of Service : General Health Panel - CPT 80050 | Compensation : $20.00",Flat Fee,,,$20.00,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,N,N,,N,,,,N,,N,,,N,N,,N,,,,,"THIS CONTRACT CONTAINS A BINDING ARBITRATION CLAUSE, WHICH MAY BE ENFORCED BY THE PARTIES.",N,,,,,N,,,,N,,N,,N,,,,,,,N,,Y,"Status as Independent Entities. None of the provisions of this Agreement is intended to create, nor shall be deemed or construed to create any relationship between Provider and All Health or a Payor other than that of independent entities contracting with each other solely for the purpose of effecting the provisions of this Agreement. Neither Provider nor All Health /Payor, nor any of their respective agents, employees or representatives shall be construed to be the agent, employee or representative of the other.",N,,,N,,N,,N,,,,,,N,,N,,,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",N,N, +37,Filename: hn_0109.txt,CALIFORNIA PROVIDER PARTICIPATION AGREEMENT,All Health,California,N,N,,N,,,,,,N,,N,04/15/2011,01-2345678,"Dummy Group Name, Inc.","Dummy Group Name, Inc.",,,,,,,,,N,109,4,3.0,"EXHIBIT B-1 +MEDICARE ADVANTAGE PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICARE ADVANTAGE,Professional,,,General Health Panel - CPT 80055: Obstetric Panel,Medicare Advantage,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges. + +Category of Service : General Health Panel - CPT 80055: Obstetric Panel | Compensation : $15.00",Flat Fee,,,$15.00,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,N,N,,N,,,,N,,N,,,N,N,,N,,,,,"THIS CONTRACT CONTAINS A BINDING ARBITRATION CLAUSE, WHICH MAY BE ENFORCED BY THE PARTIES.",N,,,,,N,,,,N,,N,,N,,,,,,,N,,Y,"Status as Independent Entities. None of the provisions of this Agreement is intended to create, nor shall be deemed or construed to create any relationship between Provider and All Health or a Payor other than that of independent entities contracting with each other solely for the purpose of effecting the provisions of this Agreement. Neither Provider nor All Health /Payor, nor any of their respective agents, employees or representatives shall be construed to be the agent, employee or representative of the other.",N,,,N,,N,,N,,,,,,N,,N,,,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",N,N, +38,Filename: hn_0109.txt,CALIFORNIA PROVIDER PARTICIPATION AGREEMENT,All Health,California,N,N,,N,,,,,,N,,N,04/15/2011,01-2345678,"Dummy Group Name, Inc.","Dummy Group Name, Inc.",,,,,,,,,N,109,4,4.0,"EXHIBIT C-1 +MEDI-CAL BENEFIT PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICAID,Professional,,,Covered Services,Medi-Cal,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered pursuant to this Addendum, the lesser of: 100% of the State of California Medi-Cal Fee Schedule rates in effect at the time of service, subject to any adjustments made by the State of California under the applicable Medi-Cal Fee-For-Service Program; (ii) Fee-for-service rates for the commercial Benefit Program set forth in Addendum A, Exhibit A-1; or (iii) Provider's billed charges.",% of MCD,100% of MCD,1.0,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,,"THIS CONTRACT CONTAINS A BINDING ARBITRATION CLAUSE, WHICH MAY BE ENFORCED BY THE PARTIES.",N,,,,,N,,,,N,,N,,N,,,,,,,N,,Y,"Status as Independent Entities. None of the provisions of this Agreement is intended to create, nor shall be deemed or construed to create any relationship between Provider and All Health or a Payor other than that of independent entities contracting with each other solely for the purpose of effecting the provisions of this Agreement. Neither Provider nor All Health /Payor, nor any of their respective agents, employees or representatives shall be construed to be the agent, employee or representative of the other.",N,,,N,,N,,N,,,,,,N,,N,,,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered pursuant to this Addendum, the lesser of: 100% of the State of California Medi-Cal Fee Schedule +rates in effect at the time of service, subject to any adjustments made by the State of California under the applicable +Medi-Cal Fee-For-Service Program; (ii) Fee-for-service rates for the commercial Benefit Program set forth in +Addendum A, Exhibit A-1; or (iii) Provider's billed charges.",N,N, +39,Filename: molina_2016.txt,HOSPITAL SERVICES AGREEMENT,"Sample Company Name, Inc.",Texas,Y,Y,"ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider.",N,2018-12-31,90.0,30.0,This Agreement may be terminated without cause at any time by either Party by giving at least ninety (90) days prior written notice to the other Party.,90.0,Y,,Y,12/01/2016,,"XYZ Company, Inc.",Facilities on Attachment E,,,,,,"XYZ Company, Inc.","North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039","These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq.",Y,2016,27,24.0,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,NICU Level 2,Marketplace,N,,"Rev Code 172 with MS DRG 789 - 794 | Per Diem $5,658",Flat Fee,,,"$5,658 Per Diem",,,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",N,,,,N,,N,,,N,N,,Y,"Health Plan shall make determinations of claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable.",,"This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, ""mandatory"" means that the state or federal law provision cannot be +waived or altered by contract.","4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid.","6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via ""Meet and Confer"". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services (""JAMS""), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution (""ADR"") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings (""Selected Arbitrator""). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act (""FAA""), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction.",Y,"6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider.",,,"Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring special treatment that prevents timely adjudication of the Claim.",N,,"6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement.","Provider will promptly deliver to Health Plan, upon request or as may be required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or third party payers, any information, statistical data, or Record pertaining to Members served by Provider. Provider is responsible for the fees associated with producing such records. Provider will further give direct access to said patient care information as requested by Health Plan or as required by any state or federal authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will survive any termination.",N,,N,,N,,"Health Plan will maintain data on Member eligibility and enrollment. Health Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for purposes of allowing participating providers to confirm Member eligibility.","For Covered Services that require prior authorizations, Provider shall make commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered Service. Provider will not have to obtain prior authorizations before providing Emergency Services.","Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual and this Agreement, this Agreement shall control.","Provider will maintain premises and professional liability insurance in coverage amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. If the coverage is claims made or reporting, Provider agrees to purchase similar ""tail"" coverage upon termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of such insurance coverage.",,Y,"Nothing in this Agreement modifies any benefits, terms, or conditions contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern.",Y,"Nothing contained in this Agreement is intended to create, nor will it be construed to create, any relationship between the Parties other than that of independent parties contracting with each other solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and independent management and will be responsible for its own operations. Nothing contained in this Agreement is intended to create, nor will be construed to create, any right in any third party to enforce this Agreement.",N,,,N,,Y,"Provider acknowledges Health Plan's right to review Provider's claims prior to payment for appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and determinations of designated implantable devices and/or implantable orthopedic devices.",N,,,,,,N,,N,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",N,N, +40,Filename: molina_2016.txt,HOSPITAL SERVICES AGREEMENT,"Sample Company Name, Inc.",Texas,Y,Y,"ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider.",N,2018-12-31,90.0,30.0,This Agreement may be terminated without cause at any time by either Party by giving at least ninety (90) days prior written notice to the other Party.,90.0,Y,,Y,12/01/2016,,"XYZ Company, Inc.",Facilities on Attachment E,,,,,,"XYZ Company, Inc.","North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039","These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq.",Y,2016,27,24.0,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,NICU Level 2 - Effective Date 2018,Marketplace,N,,"Rev Code 172 with MS DRG 789 - 794 | Per Diem $5,792",Flat Fee,,,"$5,792 Per Diem",,,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",N,,,,N,,N,,,N,N,,Y,"Health Plan shall make determinations of claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable.",,"This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, ""mandatory"" means that the state or federal law provision cannot be +waived or altered by contract.","4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid.","6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via ""Meet and Confer"". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services (""JAMS""), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution (""ADR"") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings (""Selected Arbitrator""). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act (""FAA""), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction.",Y,"6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider.",,,"Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring special treatment that prevents timely adjudication of the Claim.",N,,"6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement.","Provider will promptly deliver to Health Plan, upon request or as may be required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or third party payers, any information, statistical data, or Record pertaining to Members served by Provider. Provider is responsible for the fees associated with producing such records. Provider will further give direct access to said patient care information as requested by Health Plan or as required by any state or federal authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will survive any termination.",N,,N,,N,,"Health Plan will maintain data on Member eligibility and enrollment. Health Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for purposes of allowing participating providers to confirm Member eligibility.","For Covered Services that require prior authorizations, Provider shall make commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered Service. Provider will not have to obtain prior authorizations before providing Emergency Services.","Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual and this Agreement, this Agreement shall control.","Provider will maintain premises and professional liability insurance in coverage amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. If the coverage is claims made or reporting, Provider agrees to purchase similar ""tail"" coverage upon termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of such insurance coverage.",,Y,"Nothing in this Agreement modifies any benefits, terms, or conditions contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern.",Y,"Nothing contained in this Agreement is intended to create, nor will it be construed to create, any relationship between the Parties other than that of independent parties contracting with each other solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and independent management and will be responsible for its own operations. Nothing contained in this Agreement is intended to create, nor will be construed to create, any right in any third party to enforce this Agreement.",N,,,N,,Y,"Provider acknowledges Health Plan's right to review Provider's claims prior to payment for appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and determinations of designated implantable devices and/or implantable orthopedic devices.",N,,,,,,N,,N,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",N,N, +41,Filename: molina_2016.txt,HOSPITAL SERVICES AGREEMENT,"Sample Company Name, Inc.",Texas,Y,Y,"ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider.",N,2018-12-31,90.0,30.0,This Agreement may be terminated without cause at any time by either Party by giving at least ninety (90) days prior written notice to the other Party.,90.0,Y,,Y,12/01/2016,,"XYZ Company, Inc.",Facilities on Attachment E,,,,,,"XYZ Company, Inc.","North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039","These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq.",Y,2016,27,24.0,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,All Inpatient Services,Marketplace,N,,"Reimbursement for all Medicare Inpatient services shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with readmissions in adjudication of claims ""Readmission Factor"", whether or not an individual hospital is assessed that penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either retrospectively or prospectively.",% of MCR,100% of MCR,1.0,,,,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",N,,,,N,,N,,,N,N,,Y,"Health Plan shall make determinations of claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable.",,"This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, ""mandatory"" means that the state or federal law provision cannot be +waived or altered by contract.","4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid.","6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via ""Meet and Confer"". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services (""JAMS""), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution (""ADR"") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings (""Selected Arbitrator""). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act (""FAA""), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction.",Y,"6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider.",,,"Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring special treatment that prevents timely adjudication of the Claim.",N,,"6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement.","Provider will promptly deliver to Health Plan, upon request or as may be required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or third party payers, any information, statistical data, or Record pertaining to Members served by Provider. Provider is responsible for the fees associated with producing such records. Provider will further give direct access to said patient care information as requested by Health Plan or as required by any state or federal authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will survive any termination.",N,,N,,N,,"Health Plan will maintain data on Member eligibility and enrollment. Health Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for purposes of allowing participating providers to confirm Member eligibility.","For Covered Services that require prior authorizations, Provider shall make commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered Service. Provider will not have to obtain prior authorizations before providing Emergency Services.","Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual and this Agreement, this Agreement shall control.","Provider will maintain premises and professional liability insurance in coverage amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. If the coverage is claims made or reporting, Provider agrees to purchase similar ""tail"" coverage upon termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of such insurance coverage.",,Y,"Nothing in this Agreement modifies any benefits, terms, or conditions contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern.",Y,"Nothing contained in this Agreement is intended to create, nor will it be construed to create, any relationship between the Parties other than that of independent parties contracting with each other solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and independent management and will be responsible for its own operations. Nothing contained in this Agreement is intended to create, nor will be construed to create, any right in any third party to enforce this Agreement.",N,,,N,,Y,"Provider acknowledges Health Plan's right to review Provider's claims prior to payment for appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and determinations of designated implantable devices and/or implantable orthopedic devices.",N,,,,,,N,,N,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",N,N, +42,Filename: molina_2016.txt,HOSPITAL SERVICES AGREEMENT,"Sample Company Name, Inc.",Texas,Y,Y,"ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider.",N,2018-12-31,90.0,30.0,This Agreement may be terminated without cause at any time by either Party by giving at least ninety (90) days prior written notice to the other Party.,90.0,Y,,Y,12/01/2016,,"XYZ Company, Inc.",Facilities on Attachment E,,,,,,"XYZ Company, Inc.","North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039","These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq.",Y,2016,27,24.0,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,Outpatient Default Rate,Marketplace,N,,Covered Services rendered in which there is not a reimbursement amount addressed in Table 2 for Outpatient Services shall be reimbursed at twenty-five percent (25%) of Provider's billed charges.,% of BC,25% of BC,0.25,,,,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",N,,,,N,,N,,,N,N,,Y,"Health Plan shall make determinations of claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable.",,"This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, ""mandatory"" means that the state or federal law provision cannot be +waived or altered by contract.","4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid.","6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via ""Meet and Confer"". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services (""JAMS""), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution (""ADR"") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings (""Selected Arbitrator""). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act (""FAA""), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction.",Y,"6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider.",,,"Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring special treatment that prevents timely adjudication of the Claim.",N,,"6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement.","Provider will promptly deliver to Health Plan, upon request or as may be required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or third party payers, any information, statistical data, or Record pertaining to Members served by Provider. Provider is responsible for the fees associated with producing such records. Provider will further give direct access to said patient care information as requested by Health Plan or as required by any state or federal authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will survive any termination.",N,,N,,N,,"Health Plan will maintain data on Member eligibility and enrollment. Health Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for purposes of allowing participating providers to confirm Member eligibility.","For Covered Services that require prior authorizations, Provider shall make commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered Service. Provider will not have to obtain prior authorizations before providing Emergency Services.","Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual and this Agreement, this Agreement shall control.","Provider will maintain premises and professional liability insurance in coverage amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. If the coverage is claims made or reporting, Provider agrees to purchase similar ""tail"" coverage upon termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of such insurance coverage.",,Y,"Nothing in this Agreement modifies any benefits, terms, or conditions contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern.",Y,"Nothing contained in this Agreement is intended to create, nor will it be construed to create, any relationship between the Parties other than that of independent parties contracting with each other solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and independent management and will be responsible for its own operations. Nothing contained in this Agreement is intended to create, nor will be construed to create, any right in any third party to enforce this Agreement.",N,,,N,,Y,"Provider acknowledges Health Plan's right to review Provider's claims prior to payment for appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and determinations of designated implantable devices and/or implantable orthopedic devices.",N,,,,,,N,,N,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",N,N, +43,Filename: molina_2016.txt,HOSPITAL SERVICES AGREEMENT,"Sample Company Name, Inc.",Texas,Y,Y,"ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider.",N,2018-12-31,90.0,30.0,This Agreement may be terminated without cause at any time by either Party by giving at least ninety (90) days prior written notice to the other Party.,90.0,Y,,Y,12/01/2016,,"XYZ Company, Inc.",Facilities on Attachment E,,,,,,"XYZ Company, Inc.","North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039","These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq.",Y,2016,27,24.0,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,All Outpatient Services - Effective Date 2016 - 2017,Marketplace,N,,215% of Current Year Medicare rate Allowable*.,% of MCR,215% of MCR,2.15,,,,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",N,,,,Y,2018.0,N,,,N,N,,Y,"Health Plan shall make determinations of claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable.",,"This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, ""mandatory"" means that the state or federal law provision cannot be +waived or altered by contract.","4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid.","6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via ""Meet and Confer"". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services (""JAMS""), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution (""ADR"") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings (""Selected Arbitrator""). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act (""FAA""), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction.",Y,"6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider.",,,"Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring special treatment that prevents timely adjudication of the Claim.",N,,"6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement.","Provider will promptly deliver to Health Plan, upon request or as may be required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or third party payers, any information, statistical data, or Record pertaining to Members served by Provider. Provider is responsible for the fees associated with producing such records. Provider will further give direct access to said patient care information as requested by Health Plan or as required by any state or federal authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will survive any termination.",N,,N,,N,,"Health Plan will maintain data on Member eligibility and enrollment. Health Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for purposes of allowing participating providers to confirm Member eligibility.","For Covered Services that require prior authorizations, Provider shall make commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered Service. Provider will not have to obtain prior authorizations before providing Emergency Services.","Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual and this Agreement, this Agreement shall control.","Provider will maintain premises and professional liability insurance in coverage amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. If the coverage is claims made or reporting, Provider agrees to purchase similar ""tail"" coverage upon termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of such insurance coverage.",,Y,"Nothing in this Agreement modifies any benefits, terms, or conditions contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern.",Y,"Nothing contained in this Agreement is intended to create, nor will it be construed to create, any relationship between the Parties other than that of independent parties contracting with each other solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and independent management and will be responsible for its own operations. Nothing contained in this Agreement is intended to create, nor will be construed to create, any right in any third party to enforce this Agreement.",N,,,N,,Y,"Provider acknowledges Health Plan's right to review Provider's claims prior to payment for appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and determinations of designated implantable devices and/or implantable orthopedic devices.",N,,,,,,N,,N,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",N,N, +44,Filename: molina_2016.txt,HOSPITAL SERVICES AGREEMENT,"Sample Company Name, Inc.",Texas,Y,Y,"ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider.",N,2018-12-31,90.0,30.0,This Agreement may be terminated without cause at any time by either Party by giving at least ninety (90) days prior written notice to the other Party.,90.0,Y,,Y,12/01/2016,,"XYZ Company, Inc.",Facilities on Attachment E,,,,,,"XYZ Company, Inc.","North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039","These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq.",Y,2016,27,24.0,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,All Outpatient Services - Effective Date 2018,Marketplace,N,,220% of Current Year Medicare rate Allowable*,% of MCR,220% of MCR,2.2,,,,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",N,,,,N,,N,,,N,N,,Y,"Health Plan shall make determinations of claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable.",,"This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, ""mandatory"" means that the state or federal law provision cannot be +waived or altered by contract.","4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid.","6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via ""Meet and Confer"". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services (""JAMS""), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution (""ADR"") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings (""Selected Arbitrator""). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act (""FAA""), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction.",Y,"6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider.",,,"Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring special treatment that prevents timely adjudication of the Claim.",N,,"6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement.","Provider will promptly deliver to Health Plan, upon request or as may be required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or third party payers, any information, statistical data, or Record pertaining to Members served by Provider. Provider is responsible for the fees associated with producing such records. Provider will further give direct access to said patient care information as requested by Health Plan or as required by any state or federal authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will survive any termination.",N,,N,,N,,"Health Plan will maintain data on Member eligibility and enrollment. Health Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for purposes of allowing participating providers to confirm Member eligibility.","For Covered Services that require prior authorizations, Provider shall make commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered Service. Provider will not have to obtain prior authorizations before providing Emergency Services.","Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual and this Agreement, this Agreement shall control.","Provider will maintain premises and professional liability insurance in coverage amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. If the coverage is claims made or reporting, Provider agrees to purchase similar ""tail"" coverage upon termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of such insurance coverage.",,Y,"Nothing in this Agreement modifies any benefits, terms, or conditions contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern.",Y,"Nothing contained in this Agreement is intended to create, nor will it be construed to create, any relationship between the Parties other than that of independent parties contracting with each other solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and independent management and will be responsible for its own operations. Nothing contained in this Agreement is intended to create, nor will be construed to create, any right in any third party to enforce this Agreement.",N,,,N,,Y,"Provider acknowledges Health Plan's right to review Provider's claims prior to payment for appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and determinations of designated implantable devices and/or implantable orthopedic devices.",N,,,,,,N,,N,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",N,N, +45,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Covered Services,PPO,Y,100% of BC,"Compensation shall be based on the Resource Based Relative Value Scale (RBRVS), the Conversion Factors (CF) and the Geographic Practice Cost Indices (GPCI) adjustment factors promulgated by the Centers for Medicare and Medicaid Services (CMS). Physician shall be compensated for Covered Services in an amount, less applicable Copayments and/or coinsurance, that is equal to the lesser of: (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges, or (c) Physicians usual billed charges.",% of MCR,90% of MCR,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +46,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Covered Services,EPO,Y,100% of BC,"Compensation shall be based on the Resource Based Relative Value Scale (RBRVS), the Conversion Factors (CF) and the Geographic Practice Cost Indices (GPCI) adjustment factors promulgated by the Centers for Medicare and Medicaid Services (CMS). Physician shall be compensated for Covered Services in an amount, less applicable Copayments and/or coinsurance, that is equal to the lesser of: (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges, or (c) Physicians usual billed charges.",% of MCR,90% of MCR,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +47,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Medications,PPO,Y,100% of BC,"Medications provided or administered by Physician shall be billed using HCPC codes if available and shall be compensated at the lesser of (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for medications for which a HCPC code has not been established Physician shall bill using the NDC code, drug and manufacturer name and shall be compensated at the Average Wholesale Price, or (c) Physician's billed charge amount not to exceed usual, reasonable and customary charges.",% of HCFA participating provider fee schedule,90% of HCFA participating provider fee schedule,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +48,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Medications,EPO,Y,100% of BC,"Medications provided or administered by Physician shall be billed using HCPC codes if available and shall be compensated at the lesser of (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for medications for which a HCPC code has not been established Physician shall bill using the NDC code, drug and manufacturer name and shall be compensated at the Average Wholesale Price, or (c) Physician's billed charge amount not to exceed usual, reasonable and customary charges.",% of MCR,90% of MCR,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +49,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Immunizations,PPO,Y,100% of BC,"Immunization administered by Physician shall be billed using CPT-4 codes and shall be compensated at the lesser of a) the Physician's billed charges, or b) the Average Wholesale Price (AWP) as established by MediSpan less ten percent (10%). This AWP fee schedule is reviewed and subject to adjustment on a semi annual basis.",,,,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,90% of AWP,Y,semi annual basis,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +50,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Immunizations,EPO,Y,100% of BC,"Immunization administered by Physician shall be billed using CPT-4 codes and shall be compensated at the lesser of a) the Physician's billed charges, or b) the Average Wholesale Price (AWP) as established by MediSpan less ten percent (10%). This AWP fee schedule is reviewed and subject to adjustment on a semi annual basis.",,,,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,90% of AWP,Y,semi annual basis,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +51,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Laboratory Procedures,PPO,Y,100% of BC,"Compensation for laboratory procedures provided and administered by Physician shall be at the lesser of 90% of the HCFA participating provider fee schedule for Physician locality, or Physician's usual billed charge amount not to exceed usual, reasonable and customary charges.",% of HCFA participating provider fee schedule,90% of HCFA participating provider fee schedule,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +52,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Laboratory Procedures,EPO,Y,100% of BC,"Compensation for laboratory procedures provided and administered by Physician shall be at the lesser of 90% of the HCFA participating provider fee schedule for Physician locality, or Physician's usual billed charge amount not to exceed usual, reasonable and customary charges.",% of HCFA participating provider fee schedule,90% of HCFA participating provider fee schedule,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +53,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with vaginal delivery,PPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59400-Global Obstetric care with vaginal delivery. $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +54,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with vaginal delivery,EPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59400-Global Obstetric care with vaginal delivery. $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +55,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with Cesarean delivery,PPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59510-Global Obstetric care with Cesarean delivery $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +56,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with Cesarean delivery,EPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59510-Global Obstetric care with Cesarean delivery $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +57,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Anesthesiology Services - Anesthesiology Services,PPO,Y,75% of BC,"Physician shall be compensated for anesthesiology services which are Covered Services at the lesser of (a) $39.00 per unit value in accordance with the American Society of Anesthesiology (ASA) unit scale, or (b) 75% of the Physician's usual billed charges.",Flat Fee,,,$39.00 per unit value,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +58,Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,3.0,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Anesthesiology Services - Anesthesiology Services,EPO,Y,75% of BC,"Physician shall be compensated for anesthesiology services which are Covered Services at the lesser of (a) $39.00 per unit value in accordance with the American Society of Anesthesiology (ASA) unit scale, or (b) 75% of the Physician's usual billed charges.",Flat Fee,,,$39.00 per unit value,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +59,Filename: tx_74-28.txt,COLLABORATIVE CLINICAL ENGAGEMENT INCENTIVE PROGRAM EXHIBIT,XYZ HEALTH PLAN Inc.,Texas,N,N,"5. Term and Termination. The term of this Exhibit is 12 months beginning the first day of the month after the Provider agrees through the execution of this exhibit to participate in the Collaborative Clinical Engagement Program. Either party may terminate participation of Provider and the Practitioners in the Collaborative Clinical Engagement Program for any reason prior to the expiration or termination of the Agreement upon ninety (90) days prior written notice to the other party. In the event of such termination, or any termination of the Agreement, Provider shall not be eligible for payment of any unpaid Collaborative Clinical Engagement Bonus corresponding to the Contract Year in which such termination is effective, and this Exhibit and the Collaborative Clinical Engagement Program will be of no further force and effect.",N,2021-08-31,90.0,,Either party may terminate participation of Provider and the Practitioners in the Collaborative Clinical Engagement Program for any reason prior to the expiration or termination of the Agreement upon ninety (90) days prior written notice to the other party.,90.0,N,,N,09/01/2020,12-3456789,DUMMY PHYSICIANS ALLIANCE,DUMMY PHYSICIANS ALLIANCE,,,,,,DUMMY PHYSICIANS ALLIANCE,,,N,74-28,6,,,,,,,,,,,,,,,,,,,,,,,,,,,N,,,N,N,,N,,,"Regulatory Requirements. Provider agrees that, in connection with any Medicare and Medicaid products, Provider shall and shall prohibit the Practitioners and other persons under contract with Provider from claiming payment in any form directly or indirectly from a federal health care program (as that term is defined in Section 1128B(f) of the Social Security Act, 42 U.S.C. 1320a-7b(f)) for items or services covered under this Agreement. Provider and each Practitioner acknowledge and agree (i) that it, he or she has not given or received remuneration in return for or to induce the provision or acceptance of business (other than business covered by this Agreement) for which payment may be made in whole or in part by a federal health care program on a fee-for-service or cost basis; and (ii) that it, he or she will not shift the financial burden of this Agreement to the extent that increased payments are claimed from a federal health care program.","d. Repayment. No later than 120 days after the end of each Contract Year, Plan shall calculate the +compliance rate for the provider selected Engagement Activity and Quality Measure. Please see +additional calculation information in Schedule A. attached hereto and incorporated herein. If the +provider selected target compliance percentage for Engagement Activity is less than or equal to 75% of +the required goal for the Contract Year, Provider shall repay Plan fifty percent (50%) of the Collaborative +Clinical Engagement Bonus paid for the applicable Contract Year. Such repayment shall be in the form +of, at Plan's option, a recoupment from any incentive payment or combination thereof, or an offset of +future bonus payments payable in connection with any subsequent Contract Year. Plan shall be solely +responsible for the methodology used, and the final calculation indicated above.",,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,$2.00,,,N,,,,N,N, +60,Filename: tx_01-66.txt,MANAGED BEHAVIORAL HEALTH PRACTITIONER FEE FOR SERVICE AGREEMENT,Best Healthcare Provider Services,Texas,N,N,,N,,,,,,N,,N,10/01/2005,,,Jake Ball,,,,,,,,,N,01-66,2,,,,,,,,,,,,,,,,,,,,,,,,,,,N,,,N,N,,N,,,,,,N,,,,"Clean Claim means an electronic submission that is compliant with the federal standard transactions provisions of the Health Insurance Portability and Accountability Act of 1996 (""HIPAA""), Pub. L. 104-191, or a CMS 1500 claim form, or its successor, submitted by Practitioner for Covered Behavioral Health Services provided to a Covered Person which accurately reflects such information as is required by this Agreement and the Provider Manual, and which has no defect or impropriety (including any lack of any required substantiating documentation) or particular circumstance requiring special treatment that prevents timely payment from being made on the claim.",N,,,,N,,N,,N,,,"Preauthorization means verbal or written approval by ABCD, Plan, or other authorized person or entity, including a corresponding approval number obtained prior to admitting a Covered Person to a behavioral health care facility or to providing certain other Covered Behavioral Health Services to a Covered Person, when approval is required under the utilization management program of the applicable Plan.",,,,N,,N,,N,,,N,,N,,N,,,,,,,,N,,,,N,N, +61,Filename: tx_84-24.txt,PARTICIPATING PROVIDER AGREEMENT,"WellBeing HealthPlan, Inc.",Texas,Y,N,,N,,,,,,N,,N,,,Trinity HealtCare LLC,Trinity HealtCare LLC,,,,,,Trinity HealtCare LLC,,,N,84-24,2,,,,,,,,,,,,,,,,,,,,,,,,,,,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable federal and state statutes, regulations, regulatory guidance, judicial or administrative rulings, requirements of Governmental Contracts and standards and requirements of any accrediting or certifying organization, including, but not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.",,"""Clean Claim"" has, as to each particular Product, the meaning set forth in the applicable Product Attachment or, if no such definition exists, the Provider Manual.",N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,,,N,,,,Y,N, +62,Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120.0,30.0,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120.0,Y,,Y,,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,15.0,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Airfare,XYZ Corporation,N,,"Airfare (no first class, business class allowed upon pre-approval and requires two week advance booking)",,,,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +63,Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120.0,30.0,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120.0,Y,,Y,,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,15.0,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Lodging,XYZ Corporation,,,Lodging,,,,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +64,Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120.0,30.0,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120.0,Y,,Y,,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,15.0,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Food and beverages,XYZ Corporation,N,,Food and beverages (capped per GSA per diem rate),,,,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +65,Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120.0,30.0,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120.0,Y,,Y,,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,15.0,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Ground transportation,XYZ Corporation,N,,"Ground transportation (taxi, bus, rental car or Uber)",,,,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +66,Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120.0,30.0,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120.0,Y,,Y,,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,15.0,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Self-Parking,XYZ Corporation,N,,Self-Parking,Flat Fee,,,$5 Per Parking Session,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +67,Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120.0,30.0,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120.0,Y,,Y,,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,15.0,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Tolls,XYZ Corporation,N,,Tolls,,,,,,,N,N,,N,,,,N,,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +68,Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120.0,30.0,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120.0,Y,,Y,,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,15.0,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Covered Services,XYZ Corporation,Y,,Reimbursable Expenses (require pre-approval by XYZ and shall not exceed 12% of the specific engagement),,,,,,,N,N,,N,,,12% of engagement,N,,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +69,Filename: cnc_01-06.txt,AMENDMENT NUMBER ONE PARTICIPATING PROVIDER AGREEMENT,Dummy HealthCare Inc.,Nebraska,N,N,,N,,,,,,N,,N,12/01/2019,12-3456789,"Picture, LLC Novelty Pharmacy","Picture, LLC Novelty Pharmacy",,"Picture, LLC Novelty Pharmacy",,,,"Picture, LLC Novelty Pharmacy",,,N,01-06,4,3.0,"Attachment A: Medicaid +EXHIBIT 2 +COMPENSATION SCHEDULE +PROFESSIONAL SERVICES +Picture, LLC Novelty Pharmacy",MEDICAID,Professional,,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for professional Covered Services rendered to a Covered Person shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for professional Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,,,N,N,,N,,,,N,,N,,112233.0,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +70,Filename: cnc_01-06.txt,AMENDMENT NUMBER ONE PARTICIPATING PROVIDER AGREEMENT,Dummy HealthCare Inc.,Nebraska,N,N,,N,,,,,,N,,N,12/01/2019,12-3456789,"Picture, LLC Novelty Pharmacy","Picture, LLC Novelty Pharmacy",,"Picture, LLC Novelty Pharmacy",,,,"Picture, LLC Novelty Pharmacy",,,N,01-06,4,4.0,"Attachment A: Medicaid +EXHIBIT 2 +COMPENSATION SCHEDULE +PROFESSIONAL SERVICES +Picture, LLC Novelty Pharmacy",MEDICAID,Professional,,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for professional Covered Services rendered to a Covered Person shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for professional Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,,,N,N,,N,,,,N,,N,,112233.0,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +71,Filename: cnc_01-06.txt,AMENDMENT NUMBER ONE PARTICIPATING PROVIDER AGREEMENT,Dummy HealthCare Inc.,Nebraska,N,N,,N,,,,,,N,,N,12/01/2019,12-3456789,"Picture, LLC Novelty Pharmacy","Picture, LLC Novelty Pharmacy",,"Picture, LLC Novelty Pharmacy",,,,"Picture, LLC Novelty Pharmacy",,,N,01-06,4,4.0,"Attachment A: Medicaid +EXHIBIT 2 +COMPENSATION SCHEDULE +PROFESSIONAL SERVICES +Picture, LLC Novelty Pharmacy",MEDICAID,Professional,,OP,Payment for Multiple Procedures - Multiple Outpatient Surgical or Scope Procedures,Medicaid,Y,100% of AC,"Where multiple outpatient surgical or scope procedures performed on a Covered Person during a single occasion of surgery, reimbursement will be as follows: i) the procedure for which the Allowed Amount under this Compensation Schedule is greatest will be reimbursed at one hundred percent (100%) of such Allowed Amount; and ii) the other procedures under this Compensation Schedule will each be reimbursed at fifty percent (50%) of such Allowed Amounts.",% of AA / % of AA,100% of AA / 50% of AA,1 / 0.5,,,,N,N,,N,,,,N,,N,,112233.0,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,,N,N, +72,Filename: tx_06-03.txt,JOINDER AGREEMENT,"Second Provider, Inc.",Texas,N,N,,N,,,,,,N,,N,09/01/2017,12-3456789,Best Healthcare Provider Services,Tess Goveler,,,,,,,,,N,06-03,2,,,,,,,,,,,,,,,,,,,,,,,,,,,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,,,,,N,,,,N,N, +73,Filename: cnc_arch.txt,INDIVIDUAL PRODUCT ATTACHMENT,Berkley Community Health Care,Ohio,Y,N,"2.4 Term. The term of the Participating Providers' participation in the Individual Product will commence as of the Effective Date and, thereafter, will be coterminous with the term of the Agreement unless terminated pursuant to the Agreement or this Product Attachment. The participation of any Participating Provider as a 'Participating Provider' in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",Y,,90.0,,"The participation of any Participating Provider as a ""Participating Provider"" in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",90.0,N,,Y,,,,,,,,,,Berkley Community Health Care,,,N,,12,11.0,"EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT +PROVIDER COMPENSATION SCHEDULE +COMMERCIAL-EXCHANGE PRODUCT +PROFESSIONAL SERVICES",COMMERCIAL-EXCHANGE,Professional,,,Covered Services,Commercial-Exchange,Y,100% of AC,"For Covered Services provided to Covered Persons, Payor shall pay Provider the lesser of: (i) the Provider's Allowable Charges; or (ii) one hundred percent (100%) of the Payor Medicare fee schedule in effect on the date of service and specific to the services rendered, less any applicable coinsurance or deductible. This fee schedule is based on the CMS/Medicare RBRVS relative values and for certain codes alternative fee sources may be used.",% of MCR,100% of MCR,1,,"In the event CMS contains no published fee amount, alternate (or ""gap fill"") Fee Sources may be used to supply the Fee Basis amount for deriving the Fee Amount. At such time in the future as CMS publishes its own RBRVS value for that CPT/HCPCS code, Payor will use the CMS fee amount for that code and no longer use the alternate Fee Source.","100% of alternate (or ""gap fill"") Fee Sources",N,N,,N,,,,N,,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and +standards and requirements of any accrediting or certifying organization, including, but +not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement.","Unless otherwise specified in this Product Attachment and as limited by Section 2.2(b) below, all Participating Providers under the Agreement will participate in the Individual Product as ""Participating Providers,"" and will provide to Covered Persons enrolled in or covered by a Individual Product, upon the same terms and conditions contained in the Agreement, as supplemented or modified by this Product Attachment, those Covered Services that are provided by Participating Providers pursuant to the Agreement. In providing such services, Provider shall, and shall cause Participating Providers, to comply with and abide by the provisions of the Agreement, including this Product Attachment and the Provider Manual.",,N,,,"Each Participating Provider shall keep confidential and make available those health records maintained by the Participating Provider to monitor and evaluate the quality of care, to conduct evaluations and audits, and to determine on a concurrent or retrospective basis the necessity of and appropriateness of health care services provided to Covered Persons. Each Participating Provider shall make these health records available to appropriate State and federal authorities involved in assessing the quality of care or in investigating the grievances or complaints of Covered Persons. Each Participating Provider shall comply with applicable State and federal laws related to the confidentiality of medical or health records.",N,,N,,N,,,,,"Each Participating Provider shall maintain adequate professional liability and malpractice insurance, and shall notify HMO not more than ten (10) days after the Participating Provider's receipt of notice of any reduction or cancellation of such coverage.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement in the event of HMO's or the Payor's insolvency or discontinuance of operations. Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement as needed to complete any Medically Necessary procedures commenced but unfinished at the time of HMO's or the Payor's insolvency or discontinuance of operations. The completion of a Medically Necessary procedure shall include the rendering of all Covered Services that constitute Medically Necessary follow-up care for that procedure. The foregoing,N,N, +74,Filename: cnc_arch.txt,INDIVIDUAL PRODUCT ATTACHMENT,Berkley Community Health Care,Ohio,Y,N,"2.4 Term. The term of the Participating Providers' participation in the Individual Product will commence as of the Effective Date and, thereafter, will be coterminous with the term of the Agreement unless terminated pursuant to the Agreement or this Product Attachment. The participation of any Participating Provider as a 'Participating Provider' in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",Y,,90.0,,"The participation of any Participating Provider as a ""Participating Provider"" in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",90.0,N,,Y,,,,,,,,,,Berkley Community Health Care,,,N,,12,12.0,"EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT +PROVIDER COMPENSATION SCHEDULE +COMMERCIAL-EXCHANGE PRODUCT +PROFESSIONAL SERVICES",COMMERCIAL-EXCHANGE,Professional,,,Covered Services,Commercial-Exchange,Y,100% of AC,"For Covered Services provided to Covered Persons, Payor shall pay Provider the lesser of: (i) the Provider's Allowable Charges; or (ii) one hundred percent (100%) of the Payor Medicare fee schedule in effect on the date of service and specific to the services rendered, less any applicable coinsurance or deductible. This fee schedule is based on the CMS/Medicare RBRVS relative values and for certain codes alternative fee sources may be used.",% of MCR,100% of MCR,1,,"In the event CMS contains no published fee amount, alternate (or ""gap fill"") Fee Sources may be used to supply the Fee Basis amount for deriving the Fee Amount. At such time in the future as CMS publishes its own RBRVS value for that CPT/HCPCS code, Payor will use the CMS fee amount for that code and no longer use the alternate Fee Source.","100% of alternate (or ""gap fill"") Fee Sources",N,N,,N,,,,N,,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and +standards and requirements of any accrediting or certifying organization, including, but +not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement.","Unless otherwise specified in this Product Attachment and as limited by Section 2.2(b) below, all Participating Providers under the Agreement will participate in the Individual Product as ""Participating Providers,"" and will provide to Covered Persons enrolled in or covered by a Individual Product, upon the same terms and conditions contained in the Agreement, as supplemented or modified by this Product Attachment, those Covered Services that are provided by Participating Providers pursuant to the Agreement. In providing such services, Provider shall, and shall cause Participating Providers, to comply with and abide by the provisions of the Agreement, including this Product Attachment and the Provider Manual.",,N,,,"Each Participating Provider shall keep confidential and make available those health records maintained by the Participating Provider to monitor and evaluate the quality of care, to conduct evaluations and audits, and to determine on a concurrent or retrospective basis the necessity of and appropriateness of health care services provided to Covered Persons. Each Participating Provider shall make these health records available to appropriate State and federal authorities involved in assessing the quality of care or in investigating the grievances or complaints of Covered Persons. Each Participating Provider shall comply with applicable State and federal laws related to the confidentiality of medical or health records.",N,,N,,N,,,,,"Each Participating Provider shall maintain adequate professional liability and malpractice insurance, and shall notify HMO not more than ten (10) days after the Participating Provider's receipt of notice of any reduction or cancellation of such coverage.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement in the event of HMO's or the Payor's insolvency or discontinuance of operations. Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement as needed to complete any Medically Necessary procedures commenced but unfinished at the time of HMO's or the Payor's insolvency or discontinuance of operations. The completion of a Medically Necessary procedure shall include the rendering of all Covered Services that constitute Medically Necessary follow-up care for that procedure. The foregoing,N,N, +75,Filename: cnc_arch.txt,INDIVIDUAL PRODUCT ATTACHMENT,Berkley Community Health Care,Ohio,Y,N,"2.4 Term. The term of the Participating Providers' participation in the Individual Product will commence as of the Effective Date and, thereafter, will be coterminous with the term of the Agreement unless terminated pursuant to the Agreement or this Product Attachment. The participation of any Participating Provider as a 'Participating Provider' in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",Y,,90.0,,"The participation of any Participating Provider as a ""Participating Provider"" in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",90.0,N,,Y,,,,,,,,,,Berkley Community Health Care,,,N,,12,12.0,"EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT +PROVIDER COMPENSATION SCHEDULE +COMMERCIAL-EXCHANGE PRODUCT +PROFESSIONAL SERVICES",COMMERCIAL-EXCHANGE,Professional,,,Multiple Procedures,Commercial-Exchange,Y,100% of AC,"Multiple procedures performed during the same day will be reimbursed at 100% for the primary procedure, 50% for the second procedure, and 50% for the third procedure, subsequent procedures shall not be eligible for reimbursement.",% of MCR / % of MCR / % of MCR,100% of MCR / 50% of MCR / 50% of MCR,1 / 0.5 / 0.5,,"In the event CMS contains no published fee amount, alternate (or ""gap fill"") Fee Sources may be used to supply the Fee Basis amount for deriving the Fee Amount. At such time in the future as CMS publishes its own RBRVS value for that CPT/HCPCS code, Payor will use the CMS fee amount for that code and no longer use the alternate Fee Source.","100% of alternate (or ""gap fill"") Fee Sources",N,N,,N,,,,N,,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and +standards and requirements of any accrediting or certifying organization, including, but +not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement.","Unless otherwise specified in this Product Attachment and as limited by Section 2.2(b) below, all Participating Providers under the Agreement will participate in the Individual Product as ""Participating Providers,"" and will provide to Covered Persons enrolled in or covered by a Individual Product, upon the same terms and conditions contained in the Agreement, as supplemented or modified by this Product Attachment, those Covered Services that are provided by Participating Providers pursuant to the Agreement. In providing such services, Provider shall, and shall cause Participating Providers, to comply with and abide by the provisions of the Agreement, including this Product Attachment and the Provider Manual.",,N,,,"Each Participating Provider shall keep confidential and make available those health records maintained by the Participating Provider to monitor and evaluate the quality of care, to conduct evaluations and audits, and to determine on a concurrent or retrospective basis the necessity of and appropriateness of health care services provided to Covered Persons. Each Participating Provider shall make these health records available to appropriate State and federal authorities involved in assessing the quality of care or in investigating the grievances or complaints of Covered Persons. Each Participating Provider shall comply with applicable State and federal laws related to the confidentiality of medical or health records.",N,,N,,N,,,,,"Each Participating Provider shall maintain adequate professional liability and malpractice insurance, and shall notify HMO not more than ten (10) days after the Participating Provider's receipt of notice of any reduction or cancellation of such coverage.",,N,,N,,N,,,N,,N,,N,,,,,,N,,N,,,Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement in the event of HMO's or the Payor's insolvency or discontinuance of operations. Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement as needed to complete any Medically Necessary procedures commenced but unfinished at the time of HMO's or the Payor's insolvency or discontinuance of operations. The completion of a Medically Necessary procedure shall include the rendering of all Covered Services that constitute Medically Necessary follow-up care for that procedure. The foregoing,N,N, diff --git a/assets/sampleOne/investment_pdf_sample-AC.csv b/assets/sampleOne/investment_pdf_sample-AC.csv new file mode 100644 index 00000000..df84e708 --- /dev/null +++ b/assets/sampleOne/investment_pdf_sample-AC.csv @@ -0,0 +1,329 @@ +Contract Name,Agreement_Name (Contract Title),PAYER NAME,Health Plan State,Affiliate (Y/N),Credentialing Application Indicator,Term Clause,Contract Auto-Renewal Indicator,Termination Date,Termination Upon Notice - Days,Termination With Cause - Days,Non-Renewal Language,Non-Renewal - Days,Amend Contract Upon notice Flag (Y/N),Timeframe to Object - Days,Assignments Clause (Y/N),Contract Effective Date,IRS #,IRS_Name,MULTIPLE IRS NAMES,NPI (10-digits),NPI Name,PROV_GROUP_TIN_SIGNATORY,PROV_TIN_OTHER,PROV_NPI_OTHER,Notice to Provider Name,Notice to Provider Address,Sequestration Language,Sequestration Reductions (Y/N),Parent Agreement Code,Pages,Delegated Function Indicator,Delegated Terms,ECM,National Agreement Indicator,Cost Settlement (Y/N),Cost Settlement (Language),Late Paid Claims (Y/N),Late Paid Claims (Language),Deemer Amendment,Regulatory Requirements,Recovery Rights,Arbitration and Disputes,Exclusivity Requirement (Y/N),Exclusivity Requirement (Language),Payor,Participation in Products,Clean Claim,Independent Review (Y/N),Independent Review (Language),Indemnification,Access to Medical Records,Member Confinement Days Language (Y/N),Member Confinement Days Language (Language),Network Access Fees (Y/N),Network Access Fees (Language),Payment in Advance of Claims Submission Language (Y/N),Payment in Advance of Claims Submission Language,Eligibility Verification,Preauthorization,Policies and Procedures,Insurance Requirement,Carve-Out Vendors,Conflicts Between Certain Documents (Y/N),Conflicts Between Certain Documents (Language),Relationship of Parties (Y/N),Relationship of Parties (Language),Nonstandard Appeals Process (Y/N),Nonstandard Appeals Process (Language),Product Removal,Disparagement Prohibition (Y/N),Disparagement Prohibition (Language),Claims Editing Language (Y/N),Claims Editing Language (Language),Guarantee of Provider Yield (Y/N),Guarantee of Provider Yield (Language),HCBS Services,PMPM,Invoice Pricing (Y/N),Invoice Pricing (Language),Template,Provider-Based Billing Exclusion (Y/N),Provider-Based Billing Exclusion (Language) +Filename: chc_1.txt,ANCILLARY AGREEMENT,"Sample Company Name, Inc",Texas,Y,Y,"SECTION 10 - TERM AND TERMINATION + +10.1 +Term. Unless otherwise agreed upon by the parties, this Agreement shall commence on the +Effective Date as indicated on the signature page of this Agreement, and shall continue for an initial term of one (1) +year. The Agreement shall automatically renew for periods of one (1) year, unless either party terminates +the +Agreement as allowed in any of the following circumstances: +a. either party terminates the Agreement as allowed herein; or +b. the parties terminate this Agreement by mutual agreement in writing effective on a mutually agreed upon +date, subject to any applicable laws, rules and/or regulations. + +Regardless of the Effective Date or any renewal date of this Agreement, Contracted Provider acknowledges +that neither Community nor a Member shall have any obligation to pay for Covered Services rendered by Contracted +Provider or Healthcare Professional, until such time as Contracted Provider completes Community's credentialing +process and receives approval from Community's credentialing body. + +10.2 +Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate +this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party. + +10.3 +Termination With Cause. Either party may terminate this Agreement for material breach of any of +the terms or provisions of this Agreement by providing the other party with at least ninety (90) calendar days' +advance written notice specifying the nature of the alleged material breach. During the first sixty (60) calendar days +of the above referenced notice period, if the breaching party cures the breach to the reasonable satisfaction of the +non-breaching party, in the non-breaching party's sole discretion, and upon mutual agreement between the Parties, +the Agreement shall not terminate at such time. + +10.4 Immediate Termination. Community, at its sole election, may terminate this Agreement, and/or +participation of any Healthcare Professional rendering services under the terms of this Agreement, immediately +upon written notice to Contracted Provider in the event of any of the following: (I) suspension, revocation, condition, +expiration, or other restriction of Contracted Provider's or its Healthcare Professionals"" licensure, certification, and/or +accreditation; (ii) failure to meet or maintain Community credentialing/re-credentialing standards, as determined by +the Community in its sole discretion; (iii) suspension, limitation or bar of Contracted Provider or its Healthcare +Professionals from participation in any government healthcare program; (iv) Contracted Provider's or its Healthcare +Professionals breach of Section 5,9 (""Member Hold Harmless""); (v) determination by a government agency or any +judicial or administrative review body that Contracted Provider or its Healthcare Professionals have engaged or are +engaging in fraud; (vi) failure by Contracted Provider or its Healthcare Professionals to maintain the general and/or +professional liability insurance coverage requirements of this Agreement; (vii) Community's reasonable +determination that termination of Agreement or Contracted Provider or its Healthcare Professional is necessary for +health and safety of Member(s); or (viii) any other grounds that are not in bad faith.",Y,,90,90,"10.2 Termination Without Cause, Following the initial term as defined in 10.1, either party may terminate this Agreement at any time, without cause, upon ninety (90) calendar days' notice to the other party.",90,Y,,Y,9/1/2019,12-3456789,ABC Center,ABC Center,1234567890,ABC Center,,,,ABC Center,"123 Maple Street, Springfield, TX 77471",,N,1,38,N,,,N,N,,Y,Community will pay Providers interest at a rate of 18% per annum on all clean claims that are not adjudicated within 30 days.,,"2.5 Regulatory Compliance. Community agrees that it shall comply with all applicable requirements of State and federal authorities, all municipal ordinances and regulations, and all State and federal statutes and regulations now or hereafter in force and effect which bear upon the subject matter of this Agreement.","4.6 +Claim Audits. With the following exceptions, Community must complete all audits of a Provider claim no later than +2 years after receipt of a Clean Claim, regardless of whether the Provider participates in the Community's network: +a) in cases of provider Fraud, Waste, or Abuse that Community did not discover within the 2-year period following +receipt of a claim; +b) when regulatory officials or entities conclude an examination, audit, or inspection of a Provider more than 2 +years after Community received the claim; +c) when HHSC has recovered a capitation from Community based on a Member's ineligibility. + +If an exception to the 2-year limitation applies, then Community may recoup related payments from providers. +If an additional payment is due to Provider as a result of an audit, Community must make the payment no later than 30 days +after it completes the audit. If the audit indicates that Community is due a refund from Provider, except for retroactive +changes to a Member's Medicaid eligibility, Community must send Provider written notice of the basis and specific reasons +for the recovery no later than 30 days after it completes the audit. If the provider disagrees with Community's request, +Community must give Provider an opportunity to appeal, and may not attempt to recover the payment until the provider has +exhausted all appeal rights.","8,1 Dispute Resolution. The parties agree to meet promptly in good faith to resolve any controversy or dispute that may arise out of or relating to this Agreement that cannot be resolved informally. Neither party shall unreasonably refuse or delay the other party's request for such meeting. If the parties are unsuccessful in resolving such controversy or dispute, the dissatisfied party shall submit a written complaint (the ""Complaint"") to the other party (the ""Responding Party""), which complaint shall set forth with specificity the basis of the complaint and the proposed resolution. The Responding Party shall respond in writing to the Complaint within thirty (30) calendar days of receiving the Complaint. The Responding Party's written acceptance, rejection or modification of the proposed resolution will constitute the Responding Party's final determination. If the parties are unable to resolve the dispute within ten (10) calendar days from the date that the Responding Party responds to the Complaint, the controversy or dispute may be submitted to non-binding mediation in Harris County, Texas, at the request of any party, and the parties shall attempt to resolve the matter, in good faith, prior to the institution of any litigation or other legal action. The parties agree to select an individual qualified under the requirements of Chapter 154, Texas Civil Practice and Remedies Code, as amended, to serve as mediator. Failing agreement to name a mediator, the Parties agree to have a mediator appointed by a court of competent jurisdiction. Nothing in this paragraph shall preclude either party from seeking remedies in law or equity. Either Party may impose shortened time limits in this section if the dispute is subject to the time limits in Section 843 of the Texas Insurance Code.",Y,"11.4 Non-Exclusivity, This Agreement shall not be an exclusive agreement between Community and +Contracted Provider. Nothing herein shall be construed to restrict the rights of Contracted Provider (and any +Healthcare Professionals) or Community to participate in other preferred provider plans, health maintenance +organizations, or other managed care systems.","1.25 Payor. Community, or any other public or private entity (including, but not limited to, the federal government, the State, employers, insurance carriers, self-funded plans, associations, trust funds, and health maintenance organizations), which provides, administers, funds, insures, or is responsible for paying Participating Physicians or Participating Providers for Covered Services rendered to Members.",,"1.7 Clean Claim. An electronic claim or paper claim for payment for services that meets the Texas and/or federal statutory and regulatory requirements for ""clean claim.\",N,,"Contracted Provider will at all times hereafter indemnify, defend, and hold harmless Community and its representatives, officers, directors, employees, and agents individually and collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit and attorney's fees, and mediation expenses) which might be asserted against Community and its representatives, officers, directors, employees, and agents, individually and collectively arising from, or pertaining to, any acts or omissions of Contracted Provider or Healthcare Professionals under this Agreement; provided, however, that to the extent that any such causes of action, costs, or fees are compensated for by insurance purchased by Community, Contracted Provider shall not be required to reimburse Community or insure for same. + +Contracted Provider shall further indemnify, defend, and hold harmless Community, and as applicable, any Payor, and their representatives, officers, directors, employees, and agents individually and/or collectively from any and all causes of action, liabilities, claims, or other expenses (including, without limitation, costs of suit, attorney's fees, and/or mediation expenses) that might be asserted against Community and its representatives, officers, directors, employees, and agents individually arising from, or pertaining to, the failure or refusal of Contracted Provider to pay its subcontractors and/or the members of its provider network for services and/or goods and equipment provided to Members. Contracted Provider agrees that all Healthcare Professionals"" contracts related to the provision of services under this agreements, Contracted Provider will require that the Healthcare Professionals providing such service hold harmless Community and any Payor as applicable, and their representatives, officers, director, employees, and agents in the event of Healthcare Professional's failure or refusal to make payment for any reason and whether due to Healthcare Professional's insolvency or otherwise.","4.2 Medical Records. Contracted Provider shall maintain a complete medical record for each Member for which Contracted Provider or Healthcare Professional renders Covered Services hereunder. Such medical records shall include the recording of a Contracted Provider's services and such other records as may be required by law. Such records shall be maintained in accordance with all applicable present and future local, State, and federal laws, rules, and regulations and shall be safeguarded against loss, destruction, and unauthorized use. All medical records shall be treated as confidential so as to comply with all State and federal laws, rules, and regulations regarding the confidentiality of patient records. Contracted Provider shall retain such medical records for a period of ten (10) years following termination of this Agreement or as mandated by any applicable State or federal law.",N,,N,,N,,"3.5 Eligibility. Except where Emergency Services, including screening for emergency medical conditions, are required, Contracted Provider shall verify Member's eligibility for the services requested prior to the rendering of such services. Community shall make reasonable business efforts to timely confirm the eligibility of any Member when such is in question. Contracted Provider recognizes that a Member's eligibility may retroactively change, which may change Community's responsibility for payment. If Community makes payment to Contracted Provider and retroactively discovers a change in the Member's eligibility, Community may adjust or recoup such payment in accordance with Section 5,5 of this Agreement.","3.10 Prior Authorization and Referrals, When required under a Benefit Plan/Program, Community or applicable Payor protocols, or the Utilization Management Program, Contracted Provider agrees to obtain Prior Authorization or Referral in advance of providing Covered Services, except for Emergency Services. Contracted Provider acknowledges that failure to obtain required Prior Authorization or Referral will impact Contracted Provider's compensation for said Covered Services. For a situation involving Emergency Services, Contracted Provider agrees to ensure that Community or Payor is notified as soon as possible, but no later than twenty-four (24) hours after the provision of Covered Services or the ordering of the other Covered Services, or on the next business day.",Contracted Provider shall comply with all policies and procedures identified in the Provider Manual. Community reserves the right to revise the Provider Manual in its sole discretion from time to time. Community will use best efforts to inform Provider at least ninety (90) calendar days prior to the effective date of changes that materially affect the rights or responsibilities of Provider under this Agreement. Revisions to the Provider Manual shall not constitute amendments to this Agreement for purposes of Section 11.10.,"7.1 Professional and General Liability. Contracted Provider agrees to purchase and maintain during the term of this Agreement, at its sole cost and expense, policies of general liability, professional liability, and other insurance as shall be necessary to adequately insure Contracted Provider and Healthcare Professionals, agents, and employees against any claim or claims for damage arising by reason of personal injury or death occasioned directly or indirectly in connection with the performance of any procedure or service provided hereunder, the use of any property and facilities provided by Contracted Provider, and activities performed by Contracted Provider and Healthcare Professionals in connection with this Agreement. Such policies shall provide coverage in the amounts acceptable to Community, but in no event shall professional liability insurance be less than One Hundred Thousand Dollars ($100,000) for each person and Three Hundred Thousand Dollars ($300,000) for each single occurrence for bodily injury or death and One Hundred Thousand Dollars ($100,000) for each single occurrence for injury to or destruction of property, unless a lesser amount is determined sufficient by Community in writing. Such professional liability coverage shall include ""tail"" coverage of the same limits as stated above for any ""claims-made"" policy as necessary to continue coverage until any applicable statute of limitations has expired. Contracted Provider shall require of Contracted Provider's professional liability insurance carrier that Community be named as a party entitled to thirty (30) calendar days prior written notice of an intent to cancel or terminate such insurance. Upon execution of this Agreement, Contracted Provider shall provide to Community written proof from Contracted Provider's carrier(s) of the coverages required under this Section.",,Y,"11.17 Exhibits. Each Exhibit to this Agreement is made a part of this Agreement as though set forth fully herein. Any provision of an Amendment that is in conflict with any provision of this Agreement and its Exhibit shall take precedence and supersede the conflicting provision of this Agreement and Exhibit. Any provision of this Agreement that is in conflict with any provision of an Exhibit, other than an Amendment, or that is in conflict with any provision of the Provider Manual shall take precedence and supersede the conflicting provision of the Exhibit or the Provider Manual.",N,,N,,,N,,Y,"5.3 Claims Coding/Editing Determinations. Payor shall utilize CMS, state Medicaid and/or other nationally recognized claims and payment processing policies, procedures, and guidelines, which may include claim and code audit and edit determinations and other claims logic as may be implemented by Payor. Upon request by Contracted Provider, Payor shall forward to Contracted Provider a description and copy of Payor's coding guidelines, including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific Covered Services rendered by Contracted Provider, Payor shall forward such coding guidelines and fee schedules not later than the thirtieth (30th) day after receipt of Contracted Provider's request. Payor shall include the name, edition, and model version of the software that Payor uses to determine bundling and unbundling of claims. Further, Payor shall forward to Contracted Provider a notice of changes to Payor's coding guidelines and fee schedules that will result in a change of payment to Contracted Provider. Such notice of changes shall not later than the ninetieth (90th) day before said changes take effect, unless such changes are required by CMS, TDI, or other regulatory entity, in which Payor shall provide as much notice as reasonably possible. Payor shall not make retroactive revisions to the coding guidelines and fee schedules.",N,,,,N,,N,N, +Filename: cnc_01-06.txt,AMENDMENT NUMBER ONE PARTICIPATING PROVIDER AGREEMENT,Dummy HealthCare Inc.,Nebraska,N,N,,N,,,,,,N,,N,12/1/2019,12-3456789,"Picture, LLC Novelty Pharmacy","Picture, LLC Novelty Pharmacy",,"Picture, LLC Novelty Pharmacy",,,,"Picture, LLC Novelty Pharmacy",,,N,6-Jan,4,N,,112233,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,N,,N,N, +Filename: cnc_50-16.txt,PARTICIPATING PROVIDER AGREEMENT,"Sample Name 2, Inc.",South Carolina,Y,Y,"ARTICLE VIII - TERM AND TERMINATION + +8.1. Term. This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term ('Initial Term') of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (each a 'Renewal Term'), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term. In addition, either Party may elect to not renew a Contracted Provider's participation as a Participating Provider in a particular Product for the next Renewal Term, by giving Provider written notice of such non-renewal not less than one hundred eighty (180) days prior to the, as applicable, last day of the Initial Term or applicable Renewal Term; in such event, Provider shall immediately notify the affected Contracted Provider of such non-renewal. Termination of any Contracted Provider's participation in a particular Product will not have the effect of terminating either this Agreement or the Contracted Provider's participation in any other Product in which the Contract Provider participates under this Agreement. + +8.2. Termination. This Agreement, or the participation of Provider or a Contracted Provider as a Participating Provider in one or more Products, may be terminated or suspended as set forth below. + +8.2.1. Upon Notice. This Agreement may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination. The participation of any Contracted Provider as a Participating Provider in a Product may be terminated by either Party giving the other Party at least one hundred eighty (180) days prior written notice of such termination; in such event, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.2. With Cause. This Agreement, or the participation of any Contracted Provider as a Participating Provider in one or more Products under this Agreement, may be terminated by either Party giving at least ninety (90) days prior written notice of termination to the other Party if such other Party (or the applicable Contracted Provider) is in breach of any material term or condition of this Agreement and such other Party (or the Contracted Provider) fails to cure the breach within the sixty (60) day period immediately following the giving of written notice of such breach. Any notice given pursuant to this Section 8.2.2 must describe the specific breach. In the case of a termination of a Contracted Provider, Provider shall immediately notify the affected Contracted Provider of such termination. + +8.2.3. Suspension of Participation. Unless expressly prohibited by applicable Regulatory Requirements, Health Plan has the right to immediately suspend or terminate the participation of a Contracted Provider in any or all Products by giving written notice thereof to Provider when Health Plan determines that (i) based upon available information, the continued participation of the Contracted Provider appears to constitute an immediate threat or risk to the health, safety or welfare of Medicaid Managed Care Members, or (ii) the Contracted Provider's fraud, malfeasance or non-compliance with Regulatory Requirements is reasonably suspected. Provider shall immediately notify the affected Contracted Provider of such suspension. During such suspension, the Contracted Provider shall, as directed by Health Plan, discontinue the provision of all or a particular Covered Service to Medicaid Managed Care Members. During the term of any suspension, the Contracted Provider shall notify Medicaid Managed Care Members that his or her status as a Participating Provider has been suspended. Such suspension will continue until the Contracted Provider's participation is reinstated or terminated. + +8.2.4. Insolvency. This Agreement may be terminated immediately by a Party giving written notice thereof to the other Party if the other Party is insolvent or has bankruptcy proceedings initiated against it. + +8.2.5. Credentialing. The status of a Contracted Provider as a Participating Provider in one or more Products may be terminated immediately by Health Plan giving written notice thereof to Provider if the Contracted Provider fails to adhere to Company's or Payor's credentialing criteria, including, but not limited to, if the Contracted Provider (i) loses, relinquishes, or has materially affected its license to provide Covered Services in the State, (ii) fails to comply with the insurance requirements set forth in this Agreement; or (iii) is convicted of a criminal offense related to involvement in any state or federal health care program or has been terminated, suspended, barred, voluntarily withdrawn as part of a settlement agreement, or otherwise excluded from any state or federal health care program. Provider shall immediately notify the affected Contracted Provider of such termination. + +8.3. Effect of Termination. After the effective date of termination of this Agreement or a Contracted Provider's participation in a Product, this Agreement shall remain in effect for purposes of those obligations and rights arising prior to the effective date of termination. Upon such a termination, each affected Contracted Provider (including Provider, if applicable) shall (i) continue to provide Covered Services to Medicaid Managed Care Members in the applicable Product(s) during the longer of the ninety (90) day period following the date of such termination or such other period as may be required under any Regulatory Requirements, and, if requested by Company, each affected Contracted Provider (including Provider, if applicable) shall continue to provide, as a Participating Provider, Covered Services to Medicaid Managed Care Members until such Medicaid Managed Care Members are assigned or transferred to another Participating Provider in the applicable Product(s), and (ii) continue to comply with and abide by all of the applicable terms and conditions of this Agreement, including, but not limited to, Section 4.4 (Hold Harmless) hereof, in connection with the provision of such Covered Services during such continuation period. During such continuation period, each affected Contracted Provider (including Provider, if applicable) will be compensated in accordance with this Agreement and shall accept such compensation as payment in full. + +8.4. Survival of Obligations. All provisions hereof that by their nature are to be performed or complied with following the expiration or termination of this Agreement, including without limitation Sections 3.8, 3.10, 4.2, 4.4, 4.5, 5.2, 6.1, 6.2, 6.3, 7.2, 8.3, and 8.4 and Article IX, survive the expiration or termination of this Agreement.",Y,,180,90,"This Agreement is effective as of the Health Plan Effective Date, and will remain in effect for an initial term (""Initial Term"") of three (3) year(s), after which it will automatically renew for successive terms of one (1) year each (cach a ""Renewal Term""), unless this Agreement is sooner terminated as provided in this Agreement or either Party gives the other Party written notice of non-renewal of this Agreement not less than one hundred eighty (180) days prior to the end of the then-current term.",180,Y,30,Y,9/7/2018,12-3456789,"Sample Name 1, PhD","Sample Name 1, PhD",1234567890,"Sample Name 1, PhD",,,,,"456 Oak Avenue, Greenville, North Charleston, SC 29406",,N,50-16,33,N,,123456,N,N,,N,,"Unless Provider notifies Health Plan in writing of its objection to such amendment during the thirty (30) day period following the giving of such notice by Health Plan, Provider shall be deemed to have accepted the amendment. If Provider objects to any proposed amendment to either the base agreement or any Attachment, Health Plan may exclude one or more of the Contracted Providers from being Participating Providers in the applicable Product (or any component program of, or Coverage Agreement in connection with, such Product).","Provider and each Contracted Provider and Company agrcc to carry out their respective obligations under this Agreement and the Provider Manual, other than the provision of services under the Medicaid Managed Care Program which are addressed in Article I, Section E.1, in accordance with all applicable Regulatory Requirements, including, but not limited to, the requirements of the Health Insurance Portability and Accountability Act, as amended, and any regulations promulgated thereunder. If, due to Provider's or Contracted Provider's noncompliance with applicable Regulatory Requirements or this Agreement, sanctions or penalties are imposed on Company, Company may, in its sole discretion, offset such amounts against any amounts due Provider or Contracted Providers from any Company or require Provider or the Contracted Provider to reimburse Company for such amounts.","4.5. +Recovery Rights. Payor or its delegate shall have the right to immediately offset or recoup any and +all amounts owed by Provider or a Contracted Provider to Payor or Company against amounts owed by the Payor or +Company to the Provider or Contracted Provider. Provider and Contracted Providers agree that all recoupment and +any offset rights under this Agreement will constitute rights of recoupment authorized under State or federal law +and that such rights will not be subject to any requirement of prior or other approval from any court or other +government authority that may now have or hereafter have jurisdiction over Provider or a Contracted Provider.","ARTICLE VII - DISPUTE RESOLUTION + +7.1. Informal Dispute Resolution. Any dispute between Provider and/or a Contracted Provider, as applicable (the ""Provider Party""), and Health Plan and/or Company, as applicable (including any Company acting as Payor) (the ""Administrator Party""), with respect to or involving the performance under, termination of, or interpretation of this Agreement, or any other claim or cause of action hereunder, whether sounding in tort, contract or under statute (a ""Dispute"") shall first be addressed by exhausting the applicable procedures in the Provider Manual pertaining to claims payment, credentialing, utilization management, or other programs. If, at the conclusion of these applicable procedures, the matter is not resolved to satisfaction of the Provider Party and the Administrator Party, or if there are no applicable procedures in the Provider Manual, then the Provider Party and the Administrator Party shall engage in a period of good faith negotiations between their designated representatives who have authority to settle the Dispute, which negotiations may be initiated by either the Provider Party or the Administrator Party upon written request to the other, provided such request takes place within one year of the date on which the requesting party first had, or reasonably should have had, knowledge of the event(s) giving rise to the Dispute. If the matter has not been resolved within sixty (60) days of such request, either the Provider Party or the Administrator Party may, as its sole and exclusive forum for the litigation of the Dispute or any part thereof, initiate arbitration pursuant to Section 7.2 below by providing written notice to the other party. + +7.2. Arbitration. If either the Provider Party or the Administrator Party wishes to pursue the Dispute as provided in Section 7.1, such party shall submit it to binding arbitration conducted in accordance with the Commercial Arbitration Rules of the American Arbitration Association (""AAA""). In no event may any arbitration be initiated more than one (1) year following, as applicable, the end of the sixty (60) day negotiation period set forth in Section 7.1, or the date of notice of termination. Arbitration proceedings shall be conducted by an arbitrator chosen from the National Healthcare Panel at a mutually agreed upon location within the State. The arbitrator shall not award any punitive or exemplary damages of any kind, shall not vary or ignore the provisions of this Agreement, and shall be bound by controlling law. The Parties and the Contracted Providers, on behalf of themselves and those that they may now or hereafter represent, agree to and do hereby waive any right to pursue, on a class basis, any Dispute. Each of the Provider Party and the Administrator Party shall bear its own costs and attorneys' fees related to the arbitration except that the AAA's Administrative Fees, all Arbitrator Compensation and travel and other expenses, and all costs of any proof produced at the direct request of the arbitrator shall be borne equally by the applicable parties, and the arbitrator shall not have the authority to order otherwise. The existence of a Dispute or arbitration proceeding shall not in and of itself constitute cause for termination of this Agreement. Except as hereafter provided, during an arbitration proceeding, each of the Provider Party and the Administrator Party shall continue to perform its obligations under this Agreement pending the decision of the arbitrator. Nothing herein shall bar either the Provider Party or the Administrator Party from seeking emergency injunctive relief to preclude any actual or perceived breach of this Agreement, although such party shall be obligated to file and pursue arbitration at the earliest reasonable opportunity. Judgment on the award rendered may be entered in any court having jurisdiction thereof. Nothing contained in this Article VII shall limit a Party's right to terminate this Agreement with or without cause in accordance with Section 8.2.",N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Medicaid Managed Care Members under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.","A Contracted Provider may only identify itself as a Participating Provider for those Products in which the Contracted Provider actually participates as provided in this Agreement. Provider acknowledges that Company or Payor may have, develop or contract to develop various Products or provider networks that have a variety of provider panels, program components and other requirements. No Company or Payor warrants or guarantees that any Contracted Provider: (i) will participate in all or a minimum number of provider panels, (ii) will be utilized by a minimum number of Medicaid Managed Care Members, or (iii) will indefinitely remain a Participating Provider or member of the provider panel for a particular network or Product.","""Clean Claim"" means a claim that can be processed without obtaining additional information from the Provider of the service or from a third party.",N,,"6.2. Indemnification by Provider and Contracted Provider. Provider and each Contracted Provider shall indemnify and hold harmless (and at Health Plan's request defend) Company and Payor and all of their respective officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees) judgments or obligations arising from or relating to any negligence, wrongful act or omission, or breach of this Agreement by Provider, a Contracted Provider, or any of their respective officers, directors, agents or employees. + +6.3. Indemnification by Health Plan. Health Plan agrees to indemnify and hold harmless (and at Provider's request defend) Provider, Contracted Providers, and their officers, directors, agents and employees from and against any and all third party claims for any loss, damages, liability, costs, or expenses (including reasonable attorney's fees), judgments, or obligations arising from or relating to any negligence, wrongful act or omission or breach of this Agreement by Company or its directors, officers, agents or employees.","Provider and each Contracted Provider shall provide access to their respective books and records to each of the following, including any delegate or duly authorized agent thereof, subject to applicable Regulatory Requirements: (i) Company and Payor, during regular business hours and upon prior notice; (ii) appropriate State and federal authorities, to the extent such access is necessary to comply with Regulatory Requirements; and (iii) accreditation organizations. Provider and each Contracted Provider shall provide copies of such records at no expense to any of the foregoing that may make such request. Each Contracted Provider also shall obtain any authorization or consent that may be required from a Medicaid Managed Care Member in order to release medical records and information to Company or Payor or any of their delegates.",N,,N,,N,,"Provider or Contracted Provider shall timely verify whether an individual seeking Covered Services is a Medicaid Managed Care Member. Company or Payor, as applicable, will make available to Provider and Contracted Providers a method, whereby Provider and Contracted Providers can obtain, in a timely manner, general information about eligibility and coverage. Company or Payor, as applicable, does not guarantee that persons identified as Medicaid Managed Care Members are eligible for benefits or that all services or supplies are Covered Services. If Company, Payor or its delegate determines that an individual was not a Medicaid Managed Care Member at the time services were rendered, such services shall not be eligible for payment under this Agreement. In addition, Company will use reasonable efforts to include or contractually require Payors to clearly display Company's name, logo or mailing address (or other identifier(s) designated from time to time by Company) on each membership card.","Provider and Contracted Providers shall comply with referral and preauthorization procedures adopted by Company and or Payor, as applicable, prior to referring a Medicaid Managed Care Member to any individual, institutional or ancillary health care provider. Unless otherwise expressly authorized in writing by Company or Payor, Provider and Contracted Providers shall refer Medicaid Managed Care Members only to Participating Providers to provide the Covered Service for which the Medicaid Managed Care Member is referred. Except as required by applicable law, failure of Provider and Contracted Providers to follow such procedures may result in denial of payment for unauthorized treatment.","Provider and Contracted Providers shall at all times cooperate and comply with the requirements, policies, programs and procedures (""Policies"") of Company and Payor, which may be described in the Provider Manual and include, but are not limited to, the following: credentialing criteria and requirements; notification requirements; medical management programs; claims and billing, quality assessment and improvement, utilization review and management, disease management, case management, on-site reviews, referral and prior authorization, and grievance and appeal procedures; coordination of benefits and third party liability policies; carve-out and third party vendor programs; and data reporting requirements.","During the term of this Agreement and for any applicable continuation period as set forth in Section 8.3 of this Agreement, Provider and each Contracted Provider shall maintain policies of general and professional liability insurance and other insurance necessary to insure Provider and such Contracted Provider, respectively; their respective employees; and any other person providing services hereunder on behalf of Provider or such Contracted Provider, as applicable, against any claim(s) of personal injuries or death alleged to have been caused or caused by their performance under this Agreement. Such insurance shall include, but not be limited to, any ""tail"" or prior acts coverage necessary to avoid any gap in coverage. Insurance shall be through a licensed carrier acceptable to Health Plan, and in a minimum amount of one million dollars ($1,000,000) per occurrence, and three million dollars ($3,000,000) in the aggregate unless a lesser amount is accepted by Health Plan or where State law mandates otherwise. Provider and each Contracted Provider will provide Health Plan with at least fifteen (15) days prior written notice of cancellation, non-renewal, lapse, or adverse material modification of such coverage. Upon Health Plan's request, Provider and each Contracted Provider will furnish Health Plan with evidence of such insurance.","Provider acknowledges that Company may, during the term of this Agreement, carve-out certain Covered Services from its general provider contracts, including this Agreement, for one or more Products as Company deems necessary or appropriate. Provider and Contracted Providers shall cooperate with and, when medically appropriate, utilize all third party vendors designated by Company for those Covered Services identified by Company from time to time for a particular Product.",Y,"If there is any conflict between this Agreement and the Provider Manual, this Agreement will control. In the event of any conflict between this Agreement and any Product Attachment, the Product Attachment will control as to such Product.",Y,"9.1. Relationship of Parties. The relationship between or among Health Plan, Company, Provider, and any Contracted Provider hereunder is that of independent contractors. None of the provisions of this Agreement will be construed as creating any agency, partnership, joint venture, employee-employer, or other relationship. References herein to the rights and obligations of any Company under this Agreement are references to the rights and obligations of each Company individually and not collectively. A Company is only responsible for performing its respective obligations hereunder with respect to a particular Product, Coverage Agreement, Payor Contract, Covered Service or Medicaid Managed Care Member. A breach or default by an individual Company shall not constitute a breach or default by any other Company, including but not limited to Health Plan.",N,,,Y,"Provider, each Contracted Provider and the officers of Company shall not disparage the other during the term of this Agreement or in connection with any expiration, termination or non-renewal of this Agreement. Neither Provider nor Contracted Provider shall interfere with Company's direct or indirect contractual relationships including, but not limited to, those with Medicaid Managed Care Members or other Participating Providers. Nothing in this Agreement should be construed as limiting the ability of either Health Plan, Company, Provider or a Contracted Provider to inform Medicaid Managed Care Members that this Agreement has been terminated or otherwise expired or, with respect to Provider, to promote Provider to the general public or to post information regarding other health plans consistent with Provider's usual procedures, provided that no such promotion or advertisement is specifically directed at one or more Medicaid Managed Care Members. In addition, nothing in this provision should be construed as limiting Company's ability to use and disclose information and data obtained from or about Provider or Contracted Provider, including this Agreement, to the extent determined reasonably necessary or appropriate by Company in connection with its efforts to comply with Regulatory Requirements and to communicate with regulatory authorities.",N,,N,,,,N,,Y,N, +Filename: cnc_arch.txt,INDIVIDUAL PRODUCT ATTACHMENT,Berkley Community Health Care,Ohio,Y,N,"2.4 Term. The term of the Participating Providers' participation in the Individual Product will commence as of the Effective Date and, thereafter, will be coterminous with the term of the Agreement unless terminated pursuant to the Agreement or this Product Attachment. The participation of any Participating Provider as a 'Participating Provider' in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",Y,,90,,"The participation of any Participating Provider as a ""Participating Provider"" in an Individual Product may be terminated by either party giving the other party at least ninety (90) days' prior written notice of such termination; in such event, Provider shall immediately notify the affected Participating Provider of such termination.",90,N,,Y,,,,,,,,,,Berkley Community Health Care,,,N,,12,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and +standards and requirements of any accrediting or certifying organization, including, but +not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement.","Unless otherwise specified in this Product Attachment and as limited by Section 2.2(b) below, all Participating Providers under the Agreement will participate in the Individual Product as ""Participating Providers,"" and will provide to Covered Persons enrolled in or covered by a Individual Product, upon the same terms and conditions contained in the Agreement, as supplemented or modified by this Product Attachment, those Covered Services that are provided by Participating Providers pursuant to the Agreement. In providing such services, Provider shall, and shall cause Participating Providers, to comply with and abide by the provisions of the Agreement, including this Product Attachment and the Provider Manual.",,N,,,"Each Participating Provider shall keep confidential and make available those health records maintained by the Participating Provider to monitor and evaluate the quality of care, to conduct evaluations and audits, and to determine on a concurrent or retrospective basis the necessity of and appropriateness of health care services provided to Covered Persons. Each Participating Provider shall make these health records available to appropriate State and federal authorities involved in assessing the quality of care or in investigating the grievances or complaints of Covered Persons. Each Participating Provider shall comply with applicable State and federal laws related to the confidentiality of medical or health records.",N,,N,,N,,,,,"Each Participating Provider shall maintain adequate professional liability and malpractice insurance, and shall notify HMO not more than ten (10) days after the Participating Provider's receipt of notice of any reduction or cancellation of such coverage.",,N,,N,,N,,,N,,N,,N,,,,N,,N,N, +Filename: hn_0109.txt,CALIFORNIA PROVIDER PARTICIPATION AGREEMENT,All Health,California,N,N,,N,,,,,,N,,N,4/15/2011,01-2345678,"Dummy Group Name, Inc.","Dummy Group Name, Inc.",,,,,,,,,N,109,4,N,,,N,N,,N,,,,,"THIS CONTRACT CONTAINS A BINDING ARBITRATION CLAUSE, WHICH MAY BE ENFORCED BY THE PARTIES.",N,,,,,N,,,,N,,N,,N,,,,,,,N,,Y,"Status as Independent Entities. None of the provisions of this Agreement is intended to create, nor shall be deemed or construed to create any relationship between Provider and All Health or a Payor other than that of independent entities contracting with each other solely for the purpose of effecting the provisions of this Agreement. Neither Provider nor All Health /Payor, nor any of their respective agents, employees or representatives shall be construed to be the agent, employee or representative of the other.",N,,,N,,N,,N,,,,N,,N,N, +Filename: hn_23-70.txt,AMENDMENT TO THE PROVIDER SERVICES AGREEMENT,"All Health, Inc. Affiliates",California,N,N,,N,,,,,,N,,N,1/1/2005,12-3456789,UCDD Medical Group,"The Regents of the School of California UCDD Healthcare Network, UCDD Medical Group",,,,,,,,,N,23-70,6,N,,,N,N,,N,,,,"(d) +Offsetting AHI shall have the right to offset any amounts owed to AHI by PPG, +including but not limited to, amounts owed by PPG under loans guaranteed by AHI, errors, or AHI +interim payment for Contracted Services, including Capitation payments. Notwithstanding any +other provision of this Agreement or any other contract to the contrary, only deficits in the shared +risk programs which provide financial incentives for the control or management of Shared Risk +Services' expenses or utilization will neither be collected from PPG by AHI nor offset against +PPG Capitation; provided however, that AHI shall not be restricted from (i) offsetting such +deficits against payments to PPG including, but not limited to, surpluses from other shared risk +programs, stop loss payments, bonus or other incentive program payments; (ii) establishing +reasonable withholds from Capitation approved by DMHC as set forth in the applicable +Addendum to offset PPG liability when the cost of Shared Risk Services exceed the Shared Risk +Budget (Withhold Fund); or (iii) carrying forward such shared risk program deficits to be applied +against future year's program surpluses and Withhold Fund. Each PPG numbered site. shall be +calculated as a separate entity and any payments to or from PPG with multiple sites shall be net +amount due/owed from all sites. In no event shall PPG be required to make any cash payment to +AHI for any deficit in a shared risk program for institutional services. + +To the extent AHI identifies financial liabilities, including overpayments, owed to AHI by PPG +under this Agreement, the intent to collect such financial liabilities shall be communicated to PPG. +Proof of such liabilities and the methodology used to make such determination shall be subject to +UCDD 2005 Amd.d +Effective January 1, 2005 + + +external actuarial review, with PPG bearing the cost of such review. No collection of such +liabilities shall occur until PPG has a reasonable opportunity to conduct such review, provided that +such review occurs within ten (10) business days of communication to PPG by AHI + +Concurrently, to the extent that PPG identifies financial liabilities owed to PPG by AH| +under +this +Agreement, the intent to collect such financial liabilities shall be communicated to AHI. Proof of +such liability, and the methodology used to make such determination shall be subject to external +actuarial review, with AHI bearing the cost of such review. No collection of such liability shall +occur until AHI has a reasonable opportunity to conduct such review, provided that such review +occurs within ten (10) days of communication to AHI by PP.G.",,Y,"In consideration for all of the payment terms set forth herein, including but not limited to the increase in the +Commercial rates, PPG understands and agrees that HNI shall be the exclusive Medicare Advantage payor +contracted with Provider, for any and all Medicare Advantage products including, but not limited to, HMO products, +PPO products or demonstration projects, from January 1, 2005 through December 31, 2006.",,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,$75.15 ,N,,N,N, +Filename: hn_24-83.txt,,All Health Inc.,California,Y,N,,N,,,,,,N,,N,11/19/2004,,,Smith,,,,,,,"456 Oak Avenue, Greenville County, CA, 92222",,N,24-83,3,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,N,,N,N, +Filename: molina_2016.txt,HOSPITAL SERVICES AGREEMENT,"Sample Company Name, Inc.",Texas,Y,Y,"ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider.",N,12/31/2018,90,30,This Agreement may be terminated without cause at any time by either Party by giving at least ninety (90) days prior written notice to the other Party.,90,Y,,Y,12/1/2016,,"XYZ Company, Inc.",Facilities on Attachment E,,,,,,"XYZ Company, Inc.","North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039","These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq.",Y,2016,27,N,,,N,N,,Y,"Health Plan shall make determinations of claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable.",,"This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, ""mandatory"" means that the state or federal law provision cannot be +waived or altered by contract.","4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid.","6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via ""Meet and Confer"". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services (""JAMS""), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution (""ADR"") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings (""Selected Arbitrator""). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act (""FAA""), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction.",Y,"6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider.",,,"Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring special treatment that prevents timely adjudication of the Claim.",N,,"6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement.","Provider will promptly deliver to Health Plan, upon request or as may be required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or third party payers, any information, statistical data, or Record pertaining to Members served by Provider. Provider is responsible for the fees associated with producing such records. Provider will further give direct access to said patient care information as requested by Health Plan or as required by any state or federal authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will survive any termination.",N,,N,,N,,"Health Plan will maintain data on Member eligibility and enrollment. Health Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for purposes of allowing participating providers to confirm Member eligibility.","For Covered Services that require prior authorizations, Provider shall make commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered Service. Provider will not have to obtain prior authorizations before providing Emergency Services.","Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual and this Agreement, this Agreement shall control.","Provider will maintain premises and professional liability insurance in coverage amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. If the coverage is claims made or reporting, Provider agrees to purchase similar ""tail"" coverage upon termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of such insurance coverage.",,Y,"Nothing in this Agreement modifies any benefits, terms, or conditions contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern.",Y,"Nothing contained in this Agreement is intended to create, nor will it be construed to create, any relationship between the Parties other than that of independent parties contracting with each other solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and independent management and will be responsible for its own operations. Nothing contained in this Agreement is intended to create, nor will be construed to create, any right in any third party to enforce this Agreement.",N,,,N,,Y,"Provider acknowledges Health Plan's right to review Provider's claims prior to payment for appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and determinations of designated implantable devices and/or implantable orthopedic devices.",N,,,,N,,N,N, +Filename: sga_01.txt,MASTER SERVICES AGREEMENT,XYZ CORPORATION,Multiple,N,N,"8.1 Term. This Agreement shall commence on the Effective Date and continue until the later of (i) the third (3rd) anniversary of the Effective Date, or (ii) the completion of all outstanding SOWs (the ""Initial Term""). Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term. The word ""Term"" shall mean any and all extensions and renewals of this Agreement. + +8.2 +(a) Termination by XYZ Unless specified otherwise in the MSA Override section of an SOW, XYZ may terminate this Agreement and any SOW(s) for convenience without cost or penalty at any time upon one hundred and twenty (120) days advance written notice to Vendor, XYZ may also terminate an SOW as expressly permitted in such SOW. XYZ may also terminate this Agreement or any SOW if (i) Vendor fails to cure a material breach of this Agreement or such SOW within 30 days after receipt of written notice of such breach. + +(b) Termination by Vendor. If XYZ fails to pay when due an undisputed invoice, and fails to make such payment within thirty (30) days after the date it receives written notice of non-payment or if XYZ fails to cure a material breach of Section 7.3 (Confidentiality Obligations) within thirty (30) days after receipt of written notice of such breach, then Vendor may terminate this Agreement by sending written notice to XYZ, in which event the Agreement shall terminate as of the date specified in the notice of termination. Vendor shall not terminate this Agreement under any other condition, nor shall Vendor suspend or delay the performance of Services (including the delivery of a Deliverable under any circumstance, except as requested by XYZ. + +8.3 Effect of Termination. Upon the termination or expiration of this Agreement or any SOW, Vendor shall: (a) deliver to XYZ all Deliverables in whatever form or media they may then exist; (b) document the status of the Services that have been terminated and deliver such documentation to XYZ; (c) deliver to XYZ all fees paid by XYZ for Services and Deliverables that remain unperformed or undelivered as of the date of termination as well as all XYZ property and materials that are in the possession of Vendor, its employees, subcontractors and agents; and (d) provide any transition assistance requested by XYZ in accordance with Section 1. 2 (Transition Assistance), provided, in the event of Vendor's termination of the Agreement or an SOW pursuant to Section 8.2(b), Vendor's obligation to provide transition assistance shall be conditional on XYZ pre-paying Charges for such transition assistance on a monthly basis. The termination or expiration of this Agreement or any SOW for any reason shall not affect XYZ's or Vendor's rights or obligations for any Services or Deliverables completed and delivered to XYZ through the date of termination, and XYZ shall promptly pay all amounts (not otherwise disputed in good faith) owed to Vendor for such Services and Deliverables (including work in progress) provided through the effective date of termination. + +8.4 Remedies. Notwithstanding anything in this Agreement to the contrary, where a breach of certain provisions of this Agreement may cause either party irreparable injury or may be inadequately compensable in monetary damages, either party may obtain equitable relief in addition to any other remedies which may be available. The rights and remedies of the parties in this Agreement are not exclusive and are in addition to any other rights and remedies available at law or in equity.",Y,,120,30,"Thereafter, this Agreement will automatically renew for one (1) year periods (each, a ""Renewal Term"" unless either party gives written notice of its intent not to renew to the other party at least 120 days prior to the expiration of the then-existing term.",120,Y,,Y,6/13/2019,,"Sample Company Name, Inc.","Sample Company Name, Inc.",,,,,,"Sample Company Name, Inc.","123 Maple Street, Springfield, Maryland 20850",,N,1,16,N,,,N,N,,N,,,,,,Y,"1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +are the same or similar to the Services without notice to +Vendor and without incurring any liability by virtue +thereof,",,,,N,,"9.1 Infringement Indemnity. + +(a) Vendor agrees to defend, indemnify and hold harmless XYZ, its affiliates and subsidiaries, and their officers, directors and employees (collectively, ""XYZ Indemnitees"") from and against all damages, reasonable expenses, and liabilities, including, without limitation, reasonable attorneys' fees, arising out of any claim by a third party not a wholly-owned affiliate of XYZ that the Deliverables or Services or any portion thereof, infringe or misappropriate any third party trade secret, patent, copyright, trademark or other proprietary or personal right of any person or entity. XYZ agrees to notify Vendor promptly in writing of any such claim and to cooperate with Vendor, at Vendor's expense, by providing such assistance as is reasonably necessary for the defense of a claim against the XYZ Indemnitees. Vendor's obligation to defend, indemnify and hold the XYZ Indemnitees harmless may be mitigated to the extent Vendor has been prejudiced by a failure of XYZ to provide prompt notice and reasonable cooperation in the defense and settlement of such claims. Vendor's settlement of any claim that requires anything more than a monetary payment shall require XYZ's prior written approval, which shall not be unreasonably withheld, Further, if under this Agreement, Vendor owes or has paid to XYZ damages in an amount greater than seventy percent (70%) of the maximum liability allowed pursuant to Section 11.18, Limitation of Liability, (the ""Liability Cap"") and Vendor does not agree to refresh the Liability Cap to its original amount (i.e., meaning that none of such damages incurred prior to the date of Centene's request for Vendor to refresh the Liability Cap shall, after such refresh, be considered to apply against the refreshed Liability Cap) within thirty (30) days after a XYZ written request to Vendor to refresh the Liability Cap, then XYZ may terminate this Agreement (in whole or in part) or any related SOW(s) (in whole or in part) upon not less than thirty (30) days' prior written notice to Vendor. + +(b) If the use of any Deliverable or the Services is enjoined or threatened to be enjoined due to an alleged infringement or misappropriation, Vendor shall, at its discretion and expense, (i) procure the right for XYZ to continue using such Deliverable or Services, (ii) modify or replace the affected items with functionally equivalent or better items, or (iii) refund the amount paid by XYZ in connection with the affected Deliverables or Services. This Infringement Indemnity section states Vendor's entire obligation, and XYZ's sole remedy, for a third party's claim of infringement or misappropriation. + +(c) Vendor shall have no obligations under this Section 9.1 or other liability for any infringement or misappropriation to the extent such infringement or misappropriation results from: (i) modifications made other than by Vendor, its affiliates and their respective subcontractors, (ii) use of the Deliverables in combination with any equipment, software or material expressly prohibited in the applicable SOW, (iii) XYZ's use or incorporation of materials not provided by Vendor, (iv) the instructions, designs or specifications provided by XYZ; (v) any software or other materials furnished to Vendor by XYZ, its affiliates and their respective subcontractors; or (vi) XYZ's continuing the allegedly infringing activity after Vendor has fulfilled its obligations under Section 1(b). + +9.2 General Indemnity. Each party, as an indemnifying party, agrees to defend, indemnify and hold harmless the other party and its affiliates, and their respective directors, officers and employees from and against any unaffiliated third party claim arising out of the negligence, intentional misconduct or violation of any Law by the indemnifying party, its employees, subcontractors and agents.",,N,,N,,N,,,,,"Vendor shall maintain insurance coverage and satisfy the requirements in the Insurance Addendum, attached hereto. If Vendor ceases operations or for any other reason terminates such insurance coverage, Vendor shall obtain coverage for an extended claims reporting period for no less than two (2) years after the expiration or termination of this Agreement.",,N,,N,,N,,,N,,N,,N,,,,N,,N,N, +Filename: tx_01-66.txt,MANAGED BEHAVIORAL HEALTH PRACTITIONER FEE FOR SERVICE AGREEMENT,Best Healthcare Provider Services,Texas,N,N,,N,,,,,,N,,N,10/1/2005,,,Jake Ball,,,,,,,,,N,Jan-66,2,N,,,N,N,,N,,,,,,N,,,,"Clean Claim means an electronic submission that is compliant with the federal standard transactions provisions of the Health Insurance Portability and Accountability Act of 1996 (""HIPAA""), Pub. L. 104-191, or a CMS 1500 claim form, or its successor, submitted by Practitioner for Covered Behavioral Health Services provided to a Covered Person which accurately reflects such information as is required by this Agreement and the Provider Manual, and which has no defect or impropriety (including any lack of any required substantiating documentation) or particular circumstance requiring special treatment that prevents timely payment from being made on the claim.",N,,,,N,,N,,N,,,"Preauthorization means verbal or written approval by ABCD, Plan, or other authorized person or entity, including a corresponding approval number obtained prior to admitting a Covered Person to a behavioral health care facility or to providing certain other Covered Behavioral Health Services to a Covered Person, when approval is required under the utilization management program of the applicable Plan.",,,,N,,N,,N,,,N,,N,,N,,,,N,,N,N, +Filename: tx_06-03.txt,JOINDER AGREEMENT,"Second Provider, Inc.",Texas,N,N,,N,,,,,,N,,N,9/1/2017,12-3456789,Best Healthcare Provider Services,Tess Goveler,,,,,,,,,N,3-Jun,2,N,,,N,N,,N,,,,,,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,N,,N,N, +Filename: tx_74-28.txt,COLLABORATIVE CLINICAL ENGAGEMENT INCENTIVE PROGRAM EXHIBIT,XYZ HEALTH PLAN Inc.,Texas,N,N,"5. Term and Termination. The term of this Exhibit is 12 months beginning the first day of the month after the Provider agrees through the execution of this exhibit to participate in the Collaborative Clinical Engagement Program. Either party may terminate participation of Provider and the Practitioners in the Collaborative Clinical Engagement Program for any reason prior to the expiration or termination of the Agreement upon ninety (90) days prior written notice to the other party. In the event of such termination, or any termination of the Agreement, Provider shall not be eligible for payment of any unpaid Collaborative Clinical Engagement Bonus corresponding to the Contract Year in which such termination is effective, and this Exhibit and the Collaborative Clinical Engagement Program will be of no further force and effect.",N,8/31/2021,90,,Either party may terminate participation of Provider and the Practitioners in the Collaborative Clinical Engagement Program for any reason prior to the expiration or termination of the Agreement upon ninety (90) days prior written notice to the other party.,90,N,,N,9/1/2020,12-3456789,DUMMY PHYSICIANS ALLIANCE,DUMMY PHYSICIANS ALLIANCE,,,,,,DUMMY PHYSICIANS ALLIANCE,,,N,74-28,6,N,,,N,N,,N,,,"Regulatory Requirements. Provider agrees that, in connection with any Medicare and Medicaid products, Provider shall and shall prohibit the Practitioners and other persons under contract with Provider from claiming payment in any form directly or indirectly from a federal health care program (as that term is defined in Section 1128B(f) of the Social Security Act, 42 U.S.C. 1320a-7b(f)) for items or services covered under this Agreement. Provider and each Practitioner acknowledge and agree (i) that it, he or she has not given or received remuneration in return for or to induce the provision or acceptance of business (other than business covered by this Agreement) for which payment may be made in whole or in part by a federal health care program on a fee-for-service or cost basis; and (ii) that it, he or she will not shift the financial burden of this Agreement to the extent that increased payments are claimed from a federal health care program.","d. Repayment. No later than 120 days after the end of each Contract Year, Plan shall calculate the +compliance rate for the provider selected Engagement Activity and Quality Measure. Please see +additional calculation information in Schedule A. attached hereto and incorporated herein. If the +provider selected target compliance percentage for Engagement Activity is less than or equal to 75% of +the required goal for the Contract Year, Provider shall repay Plan fifty percent (50%) of the Collaborative +Clinical Engagement Bonus paid for the applicable Contract Year. Such repayment shall be in the form +of, at Plan's option, a recoupment from any incentive payment or combination thereof, or an offset of +future bonus payments payable in connection with any subsequent Contract Year. Plan shall be solely +responsible for the methodology used, and the final calculation indicated above.",,N,,,,,N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,$2.00 ,N,,N,N, +Filename: tx_76-06.txt,PARTICIPATING PROVIDER AGREEMENT,"SUFFOLK HealthPlan, Inc.",Texas,Y,N,,N,,,,,,N,,N,,,BEST HEALTHCARE PROVIDER,BEST HEALTHCARE PROVIDER,,,,,,BEST HEALTHCARE PROVIDER,,,N,76-06,2,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable federal and state statutes, regulations, regulatory guidance, judicial or administrative rulings, requirements of Governmental Contracts and standards and requirements of any accrediting or certifying organization, including, but not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.",,"""Clean Claim"" has, as to each particular Product, the meaning set forth in the applicable Product Attachment or, if no such definition exists, the Provider Manual.",N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,N,,Y,N, +Filename: tx_84-24.txt,PARTICIPATING PROVIDER AGREEMENT,"WellBeing HealthPlan, Inc.",Texas,Y,N,,N,,,,,,N,,N,,,Trinity HealtCare LLC,Trinity HealtCare LLC,,,,,,Trinity HealtCare LLC,,,N,84-24,2,N,,,N,N,,N,,,"""Regulatory Requirements"" means all applicable federal and state statutes, regulations, regulatory guidance, judicial or administrative rulings, requirements of Governmental Contracts and standards and requirements of any accrediting or certifying organization, including, but not limited to, the requirements set forth in a Product Attachment.",,,N,,"""Payor"" means the entity (including Company where applicable) that bears direct financial responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services rendered to Covered Persons under a Coverage Agreement and, if such entity is not Company, such entity contracts, directly or indirectly, with Company for the provision of certain administrative or other services with respect to such Coverage Agreement.",,"""Clean Claim"" has, as to each particular Product, the meaning set forth in the applicable Product Attachment or, if no such definition exists, the Provider Manual.",N,,,,N,,N,,N,,,,,,,N,,N,,N,,,N,,N,,N,,,,N,,Y,N, diff --git a/assets/sampleOne/investment_pdf_sample-B.csv b/assets/sampleOne/investment_pdf_sample-B.csv new file mode 100644 index 00000000..8a7ccf87 --- /dev/null +++ b/assets/sampleOne/investment_pdf_sample-B.csv @@ -0,0 +1,332 @@ +,Contract Name,Parent Agreement Code,Pages,Page_Num,Attachment/Exhibit,Line of Business,Provider Type,Provider Type - Level 2,IP/OP,Service Type,Plan Type,"Lesser of Logic language, included (Y/N)",Lesser of Rate,Reimb. Methodology,Reimb. Methodology_Short,If rate is % of Payor or MCR [STANDARD],If rate is % of Payor or MCR [STANDARD]_Short,FLAT FEE,Default Term,Default Rate,Medical Necessity Language (Language),Medical Necessity Language (Y/N),"Inclusion of essential RBRVS ""Fee Source"" Language (Y/N)","CDM Neutralization Language, included (Y/N)",CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE,Add On Reimbursement (Language),Add On Reimbursement (Y/N),"IP - DSH/IME/UC, included (Y/N)",IP - Stoploss Catastrophic Threshold,Exclusions,Not to Exceed,Escalator or COLA (Y/N),"Escalator I, Eff. Date",Single Code Multiple Rates (Y/N),Single Code Multiple Rates (Language) +0,Filename: chc_1.txt,1,38,24,"EXHIBIT B-1 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,STAR,N,,All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +1,Filename: chc_1.txt,1,38,24,"EXHIBIT B-1 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,STAR+PLUS,N,,All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +2,Filename: chc_1.txt,1,38,24,"EXHIBIT B-1 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,CHIP Perinatal,N,,All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +3,Filename: chc_1.txt,1,38,25,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +4,Filename: chc_1.txt,1,38,25,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services,Medicaid,Y,100% of AC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: Applied Behavior Analysis (ABA) Services and Rates",,,,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +5,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Medicaid,N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +6,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Group adaptive behavior treatment by protocol, administered by technician under the direction of a physician or other QHP, face-to-face with 2 or more patients, each 15 minutes",Medicaid,N,,"Procedure Code : 97154 | Description : Group adaptive behavior treatment by protocol, administered by technician under the direction of a physician or other QHP, face-to-face with 2 or more patients, each 15 minutes | Rate Per Unit (15 minutes) : $ $11.00",Flat Fee,,,$11.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +7,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Adaptive behavior treatment, with protocol modification, administered by physician or other QHP, which includes simultaneous direction of technician, face-to-face with one patient, each 15 minutes",Medicaid,N,,"Procedure Code : 97155 | Description : Adaptive behavior treatment, with protocol modification, administered by physician or other QHP, which includes simultaneous direction of technician, face-to-face with one patient, each 15 minutes | Rate Per Unit (15 minutes) : $ 30.00",Flat Fee,,,$30.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +8,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Health Insurance Marketplace (HIM),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +9,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Limited Network Plan (Kelsey Marketplace),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +10,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Local Mental Health Authority (LMHA),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +11,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Chemical Dependency (CD) Treatment Facility,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +12,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Early Childhood Intervention (ECI) Provider,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +13,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Mental Health Targeted Case Management,Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +14,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Non- Local Mental Health Authority (LMHA),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +15,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Covered Services,Applied Behavior Analysis (ABA),Y,100% of BC,"Subject to allowed reductions that Community may apply as a result of Physician/Provider's non-compliance with any applicable credentialing, billing, Prior Authorization, Referral, or Utilization Management guidelines, or other Community Protocols referenced in this Agreement, Physician/Provider shall accept as payment in full for Covered Services and all other services rendered to Members under this Agreement, the lesser of Physician/Provider's Billed Charges or the agreed compensation set forth in this Exhibit, less any applicable Member Expense: All Covered Services except those listed below: one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule.",% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +16,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Family adaptive behavior treatment guidance administered by physician or other QHP (with or without the patient present). face-to-face with guardians(s)/caregiver(s), each 15 minutes",Applied Behavior Analysis (ABA),N,,"Procedure Code : 97156 | Description : Family adaptive behavior treatment guidance administered by physician or other QHP (with or without the patient present). face-to-face with guardians(s)/caregiver(s), each 15 minutes | Rate Per Unit (15 minutes) : $ 30.00",Flat Fee,,,$30.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +17,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Multiple-family group adaptive behavior treatment guidance administered by physician or other qualified healthcare professional (without the patient present) face-to-face with multiple sets of guardians(s)/ caregiver(s),Applied Behavior Analysis (ABA),N,,Procedure Code : 97157 | Description : Multiple-family group adaptive behavior treatment guidance administered by physician or other qualified healthcare professional (without the patient present) face-to-face with multiple sets of guardians(s)/ caregiver(s) | Rate Per Unit (15 minutes) : $ 22.00,Flat Fee,,,$22.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +18,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Group adaptive behavior treatment with protocol modifications, administered by a physician or other QHP, face to face with multiple patents', each 15 minutes",Medicaid,N,,"Procedure Code : 97158 | Description : Group adaptive behavior treatment with protocol modifications, administered by a physician or other QHP, face to face with multiple patents', each 15 minutes | Rate Per Unit (15 minutes) : $ 22.00",Flat Fee,,,$22.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +19,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,"Applied Behavior Analysis (ABA) Services and Rates - Adaptive behavior treatment with protocol modification, each 15 minutes of technician's time face-to-face with a patient requiring the following components: *administered by the physician or other qualified healthcare professional who is on site, * with the assistance of two or more technicians, *for a patient who exhibits destructive behavior, *completed in an environment that is customized to a patient's behavior",Medicaid,N,,"Procedure Code : 0373T | Description : Adaptive behavior treatment with protocol modification, each 15 minutes of technician's time face-to-face with a patient requiring the following components: *administered by the physician or other qualified healthcare professional who is on site, * with the assistance of two or more technicians, *for a patient who exhibits destructive behavior, *completed in an environment that is customized to a patient's behavior | Rate Per Unit (15 minutes) : $ 45.00",Flat Fee,,,$45.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +20,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Local Mental Health Authority (LMHA),N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +21,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Chemical Dependency (CD) Treatment Facility,N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +22,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Early Childhood Intervention (ECI) Provider,N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +23,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,All Covered Services except those listed below,Non- Local Mental Health Authority (LMHA),N,,one hundred fifteen percent (115%) of the then current Texas Medicaid Fee Schedule,% of MCD,115% of MCD,1.15,,"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +24,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Local Mental Health Authority (LMHA),N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +25,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Chemical Dependency (CD) Treatment Facility,N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +26,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Early Childhood Intervention (ECI) Provider,N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +27,Filename: chc_1.txt,1,38,26,"EXHIBIT B-2 +COMPENSATION",MEDICAID,Professional,Behavioral Health,,Applied Behavior Analysis (ABA) Services and Rates - Mental health service plan development by a non-physician,Non- Local Mental Health Authority (LMHA),N,,Procedure Code : H0032 | Description : Mental health service plan development by a non-physician | Rate Per Unit (15 minutes) : $ 25.00,Flat Fee,,,$25.00 Per Unit (15 minutes),"If Physician/Provider bills for a Covered Service for which no reimbursement is defined by any of the methods listed above, Community shall compensate Physician/Provider according to thirty percent (30%) of Physician/Provider's Billed Charges.",30% of Physician/Provider's BC,"Provider understands and agrees that any Medically Necessary Health and Behavioral Health Services contained in an IFSP must be provided to the Member in the amount, duration, scope and setting established in the IFSP.",,N,N,,,,N,,,,N,,N, +28,Filename: hn_23-70.txt,23-70,6,3,"AMENDMENT +to the +PROVIDER SERVICES AGREEMENT +between +ALL HEALTH, INC. AFFILIATES +and +THE REGENTS OF THE SCHOOL +OF CALIFORNIA UCDD HEALTHCARE NETWORK",MEDICARE,Professional,,,Medicare HMO,Medicare HMO,N,,"As compensation for rendering PPG Capitated Services as defined herein, HMO shall pay PPG Capitation at forty one and fifty eight hundreds percent (41.58%) of Monthly Revenue as set forth below for each Medicare HMO Member eligible to receive such services from PPG during any particular month.",% of Monthly Revenue,41.58% of Monthly Revenue,0.4158,,,,,,N,N,,,,N,,,,N,,N, +29,Filename: hn_23-70.txt,23-70,6,3,"AMENDMENT +to the +PROVIDER SERVICES AGREEMENT +between +ALL HEALTH, INC. AFFILIATES +and +THE REGENTS OF THE SCHOOL +OF CALIFORNIA UCDD HEALTHCARE NETWORK",MEDICARE,Professional,,,PPG Capitated Services,Medicare HMO,N,,"As compensation for rendering PPG Capitated Services as defined herein, HMO shall pay PPG Capitation at forty one and fifty eight hundreds percent (41.58%) of Monthly Revenue as set forth below for each Medicare HMO Member eligible to receive such services from PPG during any particular month.",% of Monthly Revenue,41.58% of Monthly Revenue,0.4158,,,,,,N,N,,,,N,,,,N,,N, +30,Filename: cnc_50-16.txt,50-16,33,31,"Attachment A: Medicaid +EXHIBIT 1 +COMPENSATION SCHEDULE +PRACTITIONER SERVICES +BEHAVIORAL HEALTH +Sample Name1, PhD",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for practitioner Covered Services rendered to a Medicaid Managed Care Member, shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for practitioner Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,"If there is no established payment amount on the Payor's Medicaid fee schedule for a Covered Service provided to a Medicaid Managed Care Member, Payor may establish a payment amount to apply in determining the Allowed Amount. Until such time as Payor establishes such a payment amount, the maximum compensation shall be twenty five percent (25%) of Allowable Charges.",25% of AC,"2.2.4 +No Subcontract shall not contain any provision that provides incentives, monetary or otherwise, for the withholding of Medically Necessary Services.",,N,N,,,,N,,,,N,,N, +31,Filename: cnc_50-16.txt,50-16,33,32,"Attachment A: Medicaid +EXHIBIT 1 +COMPENSATION SCHEDULE +PRACTITIONER SERVICES +BEHAVIORAL HEALTH +Sample Name1, PhD",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for practitioner Covered Services rendered to a Medicaid Managed Care Member, shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for practitioner Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,"If there is no established payment amount on the Payor's Medicaid fee schedule for a Covered Service provided to a Medicaid Managed Care Member, Payor may establish a payment amount to apply in determining the Allowed Amount. Until such time as Payor establishes such a payment amount, the maximum compensation shall be twenty five percent (25%) of Allowable Charges.",25% of AC,"2.2.4 +No Subcontract shall not contain any provision that provides incentives, monetary or otherwise, for the withholding of Medically Necessary Services.",,N,N,,,,N,,,,N,,N, +32,Filename: cnc_50-16.txt,50-16,33,33,"Attachment A: Medicaid +EXHIBIT 1 +COMPENSATION SCHEDULE +PRACTITIONER SERVICES +BEHAVIORAL HEALTH +Sample Name1, PhD",MEDICAID,Professional,Behavioral Health,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for practitioner Covered Services rendered to a Medicaid Managed Care Member, shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for practitioner Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,"If there is no established payment amount on the Payor's Medicaid fee schedule for a Covered Service provided to a Medicaid Managed Care Member, Payor may establish a payment amount to apply in determining the Allowed Amount. Until such time as Payor establishes such a payment amount, the maximum compensation shall be twenty five percent (25%) of Allowable Charges.",25% of AC,"2.2.4 +No Subcontract shall not contain any provision that provides incentives, monetary or otherwise, for the withholding of Medically Necessary Services.",,N,N,,,,N,,,,N,,N, +33,Filename: hn_0109.txt,109,4,2,"EXHIBIT A-1 +COMMERCIAL BENEFIT PROGRAMS +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",COMMERCIAL,Facility,,,Covered Services,Commercial,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health or Payor shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under commercial Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges.",% of BC,100% of BC,1.0,,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health or Payor shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary +Covered Services delivered under commercial Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",,N,N,,,,N,,,,N,,N, +34,Filename: hn_0109.txt,109,4,3,"EXHIBIT B-1 +MEDICARE ADVANTAGE PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICARE ADVANTAGE,Professional,,,Covered Services delivered or arranged by Provider,Medicare Advantage,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges. + +Category of Service : Covered Services delivered or arranged by Provider | Compensation : 100% of CMS Allowable",% of CMS Allowable,100% of CMS Allowable,1.0,,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",,N,N,,,,N,,,,N,,N, +35,Filename: hn_0109.txt,109,4,3,"EXHIBIT B-1 +MEDICARE ADVANTAGE PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICARE ADVANTAGE,Professional,,,General Health Panel - CPT 80050,Medicare Advantage,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges. + +Category of Service : General Health Panel - CPT 80050 | Compensation : $20.00",Flat Fee,,,$20.00,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",,N,N,,,,N,,,,N,,N, +36,Filename: hn_0109.txt,109,4,3,"EXHIBIT B-1 +MEDICARE ADVANTAGE PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICARE ADVANTAGE,Professional,,,General Health Panel - CPT 80055: Obstetric Panel,Medicare Advantage,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates listed below, or (ii) 100% of Provider's billed charges. + +Category of Service : General Health Panel - CPT 80055: Obstetric Panel | Compensation : $15.00",Flat Fee,,,$15.00,"By Report (BR) Procedures, Procedures not Listed and Procedures with Relativities not Established",75% of billed charges for Covered Services,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered under Medicare Advantage Benefit Programs pursuant to this Addendum, the lesser of: (i) the rates +listed below, or (ii) 100% of Provider's billed charges.",,N,N,,,,N,,,,N,,N, +37,Filename: hn_0109.txt,109,4,4,"EXHIBIT C-1 +MEDI-CAL BENEFIT PROGRAM +DIRECT NETWORK FEE-FOR-SERVICE +RATE EXHIBIT",MEDICAID,Professional,,,Covered Services,Medi-Cal,Y,100% of BC,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered Services delivered pursuant to this Addendum, the lesser of: 100% of the State of California Medi-Cal Fee Schedule rates in effect at the time of service, subject to any adjustments made by the State of California under the applicable Medi-Cal Fee-For-Service Program; (ii) Fee-for-service rates for the commercial Benefit Program set forth in Addendum A, Exhibit A-1; or (iii) Provider's billed charges.",% of MCD,100% of MCD,1.0,,,,"Subject to the terms of this Agreement, including without limitation the Payment Conditions set forth in Addendum E, +All Health shall pay and Provider shall accept as payment in full for non-capitated Medically Necessary Covered +Services delivered pursuant to this Addendum, the lesser of: 100% of the State of California Medi-Cal Fee Schedule +rates in effect at the time of service, subject to any adjustments made by the State of California under the applicable +Medi-Cal Fee-For-Service Program; (ii) Fee-for-service rates for the commercial Benefit Program set forth in +Addendum A, Exhibit A-1; or (iii) Provider's billed charges.",,N,N,,,,N,,,,N,,N, +38,Filename: molina_2016.txt,2016,27,24,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,NICU Level 2,Marketplace,N,,"Rev Code 172 with MS DRG 789 - 794 | Per Diem $5,658",Flat Fee,,,"$5,658 Per Diem",,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",,,N,,,,N,,N, +39,Filename: molina_2016.txt,2016,27,24,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,NICU Level 2 - Effective Date 2018,Marketplace,N,,"Rev Code 172 with MS DRG 789 - 794 | Per Diem $5,792",Flat Fee,,,"$5,792 Per Diem",,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",,,N,,,,N,,N, +40,Filename: molina_2016.txt,2016,27,24,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,All Inpatient Services,Marketplace,N,,"Reimbursement for all Medicare Inpatient services shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with readmissions in adjudication of claims ""Readmission Factor"", whether or not an individual hospital is assessed that penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either retrospectively or prospectively.",% of MCR,100% of MCR,1.0,,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",,,N,,,,N,,N, +41,Filename: molina_2016.txt,2016,27,24,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,Outpatient Default Rate,Marketplace,N,,Covered Services rendered in which there is not a reimbursement amount addressed in Table 2 for Outpatient Services shall be reimbursed at twenty-five percent (25%) of Provider's billed charges.,% of BC,25% of BC,0.25,,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",,,N,,,,N,,N, +42,Filename: molina_2016.txt,2016,27,24,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,All Outpatient Services - Effective Date 2016 - 2017,Marketplace,N,,215% of Current Year Medicare rate Allowable*.,% of MCR,215% of MCR,2.15,,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",,,N,,,,Y,2018.0,N, +43,Filename: molina_2016.txt,2016,27,24,"ATTACHMENT B-1 +Alternate Compensation Schedule",MARKETPLACE,Facility,Hospital,,All Outpatient Services - Effective Date 2018,Marketplace,N,,220% of Current Year Medicare rate Allowable*,% of MCR,220% of MCR,2.2,,,,"Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it.",,N,N,"Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%)",,,N,,,,N,,N, +44,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Covered Services,PPO,Y,100% of BC,"Compensation shall be based on the Resource Based Relative Value Scale (RBRVS), the Conversion Factors (CF) and the Geographic Practice Cost Indices (GPCI) adjustment factors promulgated by the Centers for Medicare and Medicaid Services (CMS). Physician shall be compensated for Covered Services in an amount, less applicable Copayments and/or coinsurance, that is equal to the lesser of: (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges, or (c) Physicians usual billed charges.",% of MCR,90% of MCR,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +45,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Covered Services,EPO,Y,100% of BC,"Compensation shall be based on the Resource Based Relative Value Scale (RBRVS), the Conversion Factors (CF) and the Geographic Practice Cost Indices (GPCI) adjustment factors promulgated by the Centers for Medicare and Medicaid Services (CMS). Physician shall be compensated for Covered Services in an amount, less applicable Copayments and/or coinsurance, that is equal to the lesser of: (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges, or (c) Physicians usual billed charges.",% of MCR,90% of MCR,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +46,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Medications,PPO,Y,100% of BC,"Medications provided or administered by Physician shall be billed using HCPC codes if available and shall be compensated at the lesser of (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for medications for which a HCPC code has not been established Physician shall bill using the NDC code, drug and manufacturer name and shall be compensated at the Average Wholesale Price, or (c) Physician's billed charge amount not to exceed usual, reasonable and customary charges.",% of HCFA participating provider fee schedule,90% of HCFA participating provider fee schedule,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +47,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Medications,EPO,Y,100% of BC,"Medications provided or administered by Physician shall be billed using HCPC codes if available and shall be compensated at the lesser of (a) 90% of the HCFA participating provider fee schedule for Physician's locality, or (b) for medications for which a HCPC code has not been established Physician shall bill using the NDC code, drug and manufacturer name and shall be compensated at the Average Wholesale Price, or (c) Physician's billed charge amount not to exceed usual, reasonable and customary charges.",% of MCR,90% of MCR,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +48,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Immunizations,PPO,Y,100% of BC,"Immunization administered by Physician shall be billed using CPT-4 codes and shall be compensated at the lesser of a) the Physician's billed charges, or b) the Average Wholesale Price (AWP) as established by MediSpan less ten percent (10%). This AWP fee schedule is reviewed and subject to adjustment on a semi annual basis.",,,,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,90% of AWP,Y,semi annual basis,N, +49,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Immunizations,EPO,Y,100% of BC,"Immunization administered by Physician shall be billed using CPT-4 codes and shall be compensated at the lesser of a) the Physician's billed charges, or b) the Average Wholesale Price (AWP) as established by MediSpan less ten percent (10%). This AWP fee schedule is reviewed and subject to adjustment on a semi annual basis.",,,,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,90% of AWP,Y,semi annual basis,N, +50,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Laboratory Procedures,PPO,Y,100% of BC,"Compensation for laboratory procedures provided and administered by Physician shall be at the lesser of 90% of the HCFA participating provider fee schedule for Physician locality, or Physician's usual billed charge amount not to exceed usual, reasonable and customary charges.",% of HCFA participating provider fee schedule,90% of HCFA participating provider fee schedule,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +51,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,Laboratory Procedures,EPO,Y,100% of BC,"Compensation for laboratory procedures provided and administered by Physician shall be at the lesser of 90% of the HCFA participating provider fee schedule for Physician locality, or Physician's usual billed charge amount not to exceed usual, reasonable and customary charges.",% of HCFA participating provider fee schedule,90% of HCFA participating provider fee schedule,0.9,,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +52,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with vaginal delivery,PPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59400-Global Obstetric care with vaginal delivery. $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +53,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with vaginal delivery,EPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59400-Global Obstetric care with vaginal delivery. $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +54,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with Cesarean delivery,PPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59510-Global Obstetric care with Cesarean delivery $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +55,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Obstetrical Care - Global Obstetric care with Cesarean delivery,EPO,Y,100% of BC,"Compensation for obstetrical services shall be at the lesser of the Physician's billed charges, or: CPT 59510-Global Obstetric care with Cesarean delivery $1700.00",Flat Fee,,,$1700.00,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +56,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Anesthesiology Services - Anesthesiology Services,PPO,Y,75% of BC,"Physician shall be compensated for anesthesiology services which are Covered Services at the lesser of (a) $39.00 per unit value in accordance with the American Society of Anesthesiology (ASA) unit scale, or (b) 75% of the Physician's usual billed charges.",Flat Fee,,,$39.00 per unit value,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +57,Filename: hn_24-83.txt,24-83,3,3,"ADDENDUM B +PREFERRRED PROVIDER ORGANIZATION (PPO) +EXCLUSIVE PROVIDER ORGANIZATION (EPO) +BENEFIT PROGRAMS +Fee For Service Compensation Schedule",COMMERCIAL,Professional,Physician,,For Anesthesiology Services - Anesthesiology Services,EPO,Y,75% of BC,"Physician shall be compensated for anesthesiology services which are Covered Services at the lesser of (a) $39.00 per unit value in accordance with the American Society of Anesthesiology (ASA) unit scale, or (b) 75% of the Physician's usual billed charges.",Flat Fee,,,$39.00 per unit value,"for ""by report"" procedures, unlisted procedures and relativities not established in RBRVS, Physician shall be reimbursed at 75% of billed charges not to exceed usual, reasonable and customary charges",75% of billed charges,,,N,N,,,,N,,,,N,,N, +58,Filename: sga_01.txt,1,16,15,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Airfare,XYZ Corporation,N,,"Airfare (no first class, business class allowed upon pre-approval and requires two week advance booking)",,,,,,,,,N,N,,,,N,,,,N,,N, +59,Filename: sga_01.txt,1,16,15,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Lodging,XYZ Corporation,,,Lodging,,,,,,,,,N,N,,,,N,,,,N,,N, +60,Filename: sga_01.txt,1,16,15,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Food and beverages,XYZ Corporation,N,,Food and beverages (capped per GSA per diem rate),,,,,,,,,N,N,,,,N,,,,N,,N, +61,Filename: sga_01.txt,1,16,15,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Ground transportation,XYZ Corporation,N,,"Ground transportation (taxi, bus, rental car or Uber)",,,,,,,,,N,N,,,,N,,,,N,,N, +62,Filename: sga_01.txt,1,16,15,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Self-Parking,XYZ Corporation,N,,Self-Parking,Flat Fee,,,$5 Per Parking Session,,,,,N,N,,,,N,,,,N,,N, +63,Filename: sga_01.txt,1,16,15,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Reimbursable Expenses - Tolls,XYZ Corporation,N,,Tolls,,,,,,,,,N,N,,,,N,,,,N,,N, +64,Filename: sga_01.txt,1,16,15,"EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY",,Ancillary,,,Covered Services,XYZ Corporation,Y,,Reimbursable Expenses (require pre-approval by XYZ and shall not exceed 12% of the specific engagement),,,,,,,,,N,N,,,,N,,,12% of engagement,N,,N, +65,Filename: cnc_01-06.txt,01-06,4,3,"Attachment A: Medicaid +EXHIBIT 2 +COMPENSATION SCHEDULE +PROFESSIONAL SERVICES +Picture, LLC Novelty Pharmacy",MEDICAID,Professional,,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for professional Covered Services rendered to a Covered Person shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for professional Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,,,,,N,N,,,,N,,,,N,,N, +66,Filename: cnc_01-06.txt,01-06,4,4,"Attachment A: Medicaid +EXHIBIT 2 +COMPENSATION SCHEDULE +PROFESSIONAL SERVICES +Picture, LLC Novelty Pharmacy",MEDICAID,Professional,,,Covered Services,Medicaid,Y,100% of AC,"The maximum compensation for professional Covered Services rendered to a Covered Person shall be the ""Allowed Amount."" Except as otherwise provided in this Compensation Schedule, the Allowed Amount for professional Covered Services is the lesser of: (i) Allowable Charges; or (ii) one hundred percent (100%) of the Payor's Medicaid fee schedule.",% of Payor's Medicaid fee schedule,100% of Payor's Medicaid fee schedule,1,,,,,,N,N,,,,N,,,,N,,N, +67,Filename: cnc_01-06.txt,01-06,4,4,"Attachment A: Medicaid +EXHIBIT 2 +COMPENSATION SCHEDULE +PROFESSIONAL SERVICES +Picture, LLC Novelty Pharmacy",MEDICAID,Professional,,OP,Payment for Multiple Procedures - Multiple Outpatient Surgical or Scope Procedures,Medicaid,Y,100% of AC,"Where multiple outpatient surgical or scope procedures performed on a Covered Person during a single occasion of surgery, reimbursement will be as follows: i) the procedure for which the Allowed Amount under this Compensation Schedule is greatest will be reimbursed at one hundred percent (100%) of such Allowed Amount; and ii) the other procedures under this Compensation Schedule will each be reimbursed at fifty percent (50%) of such Allowed Amounts.",% of AA / % of AA,100% of AA / 50% of AA,1 / 0.5,,,,,,N,N,,,,N,,,,N,,N, +68,Filename: cnc_arch.txt,,12,11,"EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT +PROVIDER COMPENSATION SCHEDULE +COMMERCIAL-EXCHANGE PRODUCT +PROFESSIONAL SERVICES",COMMERCIAL-EXCHANGE,Professional,,,Covered Services,Commercial-Exchange,Y,100% of AC,"For Covered Services provided to Covered Persons, Payor shall pay Provider the lesser of: (i) the Provider's Allowable Charges; or (ii) one hundred percent (100%) of the Payor Medicare fee schedule in effect on the date of service and specific to the services rendered, less any applicable coinsurance or deductible. This fee schedule is based on the CMS/Medicare RBRVS relative values and for certain codes alternative fee sources may be used.",% of MCR,100% of MCR,1,,"In the event CMS contains no published fee amount, alternate (or ""gap fill"") Fee Sources may be used to supply the Fee Basis amount for deriving the Fee Amount. At such time in the future as CMS publishes its own RBRVS value for that CPT/HCPCS code, Payor will use the CMS fee amount for that code and no longer use the alternate Fee Source.","100% of alternate (or ""gap fill"") Fee Sources",Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement in the event of HMO's or the Payor's insolvency or discontinuance of operations. Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement as needed to complete any Medically Necessary procedures commenced but unfinished at the time of HMO's or the Payor's insolvency or discontinuance of operations. The completion of a Medically Necessary procedure shall include the rendering of all Covered Services that constitute Medically Necessary follow-up care for that procedure. The foregoing,,N,N,,,,N,,,,N,,N, +69,Filename: cnc_arch.txt,,12,12,"EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT +PROVIDER COMPENSATION SCHEDULE +COMMERCIAL-EXCHANGE PRODUCT +PROFESSIONAL SERVICES",COMMERCIAL-EXCHANGE,Professional,,,Covered Services,Commercial-Exchange,Y,100% of AC,"For Covered Services provided to Covered Persons, Payor shall pay Provider the lesser of: (i) the Provider's Allowable Charges; or (ii) one hundred percent (100%) of the Payor Medicare fee schedule in effect on the date of service and specific to the services rendered, less any applicable coinsurance or deductible. This fee schedule is based on the CMS/Medicare RBRVS relative values and for certain codes alternative fee sources may be used.",% of MCR,100% of MCR,1,,"In the event CMS contains no published fee amount, alternate (or ""gap fill"") Fee Sources may be used to supply the Fee Basis amount for deriving the Fee Amount. At such time in the future as CMS publishes its own RBRVS value for that CPT/HCPCS code, Payor will use the CMS fee amount for that code and no longer use the alternate Fee Source.","100% of alternate (or ""gap fill"") Fee Sources",Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement in the event of HMO's or the Payor's insolvency or discontinuance of operations. Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement as needed to complete any Medically Necessary procedures commenced but unfinished at the time of HMO's or the Payor's insolvency or discontinuance of operations. The completion of a Medically Necessary procedure shall include the rendering of all Covered Services that constitute Medically Necessary follow-up care for that procedure. The foregoing,,N,N,,,,N,,,,N,,N, +70,Filename: cnc_arch.txt,,12,12,"EXHIBIT 2 of the INDIVIDUAL PRODUCT ATTACHMENT +PROVIDER COMPENSATION SCHEDULE +COMMERCIAL-EXCHANGE PRODUCT +PROFESSIONAL SERVICES",COMMERCIAL-EXCHANGE,Professional,,,Multiple Procedures,Commercial-Exchange,Y,100% of AC,"Multiple procedures performed during the same day will be reimbursed at 100% for the primary procedure, 50% for the second procedure, and 50% for the third procedure, subsequent procedures shall not be eligible for reimbursement.",% of MCR / % of MCR / % of MCR,100% of MCR / 50% of MCR / 50% of MCR,1 / 0.5 / 0.5,,"In the event CMS contains no published fee amount, alternate (or ""gap fill"") Fee Sources may be used to supply the Fee Basis amount for deriving the Fee Amount. At such time in the future as CMS publishes its own RBRVS value for that CPT/HCPCS code, Payor will use the CMS fee amount for that code and no longer use the alternate Fee Source.","100% of alternate (or ""gap fill"") Fee Sources",Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement in the event of HMO's or the Payor's insolvency or discontinuance of operations. Each Participating Provider shall continue to provide Covered Services to patients that were Covered Persons under the Agreement as needed to complete any Medically Necessary procedures commenced but unfinished at the time of HMO's or the Payor's insolvency or discontinuance of operations. The completion of a Medically Necessary procedure shall include the rendering of all Covered Services that constitute Medically Necessary follow-up care for that procedure. The foregoing,,N,N,,,,N,,,,N,,N, diff --git a/assets/sampleOne/molina_2016.pdf b/assets/sampleOne/molina_2016.pdf new file mode 100644 index 00000000..bac88746 Binary files /dev/null and b/assets/sampleOne/molina_2016.pdf differ diff --git a/assets/sampleOne/molina_2016.txt b/assets/sampleOne/molina_2016.txt new file mode 100644 index 00000000..708ec6ec --- /dev/null +++ b/assets/sampleOne/molina_2016.txt @@ -0,0 +1,1265 @@ +Document Index +Sample Company Name, Inc. 1 +HOSPITAL SERVICES AGREEMENT 1 +SIGNATURE PAGE 1 +Provider Signature and Information: 1 +HOSPITAL SERVICES AGREEMENT 3 +RECITALS 3 +ARTICLE ONE - DEFINITIONS 3 +ARTICLE TWO - PROVIDER OBLIGATIONS 5 +ARTICLE THREE - HEALTH PLAN'S OBLIGATIONS 9 +ARTICLE FOUR - CLAIMS PAYMENT 10 +ARTICLE FIVE - TERM AND TERMINATION 12 +ARTICLE SIX - GENERAL PROVISIONS 13 +6.12 16Notice. 16 +ATTACHMENT A 20 +PRODUCTS 20 +ATTACHMENT B 21 +Compensation Schedule 21 +Inpatient Default Rate: 22 +Outpatient Default Rate: 22 +Chargemaster Protection 22 +Annual Rate Adjustment 22 +ATTACHMENT B-1 23 +Alternate Compensation Schedule 23 +Inpatient Carve-outs. 24 +Outpatient Default Rate: 24 +Chargemaster Protection 24 +Annual Rate Adjustment 24 +ATTACHMENT C 26 +STATE OF TEXAS REQUIRED PROVISIONS 26STATE LAWS 26 +ATTACHMENT D 27 +COMPANY MARKETPLACE 27 +LAWS AND GOVERNMENT PROGRAM REQUIREMENTS 27 + + + +Start of Page No. = 1 +Sample Company Name, Inc. +HOSPITAL SERVICES AGREEMENT +SIGNATURE PAGE +In consideration of the promises, covenants, and warranties stated, the Parties agree as set forth in this Agreement. The +Authorized Representative acknowledges, warrants, and represents that the Authorized Representative has the authority +and authorization to act on behalf of its Party. The Authorized Representative further acknowledges he/she received and +reviewed this Agreement in its entirety. +The Authorized Representative for each Party executes this Agreement with the intent to bind the Parties in accordance +with this Agreement. +Agreement is effective as of 12/01/2016 ("Effective Date") +Provider Signature and Information: +Health Plan Signature and Information: +MHTHSA050416 +Page 1 of 30 + + +-------Table Start-------- +0e1ef790-afab-4c0a-9d0f-f357b98b7e78 +[['Provider Name: Facilities on Attachment E', 'Provider Name: Facilities on Attachment E'], ['Authorized Representative\'s Signature: XYZ Company, Inc. a Texas Corporation, as the disclosed agent for each facility listed on Attachment E of the Agreement ("Provider") Samtle', "Authorized Representative's Name - Printed: Harvey Specter"], ["Authorized Representative's Title: CFO/VP - XYZ Company, Inc.", "Authorized Representative's Signature Date: 2/8/17"], ['Telephone Number:', 'Fax Number - Official Correspondence:'], ['Mailing Address - Official Correspondence: North Texas Division 456 OakAvenue, Suite 350 Coppell, TX 75039', 'Payment Address - If different than Mailing Address:'], ['Email Address -- Official Correspondence:', 'Tax ID Number - As listed on corresponding tax form: See Attachment E for list of Providers'], ['NPI - That corresponds to the above Tax ID Number: See Attachment E for list of Providers', None]] + Provider Signature and Information: +-------Table End-------- +-------Table Start-------- +a3d8c474-5dfe-4f2c-8715-7713f4c6ffb8 +[['Sample Company Name, Inc., a Texas Corporation ("Health Plan")', 'Sample Company Name, Inc., a Texas Corporation ("Health Plan")'], ["Authorized Representative's Signature:", "Authorized Representative's Name - Printed: Louis Litt"], ["Authorized Representative's Title: Plan Chief Operating Officer", "Authorized Representative's Countersignature Date: 2/9/17"], ['Mailing Address - Official Correspondence:', 'Email Address - Official Correspondence:']] + Provider Signature and Information: Health Plan Signature and Information: +-------Table End-------- + +Start of Page No. = 2 +Sample Company Name, Inc. +456 OakAvenue, +Suite 400 +Coppell, TX 75038 +MHTHSA050416 +Page 2 of 30 + +Start of Page No. = 3 +HOSPITAL SERVICES AGREEMENT +Health Plan and Provider enter into this Agreement as of the Effective Date set forth on the Signature Page of this +Agreement. The Provider and Health Plan each are referred to as a "Party" and collectively as the "Parties". +RECITALS +A. +WHEREAS, Health Plan is a corporation licensed and approved by required agencies to operate a health care +service plan, including without limitation, to issue benefit agreements covering the provision of health care or +other related services and enter into agreements with Participating Providers; +B. +WHEREAS, Health Plan arranges for the provision of certain health care services to Members for its Exchange +benefit plan as a Qualified Health Plan issuer ("QHP Issuer") as that term is defined in 45 C.F.R 155.2 that (1) has +in effect certification that meets the standards described in subpart C of 45 C.F.R. part 156 issued or recognized +by the health insurance exchange for Texas ("Exchange"); and (2) that is offered through the Exchange in +accordance with the process described in subpart K of 45 C.F.R. part 155. +C. +WHEREAS, Provider is approved to render certain health care or other related services and desires to provide +such services to eligible recipients; and +D. +WHEREAS, the Parties intend by entering into this Agreement they will make health care or other related +services available to eligible recipients enrolled in various Products covered under this Agreement. +NOW, THEREFORE, in consideration of the promises, covenants, and warranties stated herein, the Parties agree as +follows: +ARTICLE ONE - DEFINITIONS +1.1 +Capitalized words or phrases in this Agreement have the meaning set forth below. +a. Advance Directive means a Member's written instructions, recognized under Law, relating to the provision +of health care, when the Member is not competent to make a health care decision as determined under Law. +b. Agreement means this Hospital Services Agreement between Provider and Health Plan and all attachments, +exhibits, addenda, amendments, and incorporated documents or materials. +C. Centers for Medicare and Medicaid Services ("CMS") means the agency responsible for Medicare and +certain parts of Medicaid, CHIP, MMP, and the Health Insurance Marketplace. +d. Claim means a bill for Covered Services provided by Provider. +e. +Clean Claim means a Claim for Covered Services submitted on an industry standard form, which has no +defect, impropriety, lack of required substantiating documentation, or particular circumstance requiring +special treatment that prevents timely adjudication of the Claim. +f. +Covered Services mean those health care services and supplies, including Emergency Services, provided to +Members that are Medically Necessary and are benefits of a Member's Product. +g. Cultural Competency Plan means a plan that ensures Members receive Covered Services in a manner that +takes into account, but is not limited to, developmental disabilities, physical disabilities, differential abilities, +cultural and ethnic backgrounds, and limited English proficiency Date of Service means the date on which +Provider provides Covered Services or, for inpatient services, the date the Member is discharged. +h. Emergency Medical Condition means a medical condition manifesting itself by acute symptoms of +sufficient severity, which may include severe pain or other acute symptoms, such that a prudent layperson +with an average knowledge of health and medicine could reasonably expect the absence of immediate medical +attention to result in: +a. Serious jeopardy to the health of a patient, including a pregnant woman or a fetus +b. Serious impairment to bodily organ or part. +c. Serious dysfunction of any bodily organ or part. +MHTHSA050416 +Page 3 of 30 + +Start of Page No. = 4 +With respect to pregnant women, an emergency medical condition when there is: +d. Inadequate time to effect safe transfer to another facility prior to delivery +e. Transfer may impose a threat to the health and safety of the patient or fetus +f. +Evidence of onset of uterine contractions or rupture of the membrane(s) +i. Emergency Services mean medical screening, examination, and evaluation by a physician, or, to the extent +permitted by applicable law, by other appropriate personnel under the supervision of a physician to determine +if an Emergency Medical Condition exists and if it does, the care, treatment, or surgery for a Member by a +physician necessary to relieve or eliminate the Emergency Medical Condition provided in accordance with the +federal Emergency Medical Treatment and Active Labor Act ("EMTALA"). +j. +Government Contracts mean those contracts between Health Plan and state and federal agencies for the +arrangement of health care services for applicable Government Programs. +k. Government Programs mean various government sponsored health products in which Health Plan +participates. +1. Government Program Requirements mean the requirements of governmental authorities for an applicable +Government Program, which includes, but is not limited to, the requirements set forth in the Government +Contracts. +m. Grievance Program means the procedures established by Health Plan to timely address Member and +Provider complaints or grievances. +n. Health Insurance Marketplace means those health insurance products/programs required by Title I of the +Patient Protection and Affordable Care Act of 2010 (Pub. L. 111-148), as amended by the Health Care and +Education Reconciliation Act of 2010 (Pub. L. 111-152), referred to collectively as the Affordable Care Act, +including all implementing statutes and regulations. +o. Health Plan means Dummy Healthcare of Texas, Inc., a Texas Corporation. +p. Hospital Providers mean hospital-based physicians and independent licensed non-physician health care +professionals, who are employed by, contract with, or are on the medical staff of Provider to provide Covered +Services. For the avoidance of doubt, a Hospital Provider is not considered a Provider. +q. Law means all statutes and regulations applicable to this Agreement. +. Medically Necessary or Medical Necessity means those medical services and supplies which are provided in +accordance with professionally recognized standards of practice which are determined to be: (a) appropriate +and necessary for the symptoms, diagnosis or treatment of the Member's medical condition; (b) provided for +the diagnosis and direct care and treatment of such condition; (c) not furnished primarily for the convenience +of the Member, the Member's family, the treating provider, or other provider; (d) furnished at the most +appropriate level which can be provided consistent with generally accepted medical standards of care and (e) +consistent with Health Plan policy. Services may not be covered under Health Plan benefits, but may be +determined to be Medically Necessary. +S. +Member means a person enrolled in a Product and who is eligible to receive Covered Services. +t. +Molina Marketplace means the Products offered and sold by Health Plan under the requirements of the +Health Insurance Marketplace. +u. +Overpayments mean a payment Provider receives, which after applicable reconciliation, Provider is not +entitled to receive pursuant to Laws, applicable Government Program Requirements, or this Agreement. +V. Participating Provider means a healthcare facility or practitioner contracted with and, as applicable, +credentialed by Health Plan or Health Plan's designee. +W. Post Stabilization Services means those Covered Services, related to Emergency Medical Condition, that are +provided after a Member is stabilized in order to maintain the stabilized condition, or to improve or resolve +the Member's condition. +MHTHSA050416 +Page + of 30 + +Start of Page No. = 5 +X. Product means the various health insurance programs offered by Health Plan to Members in which Provider +agrees to be a Participating Provider, identified on Attachment A. Products, and which will include any +successors to such Products. +y. +Provider means the entity identified on the Signature Page of this Agreement and includes any person or +entity performing Covered Services on behalf of Provider and for which: (i) an entity of the Provider bills +under an owned tax identification number; and (ii), when applicable, such person or entity has been approved +by Health Plan as a Participating Provider. Each entity or person shall be considered an "Individual Provider". +z. +Provider Manual means Health Plan's provider manuals, policies, procedures, documents, educational +materials, and, as applicable, Supplemental Materials. +aa. Quality Improvement Program ("QI Program") means the policies and procedures, interventions, and +systems, developed by Health Plan for monitoring, assessing, and improving the accessibility, quality, and +continuity of care provided to Members. +bb. Subcontractor means an individual or organization, including Downstream Entity, with which Provider +contracts for the provision of Covered Services or administrative functions related to the performance of this +Agreement, including delegation activities. For the avoidance of doubt, a Subcontractor does not include +Individual Providers. +cc. Utilization Review and Management Program ("UM Program") means the policies, procedures, and +systems developed by Health Plan for monitoring the utilization of Covered Services by Members, including +but not limited to under-utilization and over-utilization. +ARTICLE TWO - PROVIDER OBLIGATIONS +2.1 +Provider Standards. +a. Standard of Care. Provider agrees to provide Covered Services within the scope of Provider's business. +Provider will ensure all services and interactions with Members are at a level of care and competence that +equals or exceeds generally accepted and professionally recognized standards of practice, rules, and standards +of professional conduct, Laws and applicable Government Program Requirements. +b. Facilities, Equipment, and Personnel. Provider's facilities, equipment, personnel, and administrative +services will be at a level and quality necessary to perform Provider's duties and responsibilities under this +Agreement and to comply with Laws and applicable Government Program Requirements. +c. Prior Authorization. For Covered Services that require prior authorizations, Provider shall make +commercially reasonable efforts to obtain prior authorization from Health Plan before providing such Covered +Service. Provider will not have to obtain prior authorizations before providing Emergency Services. +Prior to admitting any Member as an inpatient or providing outpatient services, Provider shall use +commercially reasonable efforts to obtain the prior authorization of Health Plan in accordance with Health +Plan's Provider Manual unless the situation is one involving the delivery of Emergency Services. For +Emergency Services that result in an admission, Provider shall notify Health Plan or its agent within twenty- +four (24) hours of admission and shall request authorization from Health Plan prior to the provision of any +post-stabilization care. For non-emergent services, regardless of whether prior authorization was received, +Provider shall cooperate and participate in Health Plan's notification procedures described in Provider Manual +for all inpatient (acute, rehabilitation, mental health and SNF) and outpatient admission on the same day of +admission or at a maximum within twenty-four (24) hours of admission. +d. Use of Participating Providers. Except in the case of Emergency Services or when Provider obtains prior +authorization, Provider will make commercially reasonable efforts to utilize Participating Providers to provide +Covered Services. If a Participating Provider is not available, Provider will make commercially reasonable +efforts to notify Health Plan so Health Plan can determine the appropriate provider to perform such services. +e. Provision of Covered Services. Provider shall provide Covered Services to Members, within the scope of +Provider's license, in accordance with this Agreement, Health Plan's policies and procedures, and the terms +and conditions of the Health Plan product which covers the Member. +MHTHSA050416 +Page 5 of 30 + +Start of Page No. = 6 +f. Availability of Services. Commencing as of the Effective Date, Provider shall provide hospital inpatient +services as of the date of admission and/or the date of service for outpatient services pursuant to the terms of +this Agreement. Provider shall make Covered Services for acute care hospital services available twenty-four +(24) hours a day, seven (7) days a week or on the same basis as are customarily made available to the +Provider's general patient population. Health Plan acknowledges that not all Covered Services are available +on a 24 hour per day, 7 days per week basis. Provider shall meet the applicable standards for timely access to +care and services, taking into account the urgency of the need for the services. +g. +Provider-Member Communication. Health Plan encourages open Provider-Member communication +regarding Medical Necessity, appropriate treatment, and care. Provider is free to communicate all treatment +options to Members regardless of limitations on Covered Member Eligibility Verification. Provider will +verify eligibility of Members before providing services unless the situation involves the provision of +Emergency Services. +h. +Hospital Admission Notifications. Prior to admitting any Member as an inpatient or outpatient, Provider +shall use commercially reasonable efforts to obtain the prior authorization of Health Plan in accordance with +Health Plan's Provider Manual unless the situation is one involving the delivery of Emergency Services. For +Emergency Services that result in an admission, Provider shall notify Health Plan or its agent within twenty- +four (24) hours of admission and shall request authorization from Health Plan prior to the provision of any +post-stabilization care. For non-emergent services, regardless of whether prior authorization was received, +Provider shall cooperate and participate in Health Plan's notification procedures described in Provider Manual +for all inpatient (acute, rehabilitation, mental health and SNF) and outpatient admission on the same day of +admission or at a maximum within twenty-four (24) hours of admission. +2.2 +Standards for Hospital Providers. +a. Hospital Providers. Provider will have a sufficient number of Hospital Providers to provide Covered +Services and meet the needs of Health Plan and its Members. Provider will establish policies and procedures +to ensure non-physician health care professionals, who are employed by, contract with, or are on the medical +staff of Provider to provide Covered Services comply with applicable terms of this Agreement, Law and +applicable Government Program Requirements. +b. Hospital Provider Information. Upon request, Provider will give Health Plan a complete list of its Hospital +Providers and any information required for administration of Products. +c. +Restriction, Suspension, or Termination of Hospital Providers. Provider will promptly restrict, suspend, +or terminate Hospital Providers from providing Covered Services in the following circumstances: (i) the +Hospital Provider ceases to meet credentialing, licensing/certification requirements, or other professional +standards; or (ii) Health Plan or Provider reasonably determine there are serious deficiencies in the quality of +care of the applicable Hospital Provider which affects or could adversely affect the health or safety of +Members. +d. Notification. Provider will notify Health Plan within five (5) business days should any disciplinary or other +action of any kind be implemented against any Participating Provider or Hospital Provider which results in +any suspension, reduction, or modification of hospital privileges. Provider's notification to Health Plan will +state Provider's actions taken against the Hospital Provider or Participating Provider. +e. +Staffing Privileges. Provider agrees to use its best efforts to arrange staff privileges or other appropriate +access for Participating Providers, Health Plan's case management staff, and hospitalist providers who are +qualified medical or osteopathic physicians, provided they meet the reasonable standard of practice and +credentialing standards established by Provider's medical staff and the bylaws, rules, and regulations of +Provider. +2.3 +Rights of Members. Provider will observe, protect, and promote the rights of Members. +2.4 +Use of Name. Neither Provider nor Health Plan will use the other Party's name, including, but not limited to, +trademarks, service marks, or logos, in advertisements without prior approval. However, Provider may refer to +Health Plan in Provider's listings of participating health plans. Additionally, Health Plan may use Provider's +name and related information in: (i) publications to identify Provider as a Participating Provider; and (ii) as may +be required to comply with the Laws and applicable Government Program Requirements. +MHTHSA050416 +Page 6 of 30 + +Start of Page No. = 7 +2.5 +Non-Discrimination in Enrollment. Provider will not differentiate or discriminate in providing Covered +Services because of race, color, religion, national origin, ancestry, age, sex, marital status, sexual orientation, +physical, sensory or mental handicap, socioeconomic status, or participation in publicly financed programs of +health care services. Provider will provide Covered Services in the same location, in the same manner, in +accordance with the same standards, and within the same time or availability, regardless of payer. +2.6 +Recordkeeping. +a. +Maintaining Member Record. Provider will maintain a medical and billing record ("Record") for each +Member to whom Provider provides health care services. The Member's Record will contain all information +required by Laws, generally accepted and prevailing professional practices, applicable Government Program +Requirements, and Health Plan's policies and procedures. Provider will retain such Record for as long as +required by Laws and applicable Government Program Requirements. This section will survive any +termination. +b. +Confidentiality of Member Record. Provider will comply with all Laws, including, but not limited to, the +Health Insurance Portability and Accountability Act of 1996 ("HIPAA") and the Health Information +Technology for Economic and Clinical Health ("HITECH") Act, Health Plan's policies and procedures, and +applicable Government Program Requirements regarding privacy and confidentiality of Members' Record. +Provider will not disclose or use Member names, addresses, social security numbers, identities, other personal +information, treatment modalities, or Record without obtaining appropriate authorization. +C. +Delivery of Member Record. Provider will promptly deliver to Health Plan, upon request or as may be +required by Law, Health Plan's policies and procedures, applicable Government Program Requirements, or +third party payers, any information, statistical data, or Record pertaining to Members served by Provider. +Provider is responsible for the fees associated with producing such records. Provider will further give direct +access to said patient care information as requested by Health Plan or as required by any state or federal +authority/agency with jurisdiction over Health Plan. Health Plan has the right to withhold compensation from +Provider if Provider fails or refuses to give such information to Health Plan promptly. This section will +survive any termination. +d. Member Access to Member Record. Provider will give Members access to Members' Record and other +applicable information, in accordance with Laws, applicable Government Program Requirements, and Health +Plan's policies and procedures. This section will survive any termination. +2.7 +Program Participation. +a. +Participation in Grievance Program. Provider shall reasonably participate in Health Plan's Grievance +Program, and will cooperate with Health Plan in identifying, processing, and promptly resolving Member +grievances, complaints, or inquiries. +b. +Participation in Quality Improvement Program. Provider shall reasonably participate in Health Plan's QI +Program, and will cooperate in conducting peer review and audits of care provided by Provider in accordance +with confidentiality and applicable laws. +C. +Participation in Utilization Review and Management Program. Provider will participate in and cooperate +with Health Plan's UM Program. Provider will cooperate with Health Plan in audits to identify, confirm, and +assess utilization levels of Covered Services. +d. +Participation in Credentialing. Provider will participate in and satisfy credentialing criteria established by +Health Plan before the Effective Date and throughout the term of this Agreement. Provider will promptly +notify Health Plan in writing of any change in the information submitted or relied upon by Provider to achieve +or maintain credentialed status. In accordance with Health Plan's policies and procedures, Provider must be +credentialed by Health Plan or Health Plan's designee before providing Covered Services. +e. Health Education/Training. Health Plan will engage Provider in the development and execution of health +education informational, promotional and instructional materials. +2.8 +Provider Manual. Health Plan's Provider Manual is made available to Provider at Health Plan's website. +Provider will cooperate with and make commercially reasonable efforts to render Covered Services in accordance +with the contents, instructions and procedures set forth in the Provider Manual, which may be amended from time +MHTHSA050416 +Page 7 of 30 + +Start of Page No. = 8 +to time by Health Plan. Health Plan will use commercially reasonable efforts to provide ninety (90) days written +notice to Provider of material changes. Provider shall not be required to comply with Health Plan policies and +procedures which decreases its reimbursement under this Agreement or causes Provider to incur additional +administrative costs. In the event of a conflict between Health Plan's policies and procedures or Provider Manual +and this Agreement, this Agreement shall control. +2.9 +Supplemental Materials. In addition to the contents, instructions, and procedures set forth in the Provider +Manual, Health Plan may periodically promulgate bulletins or other written materials that may be used to +supplement the Provider Manual or such bulletins or other written materials may be used to provide additional +instruction, guidance or information, separate from the Provider Manual ("Supplemental Materials"). Health Plan +may issue such Supplemental Materials in an electronic format, including, but not limited to, posting on Health +Plan's website and interactive web-portal. Provider can obtain paper copies upon request. Such Supplemental +Materials will become binding upon Provider as of the effective date indicated on the Supplemental Materials, +and, if applicable, such effective date will be determined in accordance with the terms of this Agreement. Provider +shall not be required to comply with Supplemental Materials which have the effect of decreasing Provider's +reimbursement or causes Provider to incur additional administrative costs. In the event of a conflict between +Supplemental Materials and this Agreement, this Agreement shall control. +2.10 +Health Plan's Electronic Processes and Initiatives. Provider will participate in and comply with Health Plan's +electronic processes and initiatives, including, but not limited to, electronic submission of prior authorization, +Health Plan access to electronic medical records, electronic claims filing, electronic data interchange ("EDI"), +electronic remittance advice, electronic fund transfers, and registration and use of Health Plan's interactive web- +portal. Such programs, registration, and use are contained in the Provider Manual or Supplemental Materials. +Provider's participation in such processes and initiatives shall be subject to applicable law and regulations and +Provider's applicable policies. +2.11 +Information Reporting and Changes. Provider will make commercially reasonable efforts to deliver to Health +Plan a complete list of its health care providers, facilities, and business/practice locations it uses to provide +Covered Services every thirty (30) days, together with specific information required for credentialing and +administration. If Provider does not deliver such information, Health Plan will use the last information received +from Provider. Notwithstanding the above, if a Law or applicable Government Program Requirement requires the +delivery of information described in this section in another matter or different timeframe, Provider will notify +Health Plan in accordance with the Law or applicable Government Program Requirement. Health Plan also +reserves the right to request such information at any time +2.12 +Standing. +a. +Requirements. Provider represents it has the appropriate approvals, including, but not limited to. applicable +licenses, certifications, registrations, and permits to provide health care services in accordance with Laws and +applicable Government Program Requirements. Provider will deliver evidence of any approvals to Health +Plan upon request. Provider will maintain such approvals in good standing, free of disciplinary action, and in +unrestricted status. Provider will promptly notify Health Plan of changes in its status, including. but not +limited to, disciplinary action taken by any agency responsible for oversight of Provider. +b. +Unrestricted Status. Provider warrants and represents it has not been and is not currently excluded from, and +will promptly notify Health Plan if it becomes excluded from, participation in a federal or state health care +program. +c. +Malpractice and Other Actions. Provider will give prompt notice to Health Plan of: (i) a malpractice claim +asserted against it by a Member, a payment made by or on behalf of Provider in settlement or compromise of +such a claim, or a payment made by or on behalf of Provider pursuant to a judgment rendered upon such a +claim; (ii) a criminal investigation or proceeding against Provider: (iii) a conviction of Provider for crimes +involving moral turpitude or felonies; and (iv) a civil claim asserted against Provider that may jeopardize +Provider's financial soundness. +d. Liability Insurance. Provider will maintain premises and professional liability insurance in coverage +amounts appropriate for the size and nature of Provider's facility and health care activities or a comparable +program of self-insurance, and in compliance with Laws and applicable Government Program Requirements. +If the coverage is claims made or reporting, Provider agrees to purchase similar "tail" coverage upon +MHTHSA050416 +Page 8 of 30 + +Start of Page No. = 9 +termination of the Provider's present or subsequent policy. Provider will deliver copies of such insurance +policy to Health Plan within five (5) business days of a written request by Health Plan. Provider will deliver +advance written notice fifteen (15) business days before any change, reduction, cancellation. or termination of +such insurance coverage. +2.13 +Non-Solicitation of Members. Provider will not directly solicit or encourage Members to select another health +plan primarily for the purpose of securing financial gain for Provider. Nothing in this provision is intended to +limit Provider's ability to fully inform Members of all available health care treatment options or modalities and +healthcare plans in which Providers participates. +2.14 +Laws and Government Program Requirements. +a. +Compliance with Laws and Government Program Requirements. Provider will comply with Laws that +are applicable to this Agreement. +b. +Fraud and Abuse Reporting. Provider will comply with Laws and applicable Government Program +Requirements related to fraud, waste, and abuse. Provider will establish and maintain policies and procedures +for identifying and investigating fraud, waste, and abuse. Provider shall make commercially reasonable efforts +to report to Health Plan's compliance officer final determination of fraud and/or abuse, as defined in Title 42, +of the Code of Federal Regulations, Section 455.2, where there is reason to believe that an incident of fraud +and/or abuse has occurred, by subcontractors, Members, providers, or employees within ten (10) state +working days of the date of final determination. +c. +Advance Directive. Provider will comply with Laws and applicable Government Program Requirements +related to advance directives. +d. Ownership Disclosure Information. If applicable, a Provider must disclose to Health Plan the name and +address of each person, entity, or business with an ownership or control interest in the disclosing entity before +the Effective Date and throughout the term of this Agreement if required by applicable law. +ARTICLE THREE - HEALTH PLAN'S OBLIGATIONS +3.1 +Compensation. Health Plan shall pay Provider for Covered Services in accordance with the terms and conditions +of this Agreement and the compensation schedule set forth in Attachment B. +3.2 +Member Eligibility Determination. Health Plan will maintain data on Member eligibility and enrollment. Health +Plan will promptly verify Member eligibility at the request of Provider. Health Plan will maintain telephone +and/or electronic or online services twenty-four (24) hours a day, three hundred sixty-five (365) days per year for +purposes of allowing participating providers to confirm Member eligibility. +3.3 +Prior Authorization Review. Health Plan will respond with a determination on a prior authorization request in +accordance with the time frames governed by applicable Laws and Government Program Requirements after +receiving all necessary information from Provider. +3.4 +Medical Necessity Determination. Health Plan's determination with regard to Medical Necessity, including, but +not limited to, determinations of level of care and length of stay, will govern subject to Provider's right of appeal. +The primary concern with respect to Medical Necessity determinations is the interest of the Member. +3.5 +Member Services. Health Plan will provide services to Members, including, but not limited to, assisting +Members in selecting a primary care physician, processing Member complaints and grievances, informing +Members of Health Plan's policies and procedures, providing Members with membership cards, providing +Members with information about Health Plan, and providing Members with access to Health Plan's Provider +Directory. +3.6 +Provider Services. Health Plan will make available a provider services department that, among other Health Plan +duties, is available to assist Provider with questions about this Agreement. +3.7 +Corrective Action. Health Plan, and state and federal regulators routinely monitor the level, manner, and quality +of Covered Services provided as well as Provider's compliance with this Agreement. If a deficiency is identified, +Health Plan or regulator, in its sole discretion, may choose to issue a corrective action plan. If required by +applicable law, Provider will make commercially reasonable efforts to accept and implement such corrective +MHTHSA050416 +Page 9 of 30 + +Start of Page No. = 10 +action plan. Provider is not entitled to a corrective action plan prior to any termination however, Provider shall +have the right to cure as provided in Section 5.3. +3.8 +Health Plan will: +a. not deny payment for Emergency Services and Emergency Care or Post Stabilization services solely for +failure to provide notice or to obtain coverage verification or prior authorization from Health Plan; +b. not retrospectively deny, for any reason, payment for services rendered by Provider which were previously +authorized, unless false or misleading information was provided upon which authorization was granted; +C. +not unilaterally change, reduce, modify or otherwise adjust downward the reimbursement set out in this +Agreement, +d. not retroactively deny a Claim for Emergency Services and Emergency Care because the condition, which +appeared to be an Emergency Medical Condition under the prudent layperson standard was determined to be a +non-emergency; and +e. conduct audits of paid claims not more than 1 year from the date of payment of the claim. +ARTICLE FOUR - CLAIMS PAYMENT +4.1 +Claims. +a. Provider and Health Plan agree to the billing and payment terms set forth in this section and in accordance +with the applicable Product(s)/Program(s) which covers the Member(s). Provider will submit to Health Plan +Clean Claims for Covered Services rendered to Members, and except as otherwise provided by applicable law +and Health Insurance Marketplace Plans, Provider may make commercially reasonable efforts to submit +claims within the following timeframes: (a) when Health Plan is primary, within one hundred eighty (180) +days following the date of discharge for inpatient services or the date of service for all other services; (b) +when Health Plan is secondary, within one hundred eighty (180) days following the final determination of the +primary insurer; or (c) when Provider is not aware that the patient is a Member, within one hundred eighty +(180) days following the date Provider is provided with information identifying the patient as a Member. +b. Provider may employ or contract with certain Hospital Providers such as emergency room physicians, +pathologists, radiologists, anesthesiologists, certified registered nurse anesthetists and intensivists ("Hospital +Based Providers"). Subject to any legal or administrative restrictions and in accordance with Provider's +policies, procedures and bylaws, Provider agrees to provide Health Plan with information regarding such +Hospital Based Providers clinical privileges at Provider. Reimbursement for professional services rendered to +Members by such Hospital Based Providers is not covered by this Agreement, and shall be billed +independently by such providers. +C. +Notwithstanding any provision in this Agreement to the contrary, Provider may appeal and Health Plan shall +review claims that were totally or partially denied for Provider's failure to (i) provide a notice required by this +Agreement; (ii) follow Health Plan's policies; (iii) determine eligibility; or (iv) obtain an authorization +required by this Agreement, to determine if the services rendered were Covered Services and were Medically +Necessary. If in its evaluation of Provider's reconsideration request, Health Plan reasonably determines that +the services provided by Provider, including but not limited to outpatient diagnostic imaging services, were +Covered Services, were Medically Necessary and appropriate for the Member's condition, then Health Plan +shall reverse its denial and reimburse Provider in accordance with Attachment B within ten (10) days of such +determination. If, in its evaluation of Provider's appeal, Plan reasonably determines that the services in +question were not Covered Services, and/or were not Medically Necessary and appropriate for the Member's +condition, and or would not have been paid even had Provider not failed to comply with Health Plan's +policies, then Health Plan may uphold its denial, subject to Provider's right to pursue whatever additional +remedies may be available to it. +4.2 +Compensation. Health Plan will pay Provider for Clean Claims for Covered Services, that are determined to be +payable, in accordance with Laws, applicable Government Program Requirements, and this Agreement. Health +Plan will make such payment within forty-five (45) days, unless otherwise required by Laws or applicable +Government Program Requirements. Provider agrees to accept such payment, applicable co-payments, +MHTHSA050416 +Page 10 of 30 + +Start of Page No. = 11 +deductibles, and coordination of benefits collections as payment in full for Covered Services. Provider's failure to +comply with the terms of this Agreement may result in non-payment to Provider. Such payment to Provider shall +be in accordance with Attachment B. +4.3 +Co-payments and Deductibles. Provider is responsible for collection of co-payments, co-insurances, and +deductibles, if any. +4.4 +Member Hold Harmless. Provider agrees that in no event, including, but not limited to, non-payment, +insolvency, or breach of this Agreement by Health Plan, will Provider bill, charge, collect a deposit from, seek +remuneration or reimbursement from, or have any recourse against a Member, or person acting on Member's +behalf, for Covered Services provided pursuant to this Agreement. This does not prohibit Provider from collecting +co-insurance, deductibles, or co-payments as specifically provided in the Member's evidence of coverage, or fees +for non-covered health care services provided to Member. This section will survive any termination, regardless of +the reason for the termination, including insolvency of Health Plan. +4.5 +Coordination of Benefits. Health Plan is a secondary payer where another payer is primary payer. Provider will +make reasonable inquiry of Members to learn if Member has health insurance or health benefits other than from +Health Plan, or is entitled to payment by a third party under any other insurance or plan of any type. Provider will +promptly notify Health Plan of said entitlement. In the event a coordination of benefits occurs, Provider will be +compensated in an amount equal to the allowable Clean Claim less the amount paid by other health plans, +insurance carriers, and payers, not to exceed the amount specified in the Compensation Schedule of this +Agreement. +4.6 +Offset Health Plan agrees that recovery of overpayments shall not be taken from future payments unless agreed +by both parties but shall be billed to Provider with appropriate documentation to substantiate such request for +recovery of overpayment. Provider shall have no obligation to refund overpayments after 365 calendar days from +the date the initial claim was paid. +4.7 +Claim Review. Provider acknowledges Health Plan's right to review Provider's claims prior to payment for +appropriateness in accordance with industry standard billing rules, including, but not limited to, current UB +manual and editor, current CPT and HCPCS coding, CMS billing rules, CMS bundling/unbundling rules, National +Correct Coding Initiatives (NCC!) Edits, CMS multiple procedure billing rules, and FDA definitions and +determinations of designated implantable devices and/or implantable orthopedic devices. +4.8 +Claim Auditing. Provider acknowledges Health Plan's right to conduct post-payment billing audits subject to the +terms of this Agreement. Provider will cooperate with Health Plan's audits of claims and payments by providing +access at reasonable times to requested claims information, all supporting medical records, Provider's charging +policies, and other related data. Health Plan will use established industry claims adjudication and clinical +practices, state and federal guidelines, and Health Plan's policies and data to determine the appropriateness of the +billing, coding, and payment. This section will survive any termination. +4.9 +Authorized Services. Health Plan shall provide Provider with a list of services to be authorized, and will provide +updates to the list when changes are made. Once given by Health Plan, authorization for Provider to provide a +Covered Service may not be retracted or rescinded, nor payment subsequently denied or reduced, unless (1) the +authorization was based upon a material misrepresentation or omission about the Member's health condition by +Provider, or (2) the Member's eligibility has terminated before the services were provided by Provider. Health +Plan is responsible for the authorization of medical services provided to Members. If Provider has obtained +concurrent or prior authorization for a Covered Service provided to a Member, Health Plan will not +retrospectively deny payment for such authorized Covered Service, unless Provider's claim and/or medical record +for such services do not support the specific services and/or level of care authorized by Health Plan or in the case +of fraud or misrepresentation. Health Plan shall conduct medical management throughout the course of treatment. +Provider acknowledges that initial and subsequent authorizations shall be obtained as necessary. +4.10 +Network Configuration. Health Plan and Provider acknowledge that the compensation rates applicable to the +Dummy Marketplace Network set forth in Attachment B represent a material discount from typical commercial +rates (the "Marketplace Discount"), are based upon the current Molina Marketplace Network of participating +providers designated in sub-paragraph (a) below, and are provided in exchange for Health Plan's commitment to +encourage Members to use Provider, when appropriate, through a variety of means, including referrals, benefit +designs and medical management processes. +MHTHSA050416 +Page 11 of 30 + +Start of Page No. = 12 +4.11 +Health Plan and Provider agree that Provider shall be a Participating Provider in Health Plan's Company +Marketplace Network. The parties further acknowledge and agree that Health Plan, in its discretion, may modify +the Company Marketplace Network within the Service Area during the term of this Agreement, subject to the +following terms: +a. +Health Plan represents that the acute care hospitals in its Company Marketplace Network +of +participating +providers, or which it intends to include in its Company Marketplace Network of participating providers +("|Company Marketplace Network") within the Service Area will be acute care hospitals owned by Provider and +other independently owned acute care hospitals as follows: +Dummy Hospital 1 +Dummy Hospital 2 +Dummy Hospital 3 +Dummy Hospital 4 +Dummy Hospital 5 +Dummy Hospital 6 +Dummy Hospital 7 +Service Area means the following counties in Texas: Tarrant, Dallas, Denton, Johnson, Ellis and Collin. +b. Following the Effective Date should Health Plan elect to add another acute care hospital to the Company +Marketplace Network in the Service Area that is not affiliated with Provider, Health Plan agrees to provide +Provider with written notice at least one hundred and twenty (120) days prior to the effective date of the +addition. If Health Plan adds an additional acute care hospital, that is not affiliated with Provider, in the +Service Area as a participating provider in its Company Marketplace Network and Provider, in its sole +discretion, determines that such addition will materially reduce the volume of Company Marketplace Network +Members who use Provider and hence, will materially reduce the revenues to be derived from the Agreement, +then within forty-five (45) days following such addition to the Company Marketplace Network, Provider may +give notice to Health Plan that the Marketplace Discount set forth in Attachment B shall be eliminated and the +Alternate Compensation Schedule set forth in Attachment B-1 shall apply to the Company Marketplace +Network. +C. +If +a +new +acute +care +hospital +is added to the Company Marketplace Network in the Service Area pursuant +to +Paragraph 4.9(b) above without the required notice to Provider, upon notice from Provider to Health Plan, +Attachment B-1 shall be retroactively applied as of the date of the addition of the new acute care hospital to +the Company Marketplace Network. +ARTICLE FIVE - TERM AND TERMINATION +5.1 +Term. This Agreement will commence on the Effective Date and will continue in effect through December 31, +2018. +5.2 +Termination without Cause. This Agreement may be terminated without cause at any time by either Party by +giving at least ninety (90) days prior written notice to the other Party. +5.3 +Termination with Cause. In the event of a breach of a material provision of this Agreement, the Party claiming +the breach may give the other Party written notice of termination setting forth the facts underlying its claim that +MHTHSA050416 +Page 12 of 30 + +Start of Page No. = 13 +the other Party breached this Agreement. The Party receiving the notice of termination will have thirty (30) days +from the date of receipt of such notice to remedy or cure the claimed breach to the satisfaction of the other Party. +During this thirty (30) day period, the Parties agree to meet as reasonably necessary and to confer in good faith in +an attempt to resolve the claimed breach. If the Party receiving the notice of termination has not remedied or +cured the breach within such thirty (30) day period, the Party who delivered the notice of termination has the right +to immediately terminate this Agreement. +5.4 +Immediate Termination. Notwithstanding any other provision of this Agreement, this Agreement, may +immediately be terminated upon written notice to the other Party in the event any of the following occurs: +a. Provider's license or any other approvals needed to provide Covered Services is limited, suspended, or +revoked, or disciplinary proceedings are commenced against Provider by applicable regulators and accrediting +agencies; +b. Either Party fails to maintain adequate levels of insurance; +C. Provider has not or is unable to comply with Health Plan's credentialing requirements, including, but not +limited to, having or maintaining credentialing status; +d. Either Party becomes insolvent or files a petition to declare bankruptcy or for reorganization under the +bankruptcy laws of the United States, or a trustee in bankruptcy or receiver for Provider or Health Plan is +appointed by appropriate authority; +e. Health Plan reasonably determines that Provider's facility or equipment is insufficient to provide Covered +Services; +f. +Either Party is excluded from participation in state or federal health care programs; +g. Provider is terminated as a provider by any state or federal health care program; +h. Either Party engages in fraud or deception, or permits fraud or deception by another in connection with each +Party's obligations under this Agreement; or +i. Health Plan reasonably determines that Covered Services are not being properly provided, or arranged for by +Provider, and such failure poses a threat to Members' health and safety. +j. Provider violates any state or federal law, statute, rule, regulation or executive order applicable to +performance of its obligations under this Agreement; or +k. Provider fails to satisfy the terms of a corrective action plan when applicable. +5.5 +Notice to Members. In the event of any termination, Health Plan will give reasonable advance notice to Members +who are currently receiving care in accordance with Laws and applicable Government Program Requirements. +5.6 +Transfer Upon Termination. In the event of any termination, Health Plan may transfer Members to another +provider. +ARTICLE SIX - GENERAL PROVISIONS +6.1 +Indemnification. Each party agrees to indemnify, defend, and hold harmless the other party and its officers, +employees and agents from and against any and all third party liability, loss, claim, damage or expense incurred in +connection with and to the extent of (i) any representation and warranty made by the indemnifying party in this +Agreement, and (ii) claims for damages of any nature whatsoever, arising from either party's performance or +failure to perform its obligations hereunder, including but not limited to claims caused, asserted or commenced by +an individual or agency, arising from benefit coverage disputes or any violation or assertion of any violation of +any anti-trust law, regulation or guideline arising out of or in any way connected with indemnifying party's action +or failure to act. +The obligation to provide indemnification under this Agreement shall be contingent upon the party seeking +indemnification (i) providing the indemnifying party with prompt written notice of any claim for which +indemnification is sought, (ii) allowing the indemnifying party to assume and control the defense and settlement +of such claim, (iii) cooperating fully with the indemnifying party in connection with such defense and settlement +MHTHSA050416 +Page 13 of 30 + +Start of Page No. = 14 +and (iv) not causing or contributing to any occurrence, nor taking any action, or failing to take any action, which +causes, contributes to or increases the indemnifying party's liability hereunder. +Notwithstanding the foregoing subsection (a) this Section shall be null and void to the extent that it is interpreted +to reduce insurance coverage to which either party is otherwise entitled, by way of any exclusion for contractually +assumed liability or otherwise. +Any action by either party must be brought within one year after the cause of action arose. +Regardless of whether there is a total and fundamental breach of this Agreement or whether any remedy provided +in this Agreement fails of its essential purpose, in no event shall either of the parties hereto be liable for any +amounts representing incidental, indirect, consequential, special or punitive damages, whether arising in contract, +tort (including negligence), or otherwise regardless of whether the parties have been advised of the possibility of +such damages, arising in any way out of or relating to this Agreement. +6.2 +Relationship of the Parties. Nothing contained in this Agreement is intended to create, nor will it be construed to +create, any relationship between the Parties other than that of independent parties contracting with each other +solely for the purpose of effectuating this Agreement. This Agreement is not intended to create a relationship of +agency, representation, joint venture, or employment between the Parties. Nothing herein contained will prevent +the Parties from entering into similar arrangements with other parties. Each Party will maintain separate and +independent management and will be responsible for its own operations. Nothing contained in this Agreement is +intended to create, nor will be construed to create, any right in any third party to enforce this Agreement. +References to the rights, responsibilities and obligations of Provider in the Agreement mean individually each of +the entities identified in Attachment E. Notwithstanding anything herein to the contrary, all such rights, +responsibilities and obligations are individual and specific to such facilities and the reference to Provider herein in +no way imposes any cross-guarantees or joint responsibility by, between or among such individual Providers. +Notwithstanding anything herein to the contrary, a breach or default by an individual Provider shall not constitute +a breach or default by any other Provider. The Parties further agree that the responsibilities and obligations of +Provider hereunder shall be the sole responsibility of such individual Provider and not that of the Disclosed +Agent, executing this Agreement on behalf of Provider or any other individual Provider or other affiliate of +Provider. +6.3 +Governing Law. The laws of the State of Texas will govern this Agreement. +6.4 +Entire Agreement. This Agreement, including attachments, addenda, amendments, Supplemental Materials, and +incorporated documents or materials, contains the entire agreement between the Parties relating to the rights +granted and obligations imposed by this Agreement. Any prior agreements, promises, negotiations, or +representations, either oral or written, between the Parties and relating to the subject matter of this Agreement, are +of no force or effect. +6.5 +Severability. If a term, provision, covenant, or condition of this Agreement is held by a court of competent +jurisdiction to be invalid, void, or unenforceable, the remaining provisions will remain in full force and effect and +will in no way be affected, impaired, or invalidated as a result of such decision. +6.6 +Headings and Construction. The headings in this Agreement are for reference purposes only and are not +considered a part of this Agreement in construing or interpreting its provisions. It is the Parties' desire that if a +provision of this Agreement is determined to be ambiguous, then the rule of construction that such provision is +construed against its drafter will not apply to the interpretation of the ambiguous provision. The following rules of +construction apply to this Agreement: (i) the word "day" means calendar day unless otherwise specified; (ii) the +term "business day" means Monday through Friday, except federal holidays; (iii) all words used in this +Agreement will be construed to be of such gender or number as circumstances require; (iv) references to specific +statutes, regulations, rules or forms, such as CMS-1500, include subsequent amendments or successors to them; +and (v) references to any government department or agency include any successor departments or agencies. +6.7 +Non-exclusivity. This Agreement will not be construed to be an exclusive Agreement between the Parties. Nor +will it be deemed to be an Agreement requiring Health Plan to refer Members to Provider. +6.8 +Amendments. +a. +Regulatory Amendments. +MHTHSA050416 +Page 14 of 30 + +Start of Page No. = 15 +This Agreement may be unilaterally amended by Health Plan upon written notice to Provider only in order to +comply with applicable regulatory requirements. Health Plan will provide at least 30 days written notice of +any such regulatory amendment, unless a shorter notice is necessary through no fault of either party in order +to accomplish regulatory compliance only. Upon request by Provider, Health Plan will consult with Provider +regarding the regulatory basis for any regulatory amendment to this Agreement. Notwithstanding the above, +Provider shall not be required to comply with any provision in a Regulatory Amendment that is not +mandatory under state or federal law regardless of any non-mandatory provisions set forth in any Regulatory +Amendment. As used in this provision, "mandatory" means that the state or federal law provision cannot be +waived or altered by contract. +b. +Non-Regulatory Amendments. Notwithstanding the Regulatory Amendments section, all amendments must +be in writing and mutually agreed to by both Parties. +6.9 +Delegation or Subcontract. Upon the Effective Date, Provider will submit to Health Plan a list identifying each +of Provider's Subcontractors and a description of the Covered Services or administrative services that the +Subcontractor provides. After the Effective Date, Provider will not subcontract with a Subcontractor without the +prior written consent of Health Plan. Such arrangement with a Subcontractor will be in writing and will bind +Subcontractor to the terms required by Health Plan. +6.10 +Assignment. Neither party may assign or transfer, in whole or in part, any rights, duties, or obligations under this +Agreement without the prior written consent of the other party. Subject to the foregoing, this Agreement is +binding upon, and inures to the benefit of, the Parties and respective successors in interest and assignees. +6.11 +Dispute Resolution. +a. +Meet and Confer. Any claim or controversy arising out of or in connection with this Agreement will first be +resolved, to the extent possible, via "Meet and Confer". The Meet and Confer will begin when one Party +delivers notice to the other that it intends to arbitrate a dispute and the basis for its belief that it will prevail in +arbitration. After providing notice of the intent to arbitrate, the Meet and Confer will be held as an informal +face-to-face meeting held in good faith between appropriate representatives of the Parties and at least one (1) +person authorized to settle outstanding claims and pending arbitration matters. The Parties will commence the +face-to-face portion of the Meet and Confer within forty-five (45) days of receiving notice of an intent to +arbitrate or service of an arbitration demand. Such face-to-face Meet and Confer discussion will occur at a +time and location agreed to by the Parties (within the forty-five (45) days) and if both Parties agree that more +face-to-face discussions would be beneficial, the Parties can agree to have more than one (1) in person +settlement discussion or a combination of in person, phone meetings and exchange of correspondence. +b. Binding Arbitration. The Parties agree that any dispute not resolved via Meet and Confer will be settled in +binding arbitration administered by Judicial Arbitration and Mediation Services ("JAMS"), or if mutually +agreed upon, pursuant to another agreed upon Alternative Dispute Resolution ("ADR") provider in +accordance with that ADR provider's Commercial Arbitration Rules, in Dallas, Texas. However, matters that +primarily involve Provider's professional competence or conduct i.e., malpractice, professional negligence, or +wrongful death will not be eligible for arbitration. Either party may initiate arbitration proceedings if the Meet +and Confer discussions do not resolve a dispute within sixty (60) days of the notice of intent to arbitrate. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds one million dollars +($1,000,000.00) will be resolved by a panel of three (3) arbitrators. In the event a panel of three (3) arbitrators +will be used, the claimant will select one (1) arbitrator; the respondent will select one (1) arbitrator; and the +two (2) arbitrators selected by the claimant and respondent will select the third arbitrator whose determination +will be final and binding on the Parties. If possible, each arbitrator will be an attorney with at least fifteen (15) +years of experience, including at least five (5) years of experience in managed health care. +Any arbitration in which the total amount disputed by one Party is equal to or exceeds five hundred thousand +dollars ($500,000.00), but less than one million dollars ($1,000,000.00), the claimant and respondent will +each select a single arbitrator and the two (2) arbitrators selected by the claimant and respondent will select a +single arbitrator who will be responsible for the arbitration proceedings ("Selected Arbitrator"). Each Party +can strike no more than one (1) Selected Arbitrator. The Selected Arbitrator will be an attorney with at least +fifteen (15) years of experience, including at least five (5) years of experience in managed health care. +MHTHSA050416 +Page 15 of 30 + +Start of Page No. = 16 +Any arbitration in which the total amount disputed by one Party is less than five hundred thousand dollars +($500,000.00) will be resolved by a single arbitrator. In the event a single arbitrator is used, the arbitrator will +be an attorney with at least fifteen (15) years of experience, including at least five (5) years of experience in +managed health care. +The arbitrator will apply Texas substantive law and Federal substantive law where State law is preempted. +Civil discovery for use in such arbitration may be conducted in accordance with federal rules of civil +procedure and federal evidence code, except where the Parties agree otherwise. The arbitrator selected will +have the power to enforce the rights, remedies, duties, liabilities, and obligations of discovery by the +imposition of the same terms, conditions, and penalties as can be imposed in like circumstances in a civil +action by a court in the same jurisdiction. The provisions of federal rules of civil procedure concerning the +right to discovery and the use of depositions in arbitration are incorporated herein by reference and made +applicable to this Agreement. However, in any arbitration in which the total amount disputed by one Party is +less than one million dollars ($1,000,000.00) the Parties agree that each Party will have the right to take no +more than three (3) depositions of individuals or entities, excluding deposition of expert witnesses, and the +Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the arbitration prior +to the arbitration as deemed appropriate by the arbitrator. The Parties agree that in any arbitration in which the +total amount disputed by one Party is less than five hundred thousand dollars ($500,000.00) each Party will +have the right to take no more than one (1) deposition of individuals or entities and one (1) expert witness, +and the Parties agree to exchange copies of all exhibits and demonstrative evidence to be used at the +arbitration prior to the arbitration as deemed appropriate by the arbitrator. Regardless of the amount in +dispute, rebuttal and impeachment evidence need not be exchanged until presented at the arbitration hearing. +The arbitrator will have no authority to give a remedy or award damages that would not be available to such +prevailing Party in a court of law, nor will the arbitrator have the authority to award punitive damages. The +arbitrator will deliver a written reasoned decision within thirty (30) days of the close of arbitration, unless an +alternate agreement is made during the arbitration. The Parties agree to accept any decision by the arbitrator, +which is grounded in applicable law, as a final determination of the matter in dispute, and judgment on the +award rendered by the arbitrator may be entered in any court having jurisdiction. The award may be reviewed, +vacated, or modified pursuant to the Federal Arbitration Act ("FAA"), 9 USC sections 9-11. +Each Party shall bear its own costs and expenses, including its own attorneys' fees, and shall bear an equal +share of the arbitrator'(s) and administrative fees of arbitration. The parties agree that one or the other may +request a court reporter transcribe the entire proceeding, in which case the parties will split the cost of the +court reporter, but each may elect to purchase or forego purchasing a transcript. +Arbitration must be initiated within one (1) year of the earlier of the date the claim or controversy arose, was +discovered, or should have been discovered with reasonable diligence; otherwise it will be deemed waived. +The use of binding arbitration will not preclude a request for equitable and injunctive relief made to a court of +appropriate jurisdiction. +6.12 +Notice. +a. Delivery. All notices required or permitted by this Agreement will be in writing and will be delivered: (i) in +person; (ii) by U.S. Postal Service ("USPS") registered, certified, or express mail with postage prepaid; (iii) +by overnight courier that guarantees next day delivery; (iv) by facsimile transmission; or (v) by e-mail. Any +notice sent with signature delivery confirmation or return receipt requested, is deemed given on the date of +delivery. If no delivery date is shown, notice is deemed given two (2) business days after the postmark date. +Notice delivered by USPS express mail, or by overnight courier that guarantees next day delivery is deemed +given two (2) business days after delivery of the notice to USPS or the overnight courier. For delivery by +facsimile transmission, the notice is deemed delivered upon confirmation of receipt of the transmission. For +delivery by e-mail, the notice is deemed given on the date sent. All notices are deemed given if delivered as +specified in this section. +b. Names & Addresses. The name, mailing address, e-mail address, and facsimile number set forth under the +Signature Page will be the particular Party's information for delivery of notice. Each Party may change its +information through written notice in compliance with this section without amending this Agreement. +MHTHSA050416 +Page 16 of 30 + +Start of Page No. = 17 +6.13 +Waiver. A failure or delay of a Party to exercise or enforce any provision of this Agreement will not be deemed a +waiver of any right of that Party. Any waiver must be specific, in writing, and executed by the Parties. +6.14 +Execution in Counterparts and Duplicates. This Agreement may be executed in counterparts, each of which +will be deemed an original, but all of which together will constitute one and the same instrument. The Parties +agree facsimile signatures, pdf signatures, photocopied signatures, or signatures scanned and sent via e-mail will +have the same effect as original signatures. +6.15 +Conflict with Health Plan Product. Nothing in this Agreement modifies any benefits, terms, or conditions +contained in the Member's Product. In the event of a conflict between this Agreement and any benefits, terms, or +conditions of a Product, the benefits, terms, and conditions contained in the Member's Product will govern. +6.16 +Force Majeure. Neither Party will be liable or deemed to be in default for any delay or failure to perform any act +under this Agreement resulting directly or indirectly, from acts of God, civil or military authority, acts of a public +enemy, war, accident, fire, explosion, earthquake, flood, strikes by either Party's employees, or any other similar +cause beyond the reasonable control of such Party. +6.17 +Confidentiality. Any information disclosed by either Party in fulfillment of its obligations under this Agreement, +including, but not limited to, health care information, compensation rates, and the terms of the Agreement, will be +kept confidential. Information provided to the other party, including, but not limited to, Member lists, QI +Program, credentialing criteria, compensation rates, and any other administrative protocols or procedures of +Health Plan, is the proprietary property of disclosing party and will be kept confidential. Neither party will +disclose or release such material to a third party without the written consent of the other party. This section will +survive any termination. +6.18 +New Affiliates. +a. New Provider Affiliates. +(i) Health Plan and Provider agree that this Agreement applies to Covered Services rendered at the locations +set forth on Attachment E. In the event Provider or Provider Affiliate (as defined below) organizes or +acquires a new affiliate (either by stock purchase, merger, consolidation, asset purchase or otherwise) +within 100 miles of Collin, Dallas, Denton, Ellis, Johnson and Tarrant counties (the "Service Area") that +offers Covered Services ("New Provider Affiliate") (such organization or acquisition of New Provider +Affiliate described herein shall be considered a "Provider Change Event"), such New Provider Affiliate +shall be added to the Agreement (either through an amendment to the Agreement or by updating the +Provider Location/Networks Attachment, as applicable and as determined by the parties) and considered a +Provider hereunder subject to the terms of this Section 6.18(a), and shall become subject to this +Agreement on the first (1st) day following the Transition Period, as defined below. For the purposes of +this Section 6.18 only, "Provider Affiliate" shall mean any acute care hospital or ambulatory surgery +center directly or indirectly owned or controlled by, or which owns or controls, or which is under +common ownership or control with Provider and which is directly involved in the delivery of health care +services to patients pursuant to this Agreement. +(ii) The parties agree that in the event the New Provider Affiliate is a Participating Provider with Health Plan +pursuant to an existing provider agreement (the "Existing Provider Affiliate Agreement"), Health Plan +and New Provider Affiliate shall continue to be subject to the terms of the Existing Provider Affiliate +Agreement, including reimbursement terms, during the applicable Transition Period (as defined below). +The Parties agree to execute an amendment to add the New Provider Affiliate under this Agreement or +update Attachment E, as applicable and as determined by the Parties, effective as of the first day +following the Transition Period and the New Provider Affiliate shall be reimbursed for services in +accordance with the reimbursement rates set forth in Attachment B and the Existing Provider Affiliate +Agreement shall be deemed to have terminated at that time. +If the New Provider Affiliate was under contract directly with Health Plan or one of Health Plan 's +Affiliates to participate in a network of health care providers immediately preceding the Provider Change +Event, and the New Provider Affiliate does not assume the contract with Health Plan held by the prior +facility operator, or if the New Provider Affiliate is not contracted with Health Plan at the time of +acquisition, the New Provider Affiliate will participate in Health Plan 's network under the terms of this +Agreement. The New Provider Affiliate will be added to this Agreement and the New Provider Affiliate +MHTHSA050416 +Page 17 of 30 + +Start of Page No. = 18 +shall be reimbursed for services in accordance with the then current reimbursement rates set forth in +Attachment B. +(iii) The "Transition Period" shall mean nine (9) months from the day upon which written notice is given by +Provider of the Provider Change Event to Health Plan in accordance with the provisions of Section 6.12. +(iv) If the New Provider Affiliate is not contracted with Health Plan at the time of acquisition, Health Plan and +Provider agree that it is the intent of the parties that all such entities be included in Health Plan's +Networks and as a Provider under this Agreement as of the date the New Provider Affiliate is approved +for participation via Health Plan's credentialing process. +(v) Subject to any applicable confidentiality or non-disclosure restrictions relative to same, Provider shall +exert commercially reasonable efforts to give not less than sixty (60) days' prior written notice to Health +Plan of any Provider Change Event, including the expected effective date of such Provider Change Event, +with respect to any such New Provider Affiliate. +(vi) In the event a Provider is no longer a Provider Affiliate or a facility operated by a Provider Affiliate, this +Agreement shall no longer be applicable to such divested Provider as of the effective date of such +divestiture, unless a longer period is mutually agreed between the divesting Provider and Health Plan. The +failure to give notice under this Section shall not give rise to any claim for injunctive relief related to the +divesture or to damages. +The terms of this Section 6.18(a) shall control over any similar provision of an Existing Provider Affiliate +Agreement. Notwithstanding anything to the contrary, the Parties agree that section 6.18 shall only apply to +New Provider Affiliates physically located in the State of Texas. +b. New Health Plan Affiliates. +(i) Health Plan may extend access to this Agreement and the rates herein to any corporation, partnership or +other legal entity directly or indirectly owned or controlled by, or which owns or controls, or which is +under common ownership or control with Health Plan ("Health Plan Affiliate") that becomes affiliated +with Health Plan on or after the Effective Date of this Agreement that offers Products, subject to the terms +of this provision 6.18(b). +In the event, after the Effective Date of this Agreement, (A) Health Plan organizes or acquires a new +Health Plan Affiliate that offers or administers health benefit products in the Service Area (a "Health Plan +Change Event" and each such new Health Plan Affiliate a "New Health Plan Affiliate"), and (B) such +health benefit products otherwise qualify as a Product, such New Health Plan Affiliate shall become +subject to this Agreement in accordance with the terms of this Section 6.18(b) on the first day following +the Transition Period (as defined below) which shall begin on the date upon which written notice is +provided to Provider in accordance with the provisions of Section 6.12, at the reimbursement rates set +forth in Attachment B. +(ii) In the event the New Health Plan Affiliate is an already-existing health plan and Provider is already a +participating provider in the health benefit products offered by such New Health Plan Affiliate pursuant to +a provider services agreement between Provider and the New Health Plan Affiliate (the "Existing Health +Plan Affiliate Agreement"), then Provider shall continue to participate in such health benefit products +under the terms of the Existing Health Plan Affiliate Agreement during the Transition Period (as defined +in this Section 6.18(b). Following the Transition Period, the New Health Plan Affiliate shall be subject to +the terms of this Agreement and Provider shall be reimbursed for services provided to Covered +Individuals of the New Health Plan Affiliate in accordance with the reimbursement rates set forth in +Attachment B. +(iii) If the New Health Plan Affiliate was under contract directly with Provider or one of Provider's Affiliates +to participate in a network of health care providers maintained by that business immediately preceding the +Health Plan Change Event, and a Health Plan Affiliate does not assume the contract with Provider held by +the prior entity (i.e. it is not assigned as a part of the transaction) or the New Health Plan Affiliate is not +contracted with Provider at the time of acquisition, Provider will participate in the network for Members +of that acquired business under this Agreement at the same contract rates as are applied under this +Agreement. +MHTHSA050416 +Page 18 of 30 + +Start of Page No. = 19 +(iv) Subject to any applicable confidentiality or non-disclosure restrictions relative to same, Health Plan shall +exert commercially reasonable efforts to give not less than sixty (60) days' prior written notice to +Provider of any Health Plan Change Event, including the expected effective date of such Health Plan +Change Event, with respect to any such New Health Plan Affiliate. +(v) The Transition Period shall mean nine (9) months from the day upon which written notice is given by +Health Plan of the Health Plan Change Event to Provider in accordance with the provisions of Section +6.12. Following the Transition Period, a New Health Plan Affiliate that becomes subject to this +Compensation Schedule will be deemed added as a Health Plan Affiliate as of the first day following the +Transition Period. +The terms of this Section 6.18(b) shall control over any similar provision of an Existing Affiliate Agreement. +6.19. +Comply with Laws. Each Party shall comply with applicable Federal Laws. Further, the Parties agree to comply +with applicable State laws as set forth in Attachment C and Attachment D. +MHTHSA050416 +Page 19 of 30 + +Start of Page No. = 20 +ATTACHMENT A +PRODUCTS +1.1 +Health Insurance Marketplace - Company Marketplace. +MHTHSA050416 +Page 20 of 30 + +Start of Page No. = 21 +ATTACHMENT B +Compensation Schedule +Inpatient +Carve-outs. +MHTHSA050416 +Page 21 of 30 + + +-------Table Start-------- +a0ebac72-758a-4492-a0d8-40aa337de32a +[['Service Category', 'Identifier Codes', 'Reimbursement Type', 'Reimbursement 2016 2017', 'Reimbursement 2018'], ["Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or"], ['All IP Admissions', 'Excludes Burn, Transplant, NICU, Vaginal & C-Section Delivery and Normal Newborn Admissions.', 'Base Rate X Current DRG Weights', '168% of Current Year Medicare rate Allowable*', '172% of Current Year Medicare rate Allowable*'], ['Burn Services', 'MS DRG 927-929, 933-935', 'Percent of Billed Charges', '60%', '60%'], ['Transplant Services', 'MS DRG 001-003, 005-010, 014, 016, 017, 652', 'Not Covered under this agreement.', 'Not Covered under this agreement.', 'Not Covered under this agreement.'], ['Vaginal Delivery (includes Well Baby)', 'MS DRG 0767, 0768, 0774, 0775', 'Case Rate (up to 2 days)', '$5,460', '$5,460'], ['C-Section (Includes Well Baby)', 'MS DRG 0765, 0766', 'Case Rate (up to 3 days)', '$8,216', '$8,216'], ['Vaginal Delivery Additional Days', 'MS DRG 0767, 0768, 0774, 0775', 'Per Diem (3 to 999 days)', '$1,872', '$1,872'], ['C-Section Additional Days', 'MS DRG 0765,076', 'Per Diem (4 to 999 days)', '$1,872', '$1,872'], ['Normal Newborn/Boarder Baby', 'Rev Codes 170, 171 or 179', 'Per Diem', '$494', '$494'], ['NICU Level 4', 'Rev Code 174 with MS DRG 789 - 794', 'Per Diem', '$4,420', '$4,420'], ['NICU Level 3', 'Rev Code 173 with MS DRG 789 - 794', 'Per Diem', '$4,420', '$4,420'], ['NICU Level 2', 'Rev Code 172 with MS DRG 789 - 794', 'Per Diem', '$4,420', '$4,420']] + ATTACHMENT B Compensation Schedule +-------Table End-------- + +Start of Page No. = 22 +Provider will be reimbursed in addition to any Per Diem, Case Rate or DRG. +*All Inpatient Services Reimbursed as a percentage of Medicare. Reimbursement for all Medicare Inpatient services +shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the +Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other +naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, +PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with +readmissions in adjudication of claims "Readmission Factor". whether or not an individual hospital is assessed that +penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either +retrospectively or prospectively. These reimbursement rates are not subject to reduction as a consequence of the April +1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare +claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare +payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq. +Inpatient Default Rate: +Covered Services rendered in which there is not a reimbursement amount addressed in Attachment B for Inpatient +Services shall be reimbursed at twenty-five percent (25%) if Facilities allowable billed charge. +Outpatient Default Rate: +Covered Services rendered in which there is not a reimbursement amount addressed for Outpatient Services shall be +reimbursed at twenty-five percent (25%) of Provider's allowable billed charges. +Chargemaster Protection +Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in +excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be +discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in +rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, +if ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821 New rate would equal 48%) +Annual Rate Adjustment +Health Plan will adjust the rates according to Attachment B, Provider Inpatient and Outpatient Reimbursement, on +January 1st, 2018. Provider must receive the new payment Compensation Schedule sixty (60) days prior to the effective +date. +MHTHSA050416 +Page 22 of 30 + + +-------Table Start-------- +9dd40341-42af-4f4e-9372-c0aae78ce78d +[['Trauma Activation', 'Rev Code 681', 'Add-on', '$7,500', '$7,500'], ['Trauma Activation', 'Rev Code 682', 'Add-on', '$5,400', '$5,400'], ['Trauma Activation', 'Rev Code 683', 'Add-on', '$3,700', '$3,700'], ['', '', '', '', '']] + Provider will be reimbursed in addition to any Per Diem, Case Rate or DRG. *All Inpatient Services Reimbursed as a percentage of Medicare. Reimbursement for all Medicare Inpatient services shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with readmissions in adjudication of claims "Readmission Factor". whether or not an individual hospital is assessed that penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either retrospectively or prospectively. These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq. +-------Table End-------- +-------Table Start-------- +f3775ac2-c697-4e6f-aa1e-90a79383aa77 +[['Service Category', 'Identifier Codes', 'Reimbursement Type', 'Reimbursement 2016 2017', 'Reimbursement 2018'], ['All Outpatient Services', None, 'Current Year Medicare Allowable', '168% of Current Year Medicare rate Allowable*', '172% of Current Year Medicare rate Allowable*.']] + Provider will be reimbursed in addition to any Per Diem, Case Rate or DRG. *All Inpatient Services Reimbursed as a percentage of Medicare. Reimbursement for all Medicare Inpatient services shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with readmissions in adjudication of claims "Readmission Factor". whether or not an individual hospital is assessed that penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either retrospectively or prospectively. These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. $1395, et. seq. Inpatient Default Rate: +-------Table End-------- + +Start of Page No. = 23 +ATTACHMENT B-1 +Alternate Compensation Schedule +In the event Health Plan adds additional acute care hospital systems in the Service Area for their Marketplace +product, the compensation detailed in Attachment B will be null and void. All ABC Dallas detailed in Attachment +A will be reimbursed at the rates detailed in Attachment B-1 upon the effective date of any new acute care hospital +system addition. +MHTHSA050416 +Page 23 of 30 + + +-------Table Start-------- +8c919057-bbc6-4125-87b7-160189e166b9 +[['Service Category', 'Identifier Codes', 'Reimbursement Type', 'Reimbursement 2016 -2017', 'Reimbursement 2018'], ["Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or", "Health Plan agrees accordance with the and submitted on a amounts paid or to be (ii) at the amount(s) to compensate Provider Health Insurance Clean Claim, less any paid by other liable detailed below. on a fee-for-service Marketplace Product, that are applicable Member third parties, if any, at the basis for Covered determined by Health co-payments, deductibles, lesser of: (i) Provider's Services provided in Plan to be payable co-insurance, or billed charges; or"], ['All IP Admissions', 'Excludes Burn, Transplant, NICU, Vaginal & C-Section Delivery and Normal Newborn Admissions.', 'Base Rate X Current DRG Weights', '215% of Current Year Medicare rate Allowable*.', '220% of Current Year Medicare rate Allowable*.'], ['Burn Services', 'MS DRG 927-929, 933-935', 'Percent of Billed Charges', '60%', '60%'], ['Transplant Services', 'MS DRG 001-003, 005-010, 014, 016, 017, 652', 'Not Covered under this agreement.', 'Not Covered under this agreement.', 'Not Covered under this agreement.'], ['Vaginal Delivery (includes Well Baby)', 'MS DRG 0767, 0768, 0774, 0775', 'Case Rate (up to 2 days)', '$6,989', '$7,155'], ['C-Section (Includes Well Baby)', 'MS DRG 0765, 0766', 'Case Rate (up to 3 days)', '$10,516', '$10,767'], ['Vaginal Delivery Additional Days', 'MS DRG 0767, 0768, 0774, 0775', 'Per Diem (3 to 999 days)', '$2,396', '$2,453'], ['C-Section Additional Days', 'MS DRG 0765,0766', 'Per Diem (4 to 999 days)', '$2,396', '$2,453'], ['Normal Newborn/Boarder Baby', 'Rev Codes 170, 171 or 179', 'Per Diem', '$632', '$647'], ['NICU Level 4', 'Rev Code 174 with MS DRG 789 - 794', 'Per Diem', '$5,658', '$5,792'], ['NICU Level 3', 'Rev Code 173 with MS DRG 789 - 794', 'Per Diem', '$5,658', '$5,792']] + Alternate Compensation Schedule +-------Table End-------- + +Start of Page No. = 24 +NICU Level 2 +Rev Code 172 with +Per Diem +MS DRG 789 - 794 +$5,658 +$5,792 +Inpatient Carve-outs. +Provider will be reimbursed in addition to any Per Diem, Case Rate or DRG. +*All Inpatient Services Reimbursed as a percentage of Medicare. Reimbursement for all Medicare Inpatient services +shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the +Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other +naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, +PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with +readmissions in adjudication of claims "Readmission Factor", whether or not an individual hospital is assessed that +penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either +retrospectively or prospectively. These reimbursement rates are not subject to reduction as a consequence of the April +1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare +claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare +payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. §1395, et. seq. +Outpatient Default Rate: +Covered Services rendered in which there is not a reimbursement amount addressed in Table 2 for Outpatient Services +shall be reimbursed at twenty-five percent (25%) of Provider's billed charges. +Chargemaster Protection +Provider agrees that if in any given calendar year the aggregate increases of the rates in its ChargeMaster(s) are in +excess of eight percent (8%) of the prior year's rates, then the percentage of charges reimbursement rates will be +discounted so that no higher payment shall be paid by Molina than it would have paid had such percentage increase in +rates above the maximum level set out herein not been implemented. All adjusted rates will be rounded. (For example, +if +ChargeMaster increase is 12% and existing rate is 50%: (1.08/1.12)*.50=.4821. New rate would equal 48%) +Annual Rate Adjustment +Health Plan will adjust the rates according to Attachment B, Provider Inpatient and Outpatient Reimbursement, on +January 1", 2018. Provider must receive the new payment Compensation Schedule sixty (60) days prior to the effective +date. +MHTHSA050416 +Page 24 of 30 + + +-------Table Start-------- +93139151-eb7e-47be-8b49-ba778e371f20 +[['Trauma Activation', 'Rev Code 681', 'Add-on', '$9,600', '$9,828'], ['Trauma Activation', 'Rev Code 682', 'Add-on', '$6,912', '$7,077'], ['Trauma Activation', 'Rev Code 683', 'Add-on', '$4,736', '$4,849'], ['', '', '', '', '']] + Inpatient Carve-outs. Provider will be reimbursed in addition to any Per Diem, Case Rate or DRG. *All Inpatient Services Reimbursed as a percentage of Medicare. Reimbursement for all Medicare Inpatient services shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with readmissions in adjudication of claims "Readmission Factor", whether or not an individual hospital is assessed that penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either retrospectively or prospectively. These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. §1395, et. seq. +-------Table End-------- +-------Table Start-------- + +[['Service Category', 'Identifier Codes', 'Reimbursement Type', 'Accepted 2016 - 2017', '2018'], ['All Outpatient Services', None, 'Current Year Medicare Allowable', '215% of Current Year Medicare rate Allowable*.', '220% of Current Year Medicare rate Allowable*']] + Inpatient Carve-outs. Provider will be reimbursed in addition to any Per Diem, Case Rate or DRG. *All Inpatient Services Reimbursed as a percentage of Medicare. Reimbursement for all Medicare Inpatient services shall be at the applicable percent (%) of the Provider-specific inpatient Rate Sheet rates. These rates shall consist of the Medicare Base DRG Rates, PLUS Disproportionate Share (DSH), PLUS Uncompensated Care payment or other naming convention, PLUS Outlier, PLUS Technology Add-on, PLUS Capital Pass-Through Base, PLUS Capital DSH, PLUS Capital IME, PLUS VBP, and PLUS Readmission Factor. Plan agrees that use of the penalty associated with readmissions in adjudication of claims "Readmission Factor", whether or not an individual hospital is assessed that penalty, precludes Plan from applying any other readmission policies or adjustments to Provider payments either retrospectively or prospectively. These reimbursement rates are not subject to reduction as a consequence of the April 1, 2013 implementation by the Office of Management and Budget of the two percent sequestration to original Medicare claims, or any subsequent continuation or adjustment to sequestration, or any other reduction to original Medicare payments that are not codified in an amendment to the Medicare Act, 42 U.S.C. §1395, et. seq. +-------Table End-------- + +Start of Page No. = 25 +MHTHSA050416 +Page 25 of30 + +Start of Page No. = 26 +ATTACHMENT C +STATE OF TEXAS REQUIRED PROVISIONS +STATE LAWS +This attachment sets forth applicable State Laws or other provisions necessary to reflect compliance with State Laws. This +attachment will be automatically modified to conform to subsequent changes to Law. All provisions of the Agreement not +specifically modified by this attachment remain unchanged and will control. In the event of a conflict between this +attachment and any other provision in the Agreement, the provisions in this attachment will control. Capitalized terms +used in this attachment will have the same meaning ascribed to them in the Agreement unless otherwise set forth in this +attachment. Any purported modification or any provision in this attachment that is inconsistent with Law will not be +effective and will be interpreted in almanner that is consistent with the applicable Law. For the avoidance of doubt, this +attachment does not apply to the Medicare Advantage Product or the Medicare-Medicaid Product to the extent such +Products are preempted by Federal Law. +1.1 +Retaliation. Health Plan may not engage in retaliatory action, including refusal to renew or termination of a +contract, against Provider because Provider has, on behalf of a Member, reasonably filed a complaint against +Health Plan or appealed a decision of Health Plan. +1.2 +Continuity of Care. Unless termination of this Agreement is based upon reasons of medical competence or +professional behavior, Health Plan shall have a continuing obligation to reimburse Provider for the treatment of a +member with special circumstances, as defined in and in accordance with applicable Texas law. +1.3 +Member Notice. Provider shall post in Provider's office a notice to Members on the process for resolving +complaints with Health Plan. Such notice shall include the Texas Department of Insurance's toll-free telephone +number for filing complaints. +1.4 +Podiatry. The following provisions apply to providers credentialed by Health Plan, or Health Plan's designee, as +podiatrists. +a. +Podiatrists may request, and Health Plan will provide not later than the thirtieth (30th) day after the date of the +request, a copy of coding guidelines and payment schedules applicable to the compensation that the podiatrist +will receive under the Agreement. +b. Health Plan may not unilaterally make material retroactive revisions to the coding guidelines and payment +schedules applicable to the compensation that the podiatrist will receive under the Agreement. +c. Podiatrists may, while practicing within the scope of the law regulating podiatry, provide x-rays and non- +prefabricated orthotics covered by a Member's health benefits plan. +1.5 +Capitation. In the event Provider receives capitation, the language required by 28 TAC $11.901(a)(9), and (10) is +incorporated into this Agreement. +1.6 +Availability of Coding Guidelines. Provider may request a description and copy of the coding guidelines, +including any underlying bundling, recoding, or other payment process and fee schedules applicable to specific +procedures that Provider will receive under the Agreement, and Health Plan or its agent shall provide the coding +guidelines and fee schedules not later than thirty (30) days after Health Plan receives the request. Health Plan +shall provide notice of changes to the coding guidelines and fee schedules to Provider not later than ninety (90) +days before the date the changes take effect, unless the change is required by statute or regulation in a shorter +timeframe, and shall not make retroactive revisions to the coding guidelines and fee schedules. Provider may +terminate participation in the product(s)/program(s) that the change in coding guidelines applies to, on or before +the thirtieth (30th) day after the date Provider receives information requested under this section without penalty or +discrimination in participation in other Health Plan products. Any Provider who receives information under this +section may only: (i) use or disclose the information for the purpose of practice management, billing activities, +and other business operations; and (ii) disclose the information to a governmental agency involved in the +regulation of health care or insurance. On Provider's request, Health Plan shall provide the name, edition, and +model version of the software that Health Plan uses to determine bundling and unbundling of claims. +MHTHSA050416 +Page 26 of 30 + +Start of Page No. = 27 +ATTACHMENT D +COMPANY MARKETPLACE +LAWS AND GOVERNMENT PROGRAM REQUIREMENTS +This attachment sets forth applicable Laws and Government Program Requirements or other provisions necessary to +reflect compliance for the Company Marketplace Product. This attachment will be automatically modified to conform to +subsequent changes to Laws or applicable Government Program Requirements. All provisions of the Agreement not +specifically modified by this attachment remain unchanged and will control. In the event of a conflict between this +attachment and any other provision in the Agreement, the provisions in this attachment will control for the Company +Marketplace Product. Capitalized terms used in this attachment will have the same meaning ascribed to them in the +Agreement unless otherwise set forth in this attachment. Any purported modification or any provision in this attachment +that is inconsistent with a Law or applicable Government Program Requirement will not be effective and will be +interpreted in a manner that is consistent with the applicable Law or Government Program Requirement. This attachment +only applies to Company Marketplace Product. +1.1 Definitions. +a. Emergency Care means health care services provided in a hospital emergency facility, freestanding emergency +medical care facility, or comparable emergency facility to evaluate and stabilize medical conditions of a recent +onset and severity, including severe pain, that would lead a prudent layperson possessing an average knowledge +of medicine and health to: believe that the individual's condition, sickness, or injury is of such a nature that +failure to get immediate medical care could: (i) place the individual's health in serious jeopardy; (ii) result in +serious impairment to bodily functions; (iii) result in serious dysfunction of a bodily organ or part; (iv) result in +serious disfigurement; or (v) for a pregnant woman, result in serious jeopardy to the health of the fetus. +1.2 Duplicate Claim Submission. A Provider may not submit a duplicate claim for payment before the forty-sixth +(46th) day after the original claim was submitted. +1.3 +Determination of Claim and Penalties for Late Payment of Claims. Health Plan shall make determinations of +claims and follow the penalties associated for late payment of Clean Claims pursuant to Texas Insurance Code, +Chapter 843, and/or federal law, as applicable. +1.4 +Coordination of Benefits. Provider and Health Plan shall follow the requirements related to coordination of +benefits pursuant to Texas Insurance Code, Chapter 843, and/or federal law, as applicable. +1.5 +Member Hold Harmless. Provider hereby agrees that in no event, including, but not limited to non-payment by the +Health Plan, Health Plan insolvency, or breach of this agreement, will Provider bill, charge, collect a deposit from, +seek compensation, remuneration, or reimbursement from, or have any recourse against subscriber, enrollee, or +persons other than Health Plan acting on their behalf for services provided pursuant to this agreement. This +provision will not prohibit collection of supplemental charges or copayments made in accordance with the terms of +the Agreement between Health Plan and Member. Provider further agrees that: +a. this provision will survive the termination of this agreement regardless of the cause giving rise to termination +and will be construed to be for the benefit of the Health Plan Member; and +b. this provision supersedes any oral or written contrary agreement now existing or hereafter entered into between +Provider and Member, or persons acting on their behalf. Any modification, addition, or deletion to the +provisions of this clause will be effective on a date no earlier than fifteen (15) days after the commissioner has +received written notice of such proposed changes. +1.6 Deductibles and Copayments. Provider may bill a Member for any co-payment, deductible or co-insurance +obligation applicable to Member's Health Plan product. Provider may not waive a deductible or copayment by the +acceptance of an assignment. +MHTHSA050416 +Page 27 of 30 \ No newline at end of file diff --git a/assets/sampleOne/sga_01.pdf b/assets/sampleOne/sga_01.pdf new file mode 100644 index 00000000..28b3a4ff Binary files /dev/null and b/assets/sampleOne/sga_01.pdf differ diff --git a/assets/sampleOne/sga_01.txt b/assets/sampleOne/sga_01.txt new file mode 100644 index 00000000..7f1d9c2e --- /dev/null +++ b/assets/sampleOne/sga_01.txt @@ -0,0 +1,1491 @@ +Document Index +MASTER SERVICES AGREEMENT 1 +GENERAL TERMS AND CONDITIONS 1 +SECTION 1 1SERVICES 1 +SECTION 2 1PAYMENT 1 +2.1 Charges. 1 +SECTION 3 2CHANGES; DELAYS; AND SERVICE CREDITS 2 +SECTION 4 3PROJECT MANAGEMENT 3 +SECTION 5 3ACCEPTANCE 3 +SECTION 6 3WARRANTIES; COMPLIANCE WITH LAW 3 +SECTION 7 4INTELLECTUAL PROPERTY AND CONFIDENTIALITY 4 +SECTION 8 5TERM AND TERMINATION 5 +SECTION 9 5INDEMNITY 5 +SECTION 10 6INSURANCE 6 +SECTION 11 6MISCELLANEOUS 6 +11.16 ACA Coverage. 7 +DISPUTE RESOLUTION ADDENDUM 10 +1 10DISPUTE RESOLUTION 10 +1.1 10Informal Dispute Resolution 10 +1.2 10Litigation 10 +INSURANCE ADDENDUM 11 +EXHIBIT A 12STATEMENT OF WORK NO. 12TO MASTER SERVICES AGREEMENT 12 +IX. ASSUMPTIONS [PLEASE INDICATE ANY ASSUMPTIONS] 13 +PROJECT DELAY ADDENDUM 14 +EXHIBIT B 15 +VENDOR TRAVEL REIMBURSEMENT POLICY 15 +PURPOSE 15 +POLICY 15 +Reimbursable Expenses (require pre-approval by 15XYZ 15and shall not exceed 12% of the specific engagement) 15 +Non-Reimbursable Expenses 15 +Airline Reservations 15 +Lodging 16 +Meals 16 +Transportation 16 +Parking 16 +Rental Car 16 +Tips and Gratuities 16 +Documentation Requirements 16 + + + +Start of Page No. = 1 +MASTER SERVICES AGREEMENT +THIS MASTER SERVICES AGREEMENT (the "Agreement") is made and entered into by and between XYZ +CORPORATION, a Delaware corporation located at 456 Oak Avenue, Greenville, +MO 63105 on behalf and for the benefit of +itself, its subsidiaries and affiliates (" XYZ +") and +Sample Company Name, Inc., +a Delaware Corporation, with its +principal place of business located at 123 Maple Street, Springfield, +Maryland 20850 ("Vendor"), is +effective as of June 13th, 2019 ("Effective Date" +GENERAL TERMS AND CONDITIONS +SECTION 1 +1.3 Non-Exclusivity; Place of Performance. Centene +SERVICES +retains the right at all times to negotiate terms and enter +contracts with any other person or entity for services that +1.1 Description of Services. Vendor shall perform the +are the same or similar to the Services without notice to +services and provide all of the items to be delivered to +Vendor and without incurring any liability by virtue +XYZ +("Deliverables") described in statements of work +thereof, Except as expressly described in an SOW, +(each, a "Statement of Work" or "SOW") in a form +Vendor shall not perform the Services or any portion +substantially similar to that in Exhibit A attached hereto as +thereof, nor send or make available outside the United +well as any Change Order (defined below) (collectively, the +States any Confidential Information (defined below) of +"Services"). The Services described in any SOW may +Centene or individually identifiable information. +also be referred to herein as a "Project." Each SOW and +Change Order executed by both parties is incorporated +SECTION 2 +into this Agreement. If there is a conflict or inconsistency +PAYMENT +between these General Terms and Conditions +(sometimes referred to in this Agreement as the "MSA") +2.1 Charges. +and any SOW or Change Order, these General Terms +and Conditions will prevail unless a single, separate and +(a) In full consideration for Vendor's performance of the +distinct section within the SOW or Change Order (i) is +Services described in an SOW or Change Order, +labeled as the "MSA Override" section, and (ii) expressly +Centene shall pay the charges and expenses expressly +identifies both the provision within these General Terms +described in the Compensation section in such SOW and +and Conditions that is being overridden by the SOW or +Change Order(s) in accordance with this Agreement and +Change Order and the provision within the SOW or +the applicable SOW and Change Order(s) (the +Change Order that will prevail over these General Terms +"Charges"). Vendor is not entitled to any compensation +and Conditions, provided that such modification shall +or remuneration other than the Charges. +apply only to such SOW or Change Order. For the sake +of clarity, if a provision in these General Terms and +(b) For Charges based on units of time (e.g. hourly +Conditions expressly permits the parties to deviate from +charges), Vendor shall implement an automated or +the General Terms and Conditions in an SOW, then such +electronic time-keeping system, reports from which shall +deviation within the SOW must still be described in an +be +accessible +by +XYZ unless otherwise directed by +"MSA Override" section and it must also identify both the +XYZ +including utilization of XYZ's required time- +provision within these General Terms and Conditions that +keeping system as applicable. Prior to the +is being overridden by the SOW or Change Order and the +commencement of Services, the parties shall develop a +provision within the SOW or Change Order that will +single, consolidated exemplary invoice for all Services +prevail over these General Terms and Conditions section +performed under this Agreement. Such invoice serve as +of the SOW. +a +template for all invoices submitted to +XYZ +thereafter and shall include, as applicable and as +1.2 Transition Assistance. Upon XYZ's +request +requested by XYZ: a detailed description of Services +during the Term (defined below) and at any time during +performed, by whom, a contact name and telephone +the first six (6) months following the expiration or +number, the number of hours billed for each Service +termination of this Agreement ("Transition Period"), +charged on an hourly basis and such other detail as +Vendor shall make available to XYZ all Services and +XYZ +may reasonably request. +reasonable assistance necessary for an orderly migration +of the Services (or any portion thereof) to XYZ +or +a +(c) Unless set for otherwise within the "Charges" section +replacement vendor designated by XYZ including +of an SOW, within twenty (20) days after the end of each +providing at no cost or expense to XYZ all XYZ +calendar month Vendor shall submit a single, complete +files in HTML format (or such other mutually agreed +and accurate invoice for all Services performed during the +format) and all data and other property of XYZ +that +just-ended month. In the event XYZ disputes +the +are in the possession of Vendor, its employees, agents +Charges in an invoice in good faith, it shall notify Vendor +and subcontractors. Vendor shall use commercially +of the reasons therefor within twenty (20) days after +reasonable efforts to provide transition assistance +receipt of such invoice, in which case XYZ may +utilizing Vendor personnel then being regularly used to +withhold payment of the invoice and the parties shall +perform the components of the Services being +negotiate in good faith to resolve such dispute as soon as +transitioned. Vendor shall continue to perform all +practicable. If the dispute is not resolved within thirty (30) +Services that are not transitioned in accordance with this +days after notice thereof, either party may initiate Dispute +Agreement. For transition assistance (excluding the +Resolution, as described in the Dispute Resolution +return of XYZ files, data and other property) for which +Addendum. Vendor may not charge XYZ any +there is a predetermined Charge (defined below) in an +additional amounts for Services or Deliverables for which +SOW, such pre-determined Charge shall apply. +an invoice has been rendered, except where a particular +invoice (i) indicates that certain Charges are incapable of +being determined as of the date of such invoice and (ii) +XYZ +MSA - Infinite - v2.0 + +Start of Page No. = 2 +Vendor provides an estimate of such Charges so that +any obligation to agree to such request. Any change in +XYZ +can make appropriate accruals, in which event +the Services or Deliverables and any resultant change to +Vendor may include such Charges on a later invoice. +the Charges shall be specified in a written document +However, under no circumstances shall XYZ be liable +developed by the parties working cooperatively and in +for any Charges presented to XYZ more than ninety +good faith ("Change Order"). Vendor shall be entitled to +(90) days after the date the Charges for the underlying +an additional Charge described in a Change Order only if +Services/Deliverables should have been submitted to +a change required by XYZ would increase Vendor's +XYZ +All payments by XYZ to Vendor pursuant +cost to implement the change or to deliver the Services +to this Agreement are due and payable to Vendor within +and/or Deliverables in accordance with the Change +forty-five (45) calendar days after XYZ's receipt of an +Order, and then the additional Charge must be directly +undisputed invoice. XYZ may withhold from the +and reasonably related to such additional cost incurred by +payment for an invoice any credits or other amounts +Vendor in performing the change. Any change resulting in +Vendor is not entitled to or owes XYZ in connection +a diminution in the volume of Services or the amount of +with this Agreement. +labor required by Vendor to perform the Services shall +result in an equitable diminution in the Charges. Vendor +2,2 Taxes. Vendor agrees to pay and hold XYZ +shall not perform any change contemplated in this +harmless against any tax, penalty, interest or other +paragraph, nor be entitled to any additional compensation +charges that may be levied or assessed as a result of +or remuneration in connection therewith unless such has +Vendor's performance of this Agreement. +been described in a Change Order that has been signed +by representatives of both parties who have apparent +2.3 Records and Audit. Except as expressly provided +authority to bind their respective companies to such +otherwise in this Agreement, until the expiration of seven +Change Order, Notwithstanding anything in this +(7) years after the furnishing of Services hereunder, +Agreement to the contrary and subject to XYZ's +Vendor shall maintain complete and accurate records to +obligation to pay Vendor for the Services and +validate and document Vendor's (i) compliance with this +Deliverables provided until the effective date of +Agreement, (ii) performance of the Services, and (iii) +suspension, XYZ shall have the right, upon written +Charges for Services and/or the Deliverables, all in +notice to Vendor, to suspend in whole or in part the +accordance with generally accepted accounting principles +delivery of any Services or Deliverables, and the parties +consistently applied. Vendor will, upon written request, +shall negotiate in good faith any adjustments in prices or +make available to XYZ and any governmental or +delivery dates necessitated by such suspension. +regulatory authority and any of their duly authorized +representatives, this Agreement and portions of all books, +3.2 Delays. If Vendor has failed or is likely to fail to +documents and records of Vendor that are related to the +provide the Services on time and in the manner required +provision of Services and necessary to verify the +hereunder, Vendor shall, at Vendor's expense, take all +foregoing. Vendor shall also provide reasonable +commercially reasonable steps, which may include the +assistance to XYZ or its designated agent to conduct +provision of additional Vendor personnel, to meet the +audits. Any such audit will be conducted upon +performance requirements (including timelines). Vendor +reasonable notice and during regular business hours, and +will +inform XYZ as early as possible of any +shall be at XYZ's expense, unless such audit reveals +anticipated delays in the Services and of the actions +an overcharge of more than five percent (5%) for the +being taken to ensure completion of the Services in +audited Services and/or Charges, in which event Vendor +accordance with this Agreement. XYZ's acceptance +shall reimburse XYZ the reasonable cost of that +of additional personnel as provided herein shall not be +portion of the audit that revealed the overcharge. All +construed or implied to constitute a waiver of any of +overcharges revealed by any audit hereunder shall be +XYZ's +rights in this Agreement. +promptly +returned +to XYZ Notwithstanding anything +herein to the contrary, any audit shall be subject to the +3.3 Force Majeure. Neither party will be liable for any +following limitations: (i) use of any third party auditor that +default or delay in the performance of its obligations +is a competitor of Vendor shall be subject to Vendor's +under this Agreement if and to the extent such default or +prior written approval, such approval not to be +delay is caused by an event (including fire, flood, +unreasonably withheld or delayed; and (ii) XYZ +or +terrorism, pestilence, earthquake, elements of nature or +any auditor conducting any such audit shall at all times +acts of God, riots, or civil disorders) beyond the +comply with any and all reasonable security and +reasonable control of such party, provided (i) the non- +confidentiality guidelines and other policies of Cognizant +performing party is without fault in causing such default or +with respect to the audit. +delay, (ii) such default or delay could not have been +prevented by reasonable precautions (including the +SECTION 3 +implementation of, and adherence to, a prudent disaster +CHANGES; DELAYS; AND SERVICE CREDITS +recovery and business continuity plan), and (iii) such +default or delay could not reasonably be circumvented by +3.1 Change Orders. +XYZ +may, upon no less than +the non-performing party through the use of alternate +thirty (30) days' advance written notice to Vendor, change +sources, workaround plans or other means. In order to +the volume of the Services. Further, ether party may, at +mitigate the adverse consequences that may result from +any time, request a change in the volume and nature of +a default or delay in Vendor's performance, the parties +the Services and the other party shall consider such +shall incorporate into each SOW, and adhere to, the +request in good faith; however, neither party shall have +attached Project Delay Addendum. +2 +XYZ +MSA - Infinite - v2.0 + +Start of Page No. = 3 +or expense to XYZ work promptly and diligently to +3.4 Service Credits. To the extent described in an SOW, +correct such defect within 20 calendar days of XYZ's +XYZ +may be entitled to credits against the Charges +notice to Vendor of such defect, upon which XYZ +as a result of Vendor's failure to meet service levels in the +shall have 20 more days to test and review the +applicable SOW that are expressly subject to such +Deliverable. The foregoing cycle of delivery, test and, if +credits. Alternatively, XYZ may make a claim +for +applicable, correction shall repeat until the Deliverable +damages against Vendor arising out of Vendor's breach +conforms to its requirements or XYZ cancels the +of this Agreement; provided, however, that if XYZ had +Deliverable, which it may do after three (3) failed attempts +previously received any service level credits as a result of +by Vendor to provide a conforming Deliverable. Unless +such failure, then the amount of damages to which +XYZ notifies Vendor of a defect within the foregoing +XYZ is entitled under its subsequent claim shall be +test periods, the Deliverable shall be deemed to conform +reduced by the amount of any service level credits +to its requirements ("Accepted" or "Acceptance"). +previously accepted by XYZ with respect to such +failure. This right shall not limit any other rights of the +SECTION 6 +parties in this Agreement. +WARRANTIES; COMPLIANCE WITH LAW +SECTION 4 +6.1 Service and Performance Warranty. Vendor +PROJECT MANAGEMENT +represents and warrants that it shall perform the Services +in a timely, competent, workmanlike manner and in +4.1 Vendor Project Personnel. Vendor shall staff each +conformance with the requirements of this Agreement, and +Project with sufficient qualified personnel to complete its +that all Deliverables will conform in all material respects to +obligations hereunder, Each SOW may describe +their documentation, functional specifications and +additional qualifications and background screening +requirements as set forth in the applicable SOW for the +requirements applicable to the Vendor personnel +period of time commencing on the date the applicable +providing the Services in such SOW. Vendor shall +Deliverable is first included in XYZ's production +promptly replace any such individual upon Centene's +environment, and continuing through ninety (90) days +reasonable request and a stated lawful reason, and shall +following the date such Deliverable is first executed in +not otherwise remove, replace or reassign any individuals +XYZ's production environment, provided that in no +identified in the applicable SOW as Key Vendor +event shall the warranty continue for a period of more +Personnel during the lesser of: (a) the time period for +than one (1) year even if such one-year period extends +which such individual is contracted to provide Services in +beyond the expiration or termination of this Agreement (the +the applicable SOW, or (b) twelve (12) months following +"Warranty Period"). In the event the Services or +such person's assignment hereunder, without Centene's +Deliverables do not conform to this warranty, Vendor will, +prior written consent which shall not be unreasonably +at no cost or expense to XYZ promptly correct, re- +withheld or delayed, provided that Vendor reserves the +perform and, as applicable, re-deliver the Services and +right to remove, replace or reassign such personnel for +Deliverables. +reasons of death, disability, failure to perform, promotion, +family considerations analogous to those codified in the +6,2 Infringement Warranty. Vendor represents and +Family and Medical Leave Act (FMLA, U.S. PL 103-3), or +warrants that neither the Services nor any Deliverable will +resignation or termination of employment of any person +infringe a third party's patent or copyright, nor result from +without the consent of XYZ Vendor shall cooperate +the misappropriation of a trade secret. XYZ hereby +with third parties working on XYZ's behalf. +represents and warrants that it has the right to provide +Vendor with any third party software, documentation, +4.2 Project Reports. Unless specified otherwise in the +data, information, instruction, design, technical +applicable SOW or any governance plan between the +specification or other materials provided by XYZ +to +parties, Vendor shall present to XYZ a written status +Vendor hereunder for Vendor's use in providing the +report of the Project and its progress, on a task-by-task +Services and that Vendor's possession, use or +basis, including, without limitation, Vendor hours +modification of any such materials in the performance of +expended if charged on an hourly basis and any +Services as set forth in the applicable SOW will not +impediments to the timely completion of the Project, all +infringe or misappropriate a third party's patent, copyright +sufficiently in advance to permit XYZ to compensate +or trade secret, as the case may be. +for, or work around, such impediment. These reports +shall include any unanticipated issues and +6.3 Mutual Warranties. Each party represents and +recommendations for dealing with such issues. +warrants to the other that: (i) it is validly existing under the +laws of the state of its formation and has the full right, +SECTION 5 +authority, capacity and ability to enter into this Agreement +ACCEPTANCE +and to carry out its obligations hereunder; (ii) this +Agreement is a legal and valid obligation binding upon it +Unless described otherwise in an SOW, XYZ shall +and enforceable according to its terms; and (iii) its +have 30 calendar days from the date a Deliverable is +execution, delivery and performance of this Agreement +delivered to XYZ's test environment to review and +does not conflict with any agreement, instrument or +test it to ensure it conforms to its specifications, +understanding, oral or written, to which it is bound. +documentation and SOW. XYZ shall notify Vendor of +the existence of any defect and Vendor shall, at no cost +3 +XYZ +MSA - Infinite - v2.0 + +Start of Page No. = 4 +6.4 No Other Warranties. Except for the express +Vendor intellectual property that is contained within a +warranties set forth herein, each party disclaims all other +Deliverable. +warranties, express and implied, including warranties of +merchantability and fitness for a particular purpose or any +7.2 Confidential Information. For the purposes of this +representation, warranty, or condition from course of +Agreement, "Confidential Information" means any +dealing or usage of trade. +software, data, business, financial, pricing operational, +customer, source code, methodologies, tools vendor or +6.5 Compliance with Law. Vendor shall comply, and +other information disclosed by one party to the other and +shall provide the Services in compliance with, all federal, +not generally known by or disclosed to the public. +state and local laws, ordinances, regulations and codes +Confidential Information shall include any and all +applicable to Vendor and its performance of the Services +Personal Information, defined as any information that is +including, if applicable and without limitation, HIPAA, the +or includes personally identifiable information. Personal +Foreign Corrupt Practices Act, and their related +Information includes, but is not limited to, name, address +regulations (collectively, "Law"). Vendor agrees to report +and any unique personal identification number. +any violation of Law (including, without limitation, HIPAA +Notwithstanding anything herein to the contrary, +and the FCPA) committed by Vendor, its employees or +Confidential Information shall not include information that +subcontractors in the performance of the Services to +is: (a) already known to or otherwise in the possession of +XYZ's +Ethics Hotline at (800)345-1642 or XYZ's +a party at the time of receipt from the other party, +Ethics +Officer +at +XYZ's +address for notices, +provided such knowledge or possession was not the +result of a violation of any obligation of confidentiality; (b) +SECTION 7 +publicly available or otherwise in the public domain prior +INTELLECTUAL PROPERTY AND CONFIDENTIALITY +to disclosure by a party or subsequently becomes publicly +available through no fault of the receiving party; (c) +7.1 +Intellectual Property. As between Vendor and +rightfully obtained by a party from any third party having a +XYZ +Vendor agrees that all Deliverables [including +right to disclose such information without breach of any +all intermediate versions and all derivatives thereof] shall +confidentiality obligation by such third party; or (d) +be owned exclusively by XYZ in any and all manner +developed by a party independent of any disclosure +or media now known or hereafter devised in perpetuity. +hereunder. +Such ownership shall inure to the benefit of XYZ from +the date of creation or fixation in a tangible medium of +7.3 Confidentiality Obligations. Each party shall maintain +expression, as applicable. XYZ and Vendor +agree +all of the other party's Confidential Information in strict +that all Deliverables shall be considered a "work-made- +confidence and will protect such information with the +for-hire" in favor of XYZ within the meaning of the +same degree of care that such party exercises with its +Copyright Act of 1976, as amended. If and to the extent +own Confidential Information, but in no event less than a +the Deliverables, or any part thereof, is found by a court +reasonable degree of care. If a party suffers any +of competent jurisdiction not to be a "work-made-for-hire" +unauthorized disclosure, loss of, or inability to account for +within the meaning of the Copyright Act of 1976, as +the Confidential Information of the other party, then the +amended, Vendor hereby expressly assigns to XYZ +party to whom such Confidential Information was +all exclusive right, title and interest in and to the +disclosed shall promptly notify and reasonably cooperate +copyright, patent, trademark, trade secret and all other +with the disclosing party and take such actions as may be +proprietary rights in and to the Work Product without +necessary or reasonably requested by the disclosing +further consideration, free from any claim, lien for balance +party to minimize the damage that may result therefrom. +due or rights of retention thereto on the part of Vendor. +Except as provided in this Agreement, a party shall not +Vendor agrees to execute all documents XYZ +use or disclose (or allow the use or disclosure of) any +reasonably requires to perfect such assignment, and in +Confidential Information of the other party without the +the event that Vendor fails to execute such documents for +prior written consent of such party. If a party is legally +any reason, Vendor hereby appoints XYZ as +its +required to disclose the Confidential Information of the +attorney-in-fact for the sole purpose of executing such +other party, the party required to disclose will, as soon as +documents. Vendor shall require its employees and +reasonably practicable, provide the other party with +subcontractors to execute all documents necessary +written notice of the applicable order or subpoena +(including without limitation documents similar to those +creating the obligation to disclose so that such other party +required of Vendor in this paragraph) to enable Vendor to +may seek a protective order or other appropriate remedy. +fulfill its obligations in this paragraph. Notwithstanding +In any event, the party subject to such disclosure +anything herein to the contrary, XYZ acquires +no +obligation will only disclose that Confidential Information +rights in Vendor's intellectual property or other proprietary +which the party is advised by counsel as legally required +works of authorship, preexisting or otherwise, that have +to be disclosed. In addition, such party will exercise +not been created specifically for XYZ hereunder, +reasonable efforts to obtain assurance that confidential +including, without limitation, any derivatives thereof, +treatment will be accorded to such Confidential +which have been or are originated, developed, +Information. Access to and use of any Confidential +purchased, acquired or licensed by Vendor or its +Information shall be restricted to those employees and +affiliates, or by third parties under contract to Vendor or +persons within a party's organization who have a need to +its affiliates; except, however, XYZ is hereby granted +use the information to perform such party's obligations +a perpetual right to use, copy, display and modify any +and enjoy such party's rights under this Agreement and +are subject to a contractual or other obligation to keep +4 +XYZ +MSA - Infinite - v2.0 + +Start of Page No. = 5 +such information confidential. A party's consultants and +breach. In the event XYZ terminates this Agreement +subcontractors are included within the meaning of +or an SOW for an uncured breach and it is later +"persons within a party's organization," provided such +adjudicated that no breach occurred, the termination shall +consultants and subcontractors have executed +be deemed to have been made for convenience. +confidentiality agreement with provisions no less stringent +than those contained in this section. Additionally, +(b) Termination by Vendor. If XYZ fails to pay +XYZ +may, in response to a request, disclose +when due an undisputed invoice, and fails to make such +Vendor's Confidential Information to a regulator or other +payment within thirty (30) days after the date it receives +governmental entity with oversight authority over +written notice of non-payment or if XYZ fails to cure +a +XYZ +provided XYZ (i) first informs Vendor of the +material breach of Section 7.3 (Confidentiality +request, and (ii) requests the recipient to keep such +Obligations) within thirty (30) days after receipt of written +information confidential. In the event the receiving party +notice of such breach, then Vendor may terminate this +has reason to believe that the Confidential Information of +Agreement by sending written notice to XYZ, in which +the disclosing party that was disclosed to the receiving +event the Agreement shall terminate as of the date +party has been used or disclosed in violation of this +specified in the notice of termination. Vendor shall not +Agreement, the receiving party shall immediately notify +terminate this Agreement under any other condition, nor +the disclosing party. +shall Vendor suspend or delay the performance of Services +(including the delivery of a Deliverable under any +7.4 Return of Confidential Information. All of a party's +circumstance, except as requested by XYZ. +Confidential Information disclosed to the other party, and +all copies thereof, are and shall remain the property of the +8.3 Effect of Termination. Upon the termination or +disclosing party. All such Confidential Information and +expiration of this Agreement or any SOW, Vendor shall: +any and all copies and reproductions thereof shall, upon +(a) deliver to XYZ all Deliverables in whatever form or +request of the disclosing party or the expiration or +media they may then exist; (b) document the status of the +termination of this Agreement, be promptly returned to +Services that have been terminated and deliver such +the disclosing party or destroyed (and removed from the +documentation to XYZ; (c) deliver to XYZ all fees +party's computer systems and electronic media) at the +paid by XYZ for Services and Deliverables that remain +disclosing party's direction, except that to the extent any +unperformed or undelivered as of the date of termination as +Confidential Information is contained in a party's backup +well as all XYZ property and materials that are in the +media, databases and email systems, then such party +possession of Vendor, its employees, subcontractors and +shall continue to maintain the confidentiality of such +agents; and (d) provide any transition assistance requested +information and shall destroy it as soon as practicable +by +XYZ in accordance with Section 1. 2 (Transition +and, in any event, no later than required by such party's +Assistance), provided, in the event of Vendor's termination +record retention policy. In the event of any destruction +of the Agreement or an SOW pursuant to Section 8.2(b), +hereunder, the party who destroyed such Confidential +Vendor's obligation to provide transition assistance shall be +Information shall, upon written request, provide to the +conditional on XYZ pre-paying Charges for such +other party written certification of compliance therewith +transition assistance on a monthly basis. The termination +within fifteen (15) days after such request. +or expiration of this Agreement or any SOW for any reason +shall +not +affect +XYZ's or Vendor's rights or obligations +SECTION 8 +for any Services or Deliverables completed and delivered +TERM AND TERMINATION +to +XYZ through the date of termination, and +XYZ +shall promptly pay all amounts (not otherwise disputed in +8.1 Term. This Agreement shall commence on the +good faith) owed to Vendor for such Services and +Effective Date and continue until the later of (i) the third +Deliverables (including work in progress) provided +(3rd) anniversary of the Effective Date, or (ii) the +through the effective date of termination. +completion of all outstanding SOWs (the "Initial Term"). +Thereafter, this Agreement will automatically renew for +8.4 Remedies. Notwithstanding anything in this +one (1) year periods (each, a "Renewal Term" unless +Agreement to the contrary, where a breach of certain +either party gives written notice of its intent not to renew +provisions of this Agreement may cause either party +to the other party at least 120 days prior to the expiration +irreparable injury or may be inadequately compensable in +of the then-existing term. The word "Term" shall mean +monetary damages, either party may obtain equitable +any and all extensions and renewals of this Agreement. +relief in addition to any other remedies which may be +available. The rights and remedies of the parties in this +8.2 +Agreement are not exclusive and are in addition to any +(a) Termination by +XYZ +Unless specified +other rights and remedies available at law or in equity. +otherwise in the MSA Override section of an SOW, +XYZ may terminate this Agreement and any SOW(s) +SECTION 9 +for convenience without cost or penalty at any time upon +INDEMNITY +one hundred and twenty (120) days advance written +notice to Vendor, XYZ may also terminate an SOW +9.1 Infringement Indemnity. +as expressly permitted in such SOW. XYZ may also +terminate this Agreement or any SOW if (i) Vendor fails to +(a) Vendor agrees to defend, indemnify and hold +cure a material breach of this Agreement or such SOW +harmless XYZ, its affiliates and subsidiaries, and their +within 30 days after receipt of written notice of such +officers, directors and employees (collectively, "XYZ +5 +XYZ +MSA - Infinite - v2.0 + +Start of Page No. = 6 +Indemnitees") from and against all damages, reasonable +expenses, and liabilities, including, without limitation, +9.2 General Indemnity. Each party, as an indemnifying +reasonable attorneys' fees, arising out of any claim by a +party, agrees to defend, indemnify and hold harmless the +third party not a wholly-owned affiliate of XYZ that +the +other party and its affiliates, and their respective +Deliverables or Services or any portion thereof, infringe or +directors, officers and employees from and against any +misappropriate any third party trade secret, patent, +unaffiliated third party claim arising out of the negligence, +copyright, trademark or other proprietary or personal right +intentional misconduct or violation of any Law by the +of any person or entity. XYZ agrees to notify Vendor +indemnifying party, its employees, subcontractors and +promptly in writing of any such claim and to cooperate +agents. +with Vendor, at Vendor's expense, by providing such +assistance as is reasonably necessary for the defense of +SECTION 10 +a claim against the XYZ Indemnitees. Vendor's +INSURANCE +obligation to defend, indemnify and hold the XYZ +Indemnitees harmless may be mitigated to the extent +Vendor shall maintain insurance coverage and satisfy the +Vendor has been prejudiced by a failure of XYZ +to +requirements in the Insurance Addendum, attached +provide prompt notice and reasonable cooperation in the +hereto. If Vendor ceases operations or for any other +defense and settlement of such claims. Vendor's +reason terminates such insurance coverage, Vendor shall +settlement of any claim that requires anything more than +obtain coverage for an extended claims reporting period +a monetary payment shall require XYZ's prior written +for no less than two (2) years after the expiration or +approval, which shall not be unreasonably withheld, +termination of this Agreement. +Further, if under this Agreement, Vendor owes or has +paid to XYZ damages in an amount greater than +SECTION 11 +seventy percent (70%) of the maximum liability allowed +MISCELLANEOUS +pursuant to Section 11.18, Limitation of Liability, (the +"Liability Cap") and Vendor does not agree to refresh the +11.1 Use of Name; Publicity. Except for its internal +Liability Cap to its original amount (i.e., meaning that +business use, as required by Law or to comply with the +none of such damages incurred prior to the date of +request of a governmental entity, neither party shall use +Centene's request for Vendor to refresh the Liability Cap +the other party's name, trademarks, service marks, logos +shall, after such refresh, be considered to apply against +or other identifiers (collectively, "Trademarks"), or make +the refreshed Liability Cap) within thirty (30) days after a +any reference to the other party or its Trademarks in any +XYZ +written request to Vendor to refresh the Liability +manner including, without limitation, client lists and press +Cap, +then +XYZ may terminate this Agreement (in +releases without the prior written approval of such other +whole or in part) or any related SOW(s) (in whole or in +party. +part) upon not less than thirty (30) days' prior written +notice to Vendor. +11.2 Notices. Unless otherwise provided herein, any +notice, consent, request, or other communication to be +given under this Agreement will be deemed to have been +(b) If the use of any Deliverable or the Services is +given by either party to the other party upon the date of +enjoined or threatened to be enjoined due to an alleged +receipt, if hand delivered, or two (2) business days after +infringement or misappropriation, Vendor shall, at its +deposit in the U.S. mail if mailed to the other party by +discretion and expense, (i) procure the right for XYZ +registered or certified mail, properly addressed, postage +to continue using such Deliverable or Services, (ii) modify +prepaid, return receipt requested, or one (1) business day +or replace the affected items with functionally equivalent +after deposit with a national overnight courier for next +or better items, or (iii) refund the amount paid by XYZ +business day delivery, or upon the date of electronic +in connection with the affected Deliverables or Services. +confirmation of receipt of a facsimile transmission if followed +This Infringement Indemnity section states Vendor's +by the original copy mailed to the applicable party at its +entire obligation, and XYZ's sole remedy, for a third +address above or other address provided in accordance +party's claim of infringement or misappropriation. +herewith, or upon the date of transmission of electronic +notice to an authorized email address with written +(c) Vendor shall have no obligations under this Section +confirmation of receipt. Either party may change its +9.1 or other liability for any infringement or +address for notices effective three (3) business days after +misappropriation to the extent such infringement or +providing written notice to the other party. All notices to a +misappropriation results from: (i) modifications made +party are to be addressed to the party's General Counsel. +other than by Vendor, its affiliates and their respective +subcontractors, (ii) use of the Deliverables in combination +11.3 Assignment. This Agreement and the duties and +with any equipment, software or material expressly +obligations of Vendor hereunder are of a unique and +prohibited in the applicable SOW, (iii) XYZ's use +or +personal nature and may not be delegated or assigned +incorporation of materials not provided by Vendor, (iv) the +(in whole or in part) by Vendor without XYZ's +prior +instructions, designs or specifications provided by +written consent. Any assignment or delegation made by +XYZ; +(v) any software or other materials furnished to +Vendor without XYZ's written consent is void. The +Vendor +by +XYZ, its affiliates and their respective +provisions of this Agreement are binding upon and inure +subcontractors; or (vi) XYZ's continuing the allegedly +to the benefit of the parties hereto and their respective +infringing activity after Vendor has fulfilled its obligations +permitted successors and assigns. +under Section 1(b). +6 +XYZ +MSA Infinite - v2.0 + +Start of Page No. = 7 +11.4 Amendments and Modifications. No addition to or +11.11 Waiver and Severability. An individual waiver of a +change in the terms of this Agreement will be effective or +breach of any provision of this Agreement requires the +binding on either of the parties unless reduced to writing +consent of the party whose rights are being waived and +and signed by the duly authorized representative of each +such waiver will not constitute a subsequent waiver of +party. Notwithstanding anything to the contrary anywhere +any other breach. If a court of competent jurisdiction +in this Agreement, no terms or conditions related to the +declares any provision of this Agreement invalid or +Services or Deliverables available via click-through or +unenforceable, such judgment shall not invalidate or +similar mechanism, in shrink-wrap or other Deliverable +render unenforceable the remainder of the Agreement, +packaging, or described on XYZ's, Vendor's or a third +provided the basic purposes of this Agreement are +party's website will be binding upon either party. +achieved through the provisions remaining herein. +11.5 Independent Contractor. Vendor is acting as an +11.12 Governing Law. This Agreement will be governed +independent contractor in performing the Services +by and construed in accordance with the laws of the State +hereunder. Nothing contained herein or done in +of Missouri, without regard to any conflict of law +pursuance of this Agreement shall constitute a joint +principles. Any suit or proceeding relating to this +venture, partnership or agency for the other for any +Agreement shall be brought only in the state or federal +purpose or in any sense and neither party shall have the +courts located in Missouri, and each party hereby submits +right to make any warranty or representation to such +to the personal jurisdiction and venue of such courts. +effect or to otherwise bind the other party. +11,13 Equal Opportunity. Vendor and its subcontractors +11.6 Approval of Subcontractors. Vendor shall obtain +shall abide by the requirements of 41 CFR 60-300.5(a) +XYZ's +written consent, which XYZ may withhold +and 60-741.5(a). These regulations prohibit +in its sole discretion, before entering into agreements with +discrimination against qualified individuals on the basis of +a subcontractor (including an independent contractor) for +protected veteran status or disability, and require +the performance of the Services or portion thereof. +affirmative action by covered prime contractors and +XYZ +may, in its sole discretion and upon thirty (30) +subcontractors to employ and advance in employment +days advance notice to Vendor, withdraw its consent for +qualified protected veterans and individuals with +the use of a permitted subcontractor and, in such event, +disabilities. +Vendor must terminate its use of that subcontractor for +the Services as soon as practicable. Vendor shall ensure +11.14 Conflicts of Interest. Vendor shall ensure that its +that any and all subcontractors are insured in accordance +personnel do not have conflicts of interest with respect to +with the Insurance Addendum and Vendor shall be +XYZ +and the Services. "Conflict of Interest" includes +responsible for all acts or omissions of its subcontractors. +activities or relationships with other persons or entities +that may result in a person or entity being unable or +11.7 Nondiscrimination. This Agreement is subject to +potentially unable to render impartial assistance or advice +the affirmative action and nondiscrimination requirements +to +XYZ, or the person's objectivity in performing the +of Executive Order 11246 as amended, Section 503 of +contract work is or may be impaired, or a person has an +the Rehabilitation Act of 1973, and Section 402 of the +unfair competitive advantage. +Vietnam Era Veterans' Readjustment Assistance Act of +1974, and with all rules, regulations, pertaining thereto, +11.15 Litigation Assistance, Vendor shall use +which are incorporated herein by specific reference. +commercially reasonable efforts to make itself and any +subcontractors, employees or agents assisting in the +11.8 Headings; Captions. Section headings are used +performance of its obligations under this Agreement, +for convenience only and shall in no way affect the +available to XYZ at XYZ's cost and expense to +construction or interpretation of this Agreement. +testify as witnesses, or otherwise, in the event of litigation +or administrative proceedings being commenced against +11.9 Counterparts; Time is of the Essence. This +XYZ, +its directors, officers or employees based upon +Agreement, each SOW and Change Order may be +claimed violation of contract or laws, each as related to +executed in counterparts and by facsimile or emailed +this Agreement. +PDF signature, all of which taken together constitute a +single agreement between the parties. Each signed +11.16 ACA Coverage. +counterpart, including a signed counterpart reproduced +(a) Vendor shall offer Affordable Group Health Plan +by reliable means (such as facsimile and emailed PDF), +Coverage to all workers employed through Vendor who +will be considered as legally effective as an original +provide +services +to +XYZ +("Assigned +signature. The parties acknowledge and agree that time +Workers"). "Affordable Group Health Plan Coverage" +is of the essence in this Agreement. +shall mean health insurance benefits offered at a level +and pursuant to terms and conditions (including but not +11.10 Survival. The following sections shall survive the +limited to Vendor contributions towards the cost of such +expiration or termination of this Agreement: Section 1.2 +benefits) to ensure that each Assigned Worker is +(Transition Services), Section 2 (Payment), Section 3,4 +ineligible for an applicable premium tax credit or cost- +(Service Credits), Section 6.1 (Services and Performance +sharing reduction, as defined in Section 4980H of the +Warranty) and Sections 7 to 11. +Internal Revenue Code ("Code"). If any Assigned Worker +is re-characterized by the Internal Revenue Service, +Department of Labor, or a court of law as a common law +7 +XYZ +MSA Infinite - v2.0 + +Start of Page No. = 8 +employee of XYZ and such Assigned Worker enrolls +shall it include contacts initiated by the employee. If a +in a medical plan that constitutes minimum essential +party breaches this Non-Solicitation provision, the +coverage (as defined in Code Section 5000A) provided +breaching party, as its sole liability and as the exclusive +by Vendor for the period beginning on or after January 1, +remedy to the non-breaching party, shall pay +2015, XYZ hereby agrees to pay an additional fee to +compensation to the non-breaching party in the form of +Vendor with respect to such Assigned Worker ("Health +liquidated damages equal to three (3) months of the +Plan Enrollment Fee"), but only insofar as applicable +solicited employee's starting base compensation with the +regulations under Section 4980H of the Code require the +non-breaching party. +imposition of such a fee in order to treat the medical plan +coverage provided by Vendor as being provided on +11.19 Limitation of Liability. NEITHER PARTY'S TOTAL +behalf of XYZ. The amount of any such Health Plan +LIABILITY RELATING TO THIS AGREEMENT SHALL +Enrollment Fee will be determined by XYZ +and +EXCEED THE GREATER OF (a) TWO TIMES THE +Vendor at the time of any such re-characterization, but +AMOUNT OF FEES PAYABLE UNDER THE SERVICES +will not exceed [$0.05] per hour for all hours of work +AGREEMENTS DURING THE TWELVE (12) MONTHS +performed by any such re-characterized Assigned Worker +IMMEDIATELY PRECEDING THE EVENT THAT GAVE +(including hours of work previously performed by the +RISE TO A PARTY'S CLAIM AND (b) TEN MILLION +Assigned Worker and billed to XYZ) during the period +DOLLARS ($10,000,000), NOR SHALL EITHER PARTY +of time for which (i) the Assigned Worker was or is +BE LIABLE TO THE OTHER FOR ANY SPECIAL, +enrolled in Vendor's medical plan and (ii) the Assigned +CONSEQUENTIAL, INCIDENTAL OR EXEMPLARY +Worker was or is characterized as a common law +DAMAGES SUCH AS LOST PROFITS OR LOST +employee of the Company. If applicable, the Health Plan +SAVINGS. The foregoing exclusions and limitations of +Enrollment Fee will appear separately on each invoice +liability do not apply to damages caused by a party's +provided by Vendor to XYZ, +breach of Section 7 (Intellectual Property and +Confidentiality), Section 9 (Indemnity), gross negligence +(b) Vendor represents and warrants to XYZ that +or willful misconduct. Without limiting either party's (a) +Vendor is solely responsible for any assessable payment +responsibility for direct damages or (b) right to claim other +under Section 4980H of the Code assessed against +direct damages, the following damages shall be +Vendor, even if any Assigned Worker is re-characterized +considered as direct damages and shall not be excluded +by the Internal Revenue Service, Department of Labor, or +from liability under this Agreement: (i) reasonable costs +a court of law as a common law employee of XYZ. +incurred by XYZ to correct the Services/Deliverables, +Vendor further represents and warrants to XYZ that +or acquire substitute services, as a result of any uncured +should an assessable payment under Section 4980H of +breach of this Agreement by Vendor and (ii) amounts +the Code be assessed against XYZ due to Vendor's +charged by Vendor to provide transition assistance +failure to offer any Assigned Worker Affordable Group +pursuant to Section 1.2 (Transition Assistance) for a +Health Plan Coverage as required by this agreement, +period of up to ninety (90) days in the event of an +upon notice from XYZ, Vendor shall fully indemnify +uncured material breach of this Agreement by Vendor. +and promptly reimburse XYZ for such assessable +Further, without limiting a party's right to claim (i) other +payment. +expenses are both reasonable and subject to +indemnification hereunder, and/or (ii) additional amounts +11.17 Entire Agreement. This Agreement, its addenda, +for Identity-Related Services (defined below) are +all SOWs, Change Orders and all exhibits and addenda +reasonable, the parties acknowledge and agree that +thereto are incorporated herein and constitute the entire +expenses of not more than $200 for Identity-Related +agreement of the parties. This Agreement supersedes all +Services per affected individual are reasonable, subject +prior and contemporaneous negotiations, representations, +to indemnity if such expenses are incurred in response to +promises, and agreements concerning the subject matter +an Incident and not precluded by the foregoing limitation +herein whether written or oral. +of liability. "Identity-Related Services" means +notification letters, credit monitoring services, identity +11.18 Non-Solicitation. During the term of this +theft insurance, reimbursement for credit freezes, fraud +Agreement and for one (1) year thereafter, neither party +resolution services, identity and credit restoration +shall, without the prior written consent of the other party, +services, toll free information services for affected +which may be withheld at such other party's sole +individuals, and any similar service which corporate +discretion, solicit for hire any person or contractor +entities which create or maintain Protected Health +employed by the other party then or within the preceding +Information make available to impacted individuals in the +twelve (12) months. For this purpose, solicitation does +event of a Breach or alleged Breach regarding such +not include contact resulting from indirect means such as +information. +public advertisement, placement firm searches or similar +means not directed specifically at the employee to which +the employee responds on his or her own initiative, nor +The Services will be in support of one or more of the following (check all that apply): +Exchange (ACA) +Commercial +Duals +Medicare +TRICARE +Medicaid (please list states below AND attach the appropriate Medicaid/Regulatory Addendum) +8 +XYZ MSA - Infinite v2.0 + +Start of Page No. = 9 +Medicaid States: We will support all current and future +XYZ +Medicaid/Medicare States. +Other Government LOBs (please list all businesses below AND attach appropriate compliance addenda) +Other Government LOBs: +Internal/Corporate/Shared Services (e.g. Facilities, ITG, Corporate Vendors) +Will the Vendor have access to Personal Health Information? +Yes +No +If yes, have the parties executed a Business Associate Agreement? +Yes +No +Will the Vendor have access to Personally Identifiable Information (PII) of employees, providers or other non-members? +Yes +No. If yes, attach the PII Addendum to this Agreement or the applicable SOW. +The parties agree that each of the above addenda that is marked for inclusion in this Agreement and attached hereto is +incorporated herein and binding upon them. +IN WITNESS WHEREOF, the parties have caused this Agreement to be executed by their duly authorized representatives as of +the Effective Date. +SAMPLE COMPANY NAME Inc. +XYZ +CORPORATION +By: +By: +Print Name: +Harvey Specter +Print Name: +Luis Litt +Title: +Vice President Procurement XYZ +Title: EVP - Finance & Operations +Date: Jun 21, 2019 +Date: 06/19/2019 +9 +XYZ +MSA - Infinite - v2.0 + +Start of Page No. = 10 +DISPUTE RESOLUTION ADDENDUM +1 +DISPUTE RESOLUTION +Any dispute between the parties arising out of or relating to this Agreement, including with respect to the interpretation of any +provision of this Agreement or with respect to performance by a party, will be resolved as provided in this Dispute Resolution +Addendum (Dispute Resolution). +1.1 +Informal Dispute Resolution +(a) +The parties initially will attempt to resolve any dispute arising out of or relating to this Agreement informally +in accordance with the following: +(i) +Within ten (10) days after a party receives notice of a dispute from the other party ("Dispute +Date"), it will designate a senior representative (i.e., a person whose rank within the company is +superior to, in the case of Vendor, the Client Partner, and in the case of XYZ, the XYZ +Program Manager) who does not devote substantially all of his time to performance under this +Agreement, who will offer to meet with the designated senior representative of the other party for +the purpose of attempting to resolve the dispute amicably. +(ii) +The appointed representatives will meet promptly to discuss the dispute and attempt to resolve it +without the necessity of any formal proceeding. They will meet as often as the parties deem +necessary in order that each party may be fully advised of the other's position. During the course +of +discussion, all reasonable requests made by one party to the other for non-privileged +information reasonably related to the matters in dispute will be honored promptly. +(iii) +The specific format for the discussions will be left to the discretion of the appointed +representatives. +(b) +Formal dispute resolution may be commenced by a party upon the first to occur of any of the following: +(i) +the appointed representatives conclude in good faith that amicable resolution of the dispute +through continued negotiation does not appear likely; +(ii) +thirty-five (35) days have passed from the Dispute Date (this period will be deemed to run +notwithstanding any claim that the process described in this Section 1.1 (Informal Dispute +Resolution) was not followed or completed); or +(iii) +commencement of formal dispute resolution is deemed appropriate by a party to avoid the +expiration of an applicable limitations period or to preserve a superior position with respect +to +other creditors, or a party makes a good faith determination that a breach of this Agreement by +the other party is such that a temporary restraining order or other injunctive or conservatory relief +is necessary. +1.2 +Litigation +For all litigation which may arise with respect this Agreement, the parties irrevocably and unconditionally submit to +the exclusive jurisdiction and venue (and waive any claim of forum non conveniens and any objections as to laying +of venue) of (a) the state court in St. Louis, Missouri with subject matter jurisdiction, or (b) if no such court has +subject matter jurisdiction, to the federal court in St. Louis, Missouri with subject matter jurisdiction in connection +with any action, suit or proceeding arising out of or relating to this Agreement. The parties further consent to the +jurisdiction of any court located within a district that encompasses assets of a party against which a judgment has +been rendered for the enforcement of such judgment or award against the assets of such party. +1.3 +Continued Performance +Each party agrees (a) to continue performing its obligations under this Agreement while a dispute is being resolved +except (and then only) to the extent performance is prevented by the other party or the issue in dispute precludes +performance, and (b) not to take any action that intentionally obstructs, delays, or reduces in any way the +performance of such obligations. For the avoidance of doubt, a good faith dispute regarding invoiced Charges and +XYZ's withholding payment of disputed charges as permitted under this Agreement will not be considered to +prevent Vendor from performing the Services or preclude performance by Vendor, nor will this Section 1.3 be +interpreted to limit either party's right to terminate this Agreement as provided in Section 8 (Term and Termination). +10 +XYZ +MSA - Infinite - v2.0 + +Start of Page No. = 11 +INSURANCE ADDENDUM +1.0 +Prior to the commencement of work, Vendor shall deposit with XYZ's designated representative evidence +of +insurance protection in the form of certificates (ACORD). All insurance policies maintained to provide the coverages +required herein shall be issued by insurance companies authorized to do business in the state in which work is +performed, and by companies rated, at a minimum, "A X" by A.M. Best. Coverages afforded under such policies +are primary as respects XYZ, and any other insurance maintained by XYZ are excess and non-contributing +with the insurance required hereunder. The amounts will not be less than those specified below: +2.0 +Vendor agrees to waive any rights of subrogation that Vendor may have against XYZ under applicable +insurance policies related to the work performed by Vendor. Indemnification by Vendor shall not be limited or +reduced by any insurance coverage limitations. XYZ Corporation and its affiliates and subsidiaries shall be +named as an additional insured on all policies (excluding Workers Compensation) and evidenced on the certificate +of insurance. All certificates of insurance shall provide that the insurer give thirty (30) days' written notice to +XYZ prior to the effective date of expiration, any material change or cancellation. Said notice shall be submitted +to a XYZ Strategic Sourcing representative. +3.0 +Notwithstanding any insurance coverages of Vendor, nothing in this Insurance Addendum shall be deemed to limit +or nullify Vendor's indemnification obligations under the Agreement. Vendor agrees that it shall work solely at +Vendor's risk. +4.0 +Vendor shall make certain that any and all Subcontractors hired by Vendor are insured in accordance with this +Agreement. If any Subcontractor's coverage does not comply with the provisions herein, Vendor shall indemnify +and hold XYZ harmless of and from any and all damage, loss, cost or expense, including attorneys' fees, +incurred by XYZ as a result thereof. +11 +XYZ MSA - Infinite - v2.0 + + +-------Table Start-------- +72fd0968-258d-4172-b3f1-aadab9328a35 +[['Insurance Coverage', 'Limits of Liability'], ['a. Workers Compensation', 'Statutory'], ['b. Employers Liability', '$1,000,000'], ['C. General Liability -coverage', '$1,000,000 per occurrence BI &PD/to be at least as broad as the current $2,000,000 aggregate ISO approved form'], ['d. Professional Liability', "$1,000,000 per claim/ $3,000,000 aggregate This coverage shall be maintained for a minimum of two (2) years following termination or completion of Vendor's work pursuant to the Agreement."], ['e. Automobile Liability - owned, hired and non-owned.', '$1,000,000 Combined Single Limit'], ['f. Privacy Liability and Network Security Insurance', "$3,000,000 per occurrence/$10,000,000 aggregate. This coverage shall be maintained for a minimum of five (5) years following termination of Vendor's work pursuant to the Agreement."]] + Prior to the commencement of work, Vendor shall deposit with XYZ's designated representative evidence of insurance protection in the form of certificates (ACORD). All insurance policies maintained to provide the coverages required herein shall be issued by insurance companies authorized to do business in the state in which work is performed, and by companies rated, at a minimum, "A X" by A.M. Best. Coverages afforded under such policies are primary as respects XYZ, and any other insurance maintained by XYZ are excess and non-contributing with the insurance required hereunder. The amounts will not be less than those specified below: +-------Table End-------- + +Start of Page No. = 12 +EXHIBIT A +STATEMENT OF WORK NO. +TO MASTER SERVICES AGREEMENT +THIS STATEMENT OF WORK ("SOW") is made +20 by and between +("Vendor") and +XYZ +Corporation. (" XYZ "). The parties entered into that certain Master Services Agreement dated +(the +"Agreement"). This SOW is incorporated into and governed by the Agreement. +I. +SUMMARY OF SCOPE OF WORK +Vendor shall provide: +II. +VENDOR'S RESPONSIBILITIES +III. +XYZ's +RESPONSIBILITIES +IV. +VENDOR'S DELIVERABLES +[NEED CLEAR DESCRIPTION OF VENDOR'S DELIVERABLES AND, IF APPROPRIATE, THEIR DUE DATES. +MUST BE CLEAR ENOUGH TO LATER DETERMINE IF VENDOR LIVED UP TO CONTRACTUAL OBLIGATION.] +V. +MILESTONES AND ACCEPTANCE CRITERIA [SPECIFY MILESTONES FOR DELIVERABLES AND ANTIPATED +DATES; PLEASE INDICATE STATUS REPORT CADENCE AND METHOD] +VI. +OUT OF SCOPE [SPECIFY ANYTHING SPECIFICALLY OUT OF SCOPE FOR THIS PROJECT] +VII. +SOW TERM +The Initial Term of this Statement of Work shall be from +until +. +Upon the +expiration of the Initial Term, XYZ shall have the right to renew this Statement of Work at the fees listed, for +consecutive Renewal Terms of twelve (12) months each, not to exceed a maximum of +( +) Renewal +Terms, by giving Vendor written notice of renewal at least thirty, (30) days prior to the expiration of the then-current +term. +OR: +Start Date: +End Date: +VIII. COMPENSATION (Delete the section that doesn't apply) +Fixed Fee: The fixed fee to +XYZ +for the Services in this SOW is: $ +XYZ +shall pay Vendor in accordance with the following fixed fee payment schedule. +or +Time and Materials Fees. +XYZ +shall pay Vendor for the Services in this SOW on an hourly basis at the +hourly rates listed below: +Travel Expenses +12 +XYZ +MSA - Infinite - v2.0 + + +-------Table Start-------- +c3592605-9bb9-40d2-a6de-9178302786c2 +[['Project Task/Milestone', 'Payment Amount'], [None, None], [None, None], ['Grand Total', None]] + XYZ shall pay Vendor in accordance with the following fixed fee payment schedule. +-------Table End-------- +-------Table Start-------- +60397385-c9b2-4d0f-bb85-1b5010296dbc +[['Position or Skill-set', 'Estimated Number of Hours', 'Hourly Fee', 'Total'], [None, None, None, None], [None, None, None, None], [None, None, None, None], ['Grand Total', None, None, None]] + XYZ shall pay Vendor in accordance with the following fixed fee payment schedule. Time and Materials Fees. XYZ shall pay Vendor for the Services in this SOW on an hourly basis at the hourly rates listed below: +-------Table End-------- +-------Table Start-------- +32b45177-29e5-4868-b88d-8de36c39664d +[['Pass-Through Expense', 'Estimated Amount'], ['Travel and lodging', '[To be calculated at 12% of the project fees; if no travel, input "$0"]']] + XYZ shall pay Vendor in accordance with the following fixed fee payment schedule. Time and Materials Fees. XYZ shall pay Vendor for the Services in this SOW on an hourly basis at the hourly rates listed below: Travel Expenses +-------Table End-------- + +Start of Page No. = 13 +IX. ASSUMPTIONS [PLEASE INDICATE ANY ASSUMPTIONS] +The parties' duly authorized representatives have executed this SOW as of the date first written above. +XYZ +CORPORATION +By: +By: +Print Name: +Print Name: +Title: +Title: +XYZ +PO #: +13 +XYZ +MSA - Infinite v2.0 + +Start of Page No. = 14 +PROJECT DELAY ADDENDUM +1. Each party shall designate in writing one individual to serve as its project manager for the services described in +this SOW (hereafter referred to as the "Project"). XYZ hereby designates +(Email: +XXXXXX@XXXX.com) as the XYZ Project Manager and Vendor hereby designates +(Email: +XXXX@XXXXX.com) as the Vendor Project Manager. Upon notice (which may be by email) to the other party's Project +Manager, a party may, in its sole discretion, change its Project Manager unless such change is expressly prohibited by +another provision of the Agreement. +2. Definitions. Capitalized terms used in this Project Delay Addendum shall have the meanings ascribed to them +in the Agreement unless defined otherwise herein. +(a) "Due Date" means the date by which a specific obligation or condition for which Vendor is responsible +pursuant to the Agreement must be satisfied. +(b) +" +XYZ +Issue" means the failure of XYZ to perform, any delay by XYZ in performing, or any +inadequacy in XYZ's +performance of, any +XYZ +obligation. +(c) "Project Delay" means the amount of time Vendor's performance is likely to be delayed as a result of a +Project Problem. +(d) "Project Problem" means any problem or circumstance (including without limitation any XYZ Issue) +encountered or reasonably anticipated by Vendor since the last Project Report, if any, that may cause Vendor to miss a Due +Date. For the avoidance of doubt, Project Problems do not include problems or circumstances with the Project that Vendor +has not encountered or does not reasonably anticipate. +(e) "Project Report" (capitalized or not) means a written notice (which may be delivered via email) from +Vendor +to +the +XYZ +Project Manager that describes (i) a Project Problem, (ii) the estimated length of any Project Delay, +(iii) to the extent reasonably ascertainable at the time of the Project Report's issuance, the cause of any Project Problem +and the specific steps taken or proposed to be taken by Vendor to remedy such Project Problem and, (iv) if any such Project +Problem is caused by a XYZ Issue, any suggested actions to be taken by the parties in order to reduce the impact of the +Project Problem. +3. +In addition to any other project reports required by this SOW, within three (3) business days after +becoming aware of a Project Problem, Vendor shall provide the XYZ Project Manager with a Project Report regarding +such Project Problem. +4. +In the event Vendor fails to describe a Project Problem of which Vendor was aware (an "Unidentified Project +Problem") in a Progress Report and in such manner and at such time as required above, it shall be presumed for purposes +of this SOW that no Project Problem has arisen and Vendor shall not be entitled to rely upon such Unidentified Project +Problem as a purported justification for failing to meet its obligations hereunder. +5. Submission by Vendor of Progress Reports pursuant to the above shall not alter or waive either party's rights +or obligations pursuant to any provision of the Agreement. +14 +XYZ +MSA Infinite v2.0 + +Start of Page No. = 15 +EXHIBIT B +VENDOR TRAVEL REIMBURSEMENT POLICY +PURPOSE +To provide guidance and limits on travel and business related expenses incurred while carrying out necessary authorized +business for XYZ Corporation +POLICY +Reimbursable Expenses (require pre-approval by +XYZ +and shall not exceed 12% of the specific engagement) +Vendors will be reimbursed for the following expenses under the following guidelines: +Airfare (no first class, business class allowed upon pre-approval and requires two week advance booking) +Lodging +Food and beverages (capped per GSA per diem rate) +Ground transportation (taxi, bus, rental car or Uber) +Self-Parking +Tolls +Non-Reimbursable Expenses +Vendors will NOT be reimbursed for the following expenses: +Airline club membership dues +Annual fees for corporate and personal credit cards +Barbers/hairdressers +Car rental upgrades +Car washes +Cell phone accessories (cases, chargers & cords) +Clothing +Corporate card delinquency fees/finance charges +Excess baggage charges +Extra leg room and sear upgrades on aircraft +Health club facilities, saunas and massages +Laundry services +Loss/theft of personal funds or property +Lost baggage +Luggage and briefcases +Magazines, books, newspapers, subscriptions or reading material +Movies (including in-flight and hotel in-house movies) +Optional travel or baggage insurance +Personal accident insurance +Personal entertainment, including sports events +Snacks or other meals outside of breakfast, lunch or dinner +Souvenirs/personal gifts +Spouse/companion travel expenses +Toiletries such as toothpaste, toothbrush, etc. +Traffic fines +Valet-parking +Airline Reservations +Flights are to be booked in coach/economy/discount class +Flights are to be booked 14 days in advance of travel date to obtain the lowest available rate, when applicable. +When a trip is cancelled after the ticket has been issued, the traveler should inquire about using the same +ticket for future travel. +Airline club/membership fees, excess baggage fees, seat upgrades and or movies are not reimbursable. +Personal items lost while traveling on company business are not reimbursable. Airlines are responsible for +retrieving and compensating for lost baggage. +15 +XYZ +MSA Infinite - v2.0 + +Start of Page No. = 16 +Lodging +If a company-negotiated or special hotel rate is not available, travelers must use hotel chains in a similar price +category. +Cancellations should be made as early as possible to avoid a no-show charge, typically before 6pm on the day +prior to arrival. +Meals +Reimbursement will be based on the GSA per diem rate. +Reimbursed meals will be breakfast, lunch and dinner. +Meal costs for social occasions, such as employee birthdays, etc. are not classified as business meals or +entertainment expenses and will not be reimbursed. +Transportation +The most economical mode of transportation should be used to and from airports, bus and rail terminals. +Travelers should consider hotel/airport courtesy shuttle services, and/or taxi. +Parking +Parking fees incurred while on business related travel will be reimbursed if substantiated with receipts. +Valet-parking fees will not be reimbursed. +Intermediate or long-term parking lots should be used at airports. +Rental Car +Travelers should rent a car to their destination when driving is more cost-effective the airline, rail, taxi, +limousine or shuttle service. +Rental car reservations should be made as much in advance of the trip as possible. +Travelers are to rent midsize or smaller vehicles unless there are 3 or more travelers in the group. +Rental cars should be inspected for damage and any damage found should be noted on the contract prior to +acceptance. +Rental cars are to be returned on-time and fully refueled to avoid extra charges. +Gasoline charges on a rental car will be reimbursed with submission of a paid gas receipt and rental car +receipt. +Gasoline is to be filled up prior to return, prepaid gas with rental Car Company will not be reimbursed. +Tips and Gratuities +Tipping a porter, bell staff, driver, housekeeping or waiter should be based on the quality of service rendered. +Lavish or unreasonable gratuities will not be reimbursed. The company will reimburse gratuities based on the +following guidelines: +Bell Staff/Porters - Three dollar maximum. +Door Staff - Two dollar maximum for getting a taxi. +Hotel Shuttle - Two dollar maximum per person. +Housekeeping - Three dollars per night maximum (tip should be left nightly in an envelope designated for +"Housekeeping"). +Room Service - 15-20% of the total bill (only if the hotel did not include a room service charge on the bill). +Bartender/Waiter/Waitress - 15% of the total bill, up to a maximum of 20% for exceptional service. +Documentation Requirements +Employees must provide the following documentation in order to be reimbursed for expenditures: +All expenses of $50.00 or greater must include an image of the receipt that is legible, matches the expense +amount and provides details to support the expense. In the event of a lost receipt, a duplicate should be +obtained from the vendor. If not available, details of the expense and reason for missing receipt are required. +Names of attendees present and their titles in the company. +Name and location of where the meal or event took place. +Amount and date of the expense. +Hotel expenses are to be itemized. +16 +XYZ +MSA Infinite - v2.0 \ No newline at end of file diff --git a/assets/sampleOne/tx_01-66.pdf b/assets/sampleOne/tx_01-66.pdf new file mode 100644 index 00000000..bc28798d Binary files /dev/null and b/assets/sampleOne/tx_01-66.pdf differ diff --git a/assets/sampleOne/tx_01-66.txt b/assets/sampleOne/tx_01-66.txt new file mode 100644 index 00000000..7289e1fc --- /dev/null +++ b/assets/sampleOne/tx_01-66.txt @@ -0,0 +1,109 @@ +Document Index +MANAGED BEHAVIORAL HEALTH PRACTITIONER 1 +FEE FOR SERVICE AGREEMENT 1 +ARTICLE I 1DEFINITIONS 1 + + + +Start of Page No. = 1 +MANAGED BEHAVIORAL HEALTH PRACTITIONER +FEE FOR SERVICE AGREEMENT +THIS +MANAGED +BEHAVIORAL +HEALTH +PRACTITIONER +AGREEMENT +("Agreement") is made and entered into this October 1st 2005 'Effective Date") (to be +completed by ABCD), by and between +Jake Ball +("Practitioner") +(insert contracting Practitioner's name), operating in accordance with the laws of the State, +and Best Healthcare Provider +Services ("ABCD "), a Texas not-for-profit medical corporation +(Practitioner and ABCD to be collectively referred to herein as the "Parties"). +WHEREAS, Practitioner is a behavioral health care practitioner duly licensed under the laws of +the State; and +WHEREAS, ABCD wishes to contract with Practitioner to provide certain Covered Behavioral +Health Services to Covered Persons (as hereinafter defined); and +WHEREAS, Practitioner desires to provide or arrange for the provision of the Covered +Behavioral Health Services specified in this Agreement to Covered Persons for the +consideration, and under the terms and conditions, set forth in this Agreement; and +NOW, THEREFORE, in consideration of the premises and mutual promises herein stated, the +Parties hereby agree as follows: +ARTICLE I +DEFINITIONS +As used in this Agreement and each of its Attachments, each of the following terms (and the +plural thereof, when appropriate) shall have the meaning set forth herein, except where the +context makes it clear that such meaning is not intended. +1.1 +Attachment(s) means any attachments, amendments, exhibits and schedules to this +Agreement, including any Product Attachments, incorporated herein by reference. +1.2 +Clean Claim means an electronic submission that is compliant with the federal standard +transactions provisions of the Health Insurance Portability and Accountability Act of +1996 ("HIPAA"), Pub. L. 104-191, or a CMS 1500 claim form, or its successor, +submitted by Practitioner for Covered Behavioral Health Services provided to a Covered +Person which accurately reflects such information as is required by this Agreement and +the Provider Manual, and which has no defect or impropriety (including any lack of any +required substantiating documentation) or particular circumstance requiring special +treatment that prevents timely payment from being made on the claim. +1.3 +Copayment means the amount (expressed as either a percentage of the cost of a specific +service or a specific dollar amount) that a Covered Person is obligated to pay for a +specific health care service pursuant to his or her Plan. +CONFIDENTIAL & PROPRIETARY +1 +ABCD TX Practitioner Agreement +07/28/06 + +Start of Page No. = 2 +1.4 +Covered Behavioral Health Services means those Medically Necessary health care +services covered under the terms of the applicable Plan, subject to the limitations and +exclusions of such Plan, that Practitioner agrees to provide pursuant to this Agreement +and as described in the relevant Product Attachment. +1.5 +Covered Person means a person entitled under the terms of a Plan to have health care +services provided through Participating Health Care Providers of ABCD +1.6 +DOI, as referenced in this Agreement, means the State Department of Insurance. +1.7 +Emergency Care has, as to each particular Product, the meaning set forth in the Product +Attachment pertaining to each such Product or, if no such meaning is specified in a +Product Attachment, the meaning set forth in the Provider Manual. +1.8 +Medically Necessary means, unless otherwise defined in the applicable Plan, any +behavioral health care services determined by ABCD's medical director or his/her +designee to be required to preserve and maintain a Covered Person's behavioral health, +provided in the most appropriate setting and in a manner consistent with the most +appropriate type, level, and length of service, which can be effectively and safely +provided to the Covered Person, as determined by acceptable standards of behavioral +health care practice and not solely for the convenience of the Covered Person, his/her +Practitioner, or other health care provider. A determination that a service is Medically +Necessary does not mean that a particular service is a Covered Service if the service is +otherwise excluded under the Covered Person's Plan. +1.9 +Negotiated Payments means the amount designated as the maximum amount payable by +ABCD to Practitioner for any particular Covered Service provided to any particular +Covered Person, pursuant to this Agreement or its Attachments for Covered Behavioral +Health Services. +1.10 +Participating Health Care Provider means any physician, hospital, skilled nursing +facility, home health agency, or other health care provider, including institutional +providers and ancillary services providers, and also Practitioner, which has contracted +with, or on whose behalf a contract has been entered into with, ABCD to participate in +one or more Products. +1.11 +Plan a health benefits plan, or federal or State health benefits program, with which +ABCD has contracted to provide or arrange the Covered Behavioral Services +contemplated by this Agreement. +1.12 Preauthorization means verbal or written approval by ABCD, Plan, or other authorized +person or entity, including a corresponding approval number obtained prior to admitting +a Covered Person to a behavioral health care facility or to providing certain other +Covered Behavioral Health Services to a Covered Person, when approval is required +under the utilization management program of the applicable Plan. +CONFIDENTIAL & PROPRIETARY +2 +ABCD TX Practitioner Agreement +07/28/06 \ No newline at end of file diff --git a/assets/sampleOne/tx_06-03.pdf b/assets/sampleOne/tx_06-03.pdf new file mode 100644 index 00000000..50373db7 Binary files /dev/null and b/assets/sampleOne/tx_06-03.pdf differ diff --git a/assets/sampleOne/tx_06-03.txt b/assets/sampleOne/tx_06-03.txt new file mode 100644 index 00000000..c986e474 --- /dev/null +++ b/assets/sampleOne/tx_06-03.txt @@ -0,0 +1,57 @@ +Document Index +JOINDER AGREEMENT 1 + + + +Start of Page No. = 1 +JOINDER AGREEMENT +This Joinder Agreement (this "Joinder Agreement") is made and entered into as of 09/01/2017 by +and +between Tess Goveler ("Provider"), Best Healthcare Provider Services ("ABCD "), a Texas non-profit health +corporation, and Second Provider, Inc. ("Superior"). +WHEREAS, Provider has entered into a certain Managed Behavioral Health Practitioner Agreement by and +among Provider and ABCD (the "Provider Agreement"); +WHEREAS, Provider and ABCD desire for Superior, an affiliate of ABCD , to become a party to the Provider +Agreement such that Provider will become a participating provider in the HMO network of Superior; +WHEREAS, Superior has agreed to execute this Joinder Agreement to evidence its agreement to comply +with all terms and conditions of the Provider Agreement in the same manner as ABCD ; and +WHEREAS, capitalized terms used but not defined herein shall have the meanings assigned to them in the +Provider Agreement. +NOW, THEREFORE in consideration of the above premises the parties hereto agree as follows: +1. +As of the date hereof, Superior hereby agrees to become a party to and to be bound by all of the terms +and conditions of the Provider Agreement, as amended, such that the rights and obligations that accrue +to ABCD shall also accrue separately to Superior. This Joinder Agreement may be attached to the +Provider Agreement to evidence Superior's participation in the Provider Agreement. +2. +This Joinder Agreement shall be binding upon the parties hereto, including Superior and its successors, +legal representatives and assigns. This Agreement does not impose any cross-guarantees or joint +responsibilities or liabilities between Superior and ABCD . A breach or default by Superior or ABCD shall +not be considered a breach or default by the other. +3. This Joinder Agreement may be executed in multiple counterparts, each of which shall be deemed an +original, and all of which shall constitute one and the same instrument. +[SIGNATURE BLOCK FOLLOWS] +PPA_TX_Mar2016 +Page 1 of 2 + +Start of Page No. = 2 +IN WITNESS WHEREOF, this Joinder Agreement has been executed and delivered by the parties as of the +date first above written. +Tess Goveler +By: Paintle +Name: Tess Goveler +Title: LPC +Tax ID: 12-3456789 +Best Healthcare Provide Services +By: +Smith +Faizan Peter +Name: +Title: Chief Operating Officer +Second Provider, +Inc. +By: Smith +Name: Michael Scott +Title: SVP +PPA_TX_Mar2016 +Page 2 of 2 \ No newline at end of file diff --git a/assets/sampleOne/tx_74-28.pdf b/assets/sampleOne/tx_74-28.pdf new file mode 100644 index 00000000..30f647ef Binary files /dev/null and b/assets/sampleOne/tx_74-28.pdf differ diff --git a/assets/sampleOne/tx_74-28.txt b/assets/sampleOne/tx_74-28.txt new file mode 100644 index 00000000..4d03b4c9 --- /dev/null +++ b/assets/sampleOne/tx_74-28.txt @@ -0,0 +1,182 @@ +Document Index +COLLABORATIVE CLINICAL ENGAGEMENT 1INCENTIVE PROGRAM EXHIBIT 1 +4. Collaborative Clinical Engagement Bonus. 2 +PROVIDER: DUMMY PHYSICIANS ALLIANCE 3 +COLLABORATIVE CLINICAL ENGAGEMENT 4INCENTIVE PROGRAM EXHIBIT 4 +SCHEDULE A 4 + + + +Start of Page No. = 1 +COLLABORATIVE CLINICAL ENGAGEMENT +INCENTIVE PROGRAM EXHIBIT +This Collaborative Clinical Engagement Incentive Program Exhibit (this "Exhibit") to the Value Based Program +Addendum is effective as of +9/1/2020 +("Exhibit Effective Date"). +Provider shall be eligible for a population health management stipend ("Collaborative Clinical Engagement Bonus") +under the Collaborative Clinical Engagement Incentive Program ("CCE") and under the terms and conditions as set +forth herein for actively engaging with Health Plan and achieving performance improvements for a selected quality +based measure as set forth below in Table 1. The parties to this Exhibit agree and acknowledge that compensation +paid to Provider under this Program is not intended to and does not provide incentives to Provider or the Practitioners +(as defined herein) to deny, limit, reduce or discontinue medically appropriate Covered Services to any Covered +Person. +1. Definitions. The following definitions shall apply for the purposes of this Exhibit. Capitalized terms not defined +in this Exhibit shall have the meanings ascribed to them in the Agreement. +a. "Assigned Covered Person" means a Covered Person who is assigned on an exclusive basis to a Practitioner +by Health Plan, who is not excluded from the CCE by Plan and is eligible to receive Covered Services through +MCO in the following MCO Products: STAR, CHIP, STAR+PLUS (non-duals), STAR+PLUS MMP, STAR +Health, STAR Kids and Medicare Advantage (D-SNP and MA-PD). +b. "Contract Year" means each twelve (12) month period during the term of this Exhibit beginning as of the +CCE Effective Date. +C. +"Incentive Payment" means any payment by Plan to Provider that does not constitute a payment of claims +for Covered Services provided to Covered Persons. +d. +"Practitioner" means a licensed health care professional who is an employee or contractor of Provider and +who is a Participating Provider under the Agreement. +2. +Collaborative Clinical Engagement Services. Provider or Practitioner, as applicable, shall perform the selected +services defined in Schedule A ("Engagement Activity") of this Exhibit for Assigned Covered Persons +("Collaborative Clinical Engagement Services"). +3. Eligibility for Collaborative Clinical Engagement Bonus. +a. Eligibility Criteria for Collaborative Clinical Engagement Bonus. Provider shall be eligible for a +Collaborative Clinical Engagement Bonus if: (1) at least ninety percent (90%) of the Practitioners' panels are +open for Covered Persons at all times during the then-current Contract Year; (2) Provider is participating in +the Plan's value based shared savings program during the then-current Contract Year; (3) Provider provides +population health management services to Covered Persons; (4) Provider select a quality measure and +engagement frequency goal (e.g. 80% of 26 meetings per 12 month period - Provider schedules/participates +in bi-weekly meetings with Plan's engagement teams to address collaboration goals, care coordination and +outcome measures); and (5) meets all other thresholds and requirements set forth in this Exhibit and the +Agreement. +b. Disciplinary Action. If any Practitioner has been identified for quality-related remediation or disciplinary +action, Plan reserves the right in its sole discretion to withhold, and to cause Provider to forfeit, any amount +that would otherwise have been payable as a Collaborative Clinical Engagement Bonus hereunder +attributable to that Practitioner. +PPA_TX_Jan2018 +Page 1 of 5 + +Start of Page No. = 2 +4. Collaborative Clinical Engagement Bonus. +PMPM. As compensation for Collaborative Clinical Engagement Services furnished by Provider hereunder, Plan +shall pay Provider a Collaborative Clinical Engagement Bonus in the total amount of: +$2.00 per Assigned Covered Person per month (itemized below) +a. Engagement Activity. One dollar ($1.00) per Assigned Covered Person per month +a. Provider must meet with Plan engagement staff the agreed upon engagement frequency Provider +selects in Schedule A. +b. PMPM paid to Provider by the 15th of each month during each Contract Year +b. Quality Measure Outcomes. One dollar ($1.00) per Assigned Covered Person per month +a. Provider must meet the quality measure goal for the agreed upon quality measure Provider selects +in Schedule A. +b. PMPM paid to Provider at the end of the Contract Year +c. Bonus Offset. CCE Bonus paid under this Exhibit will be deducted from incentives paid under the +Provider's Value Based Program Addendum for the Contract Year in which the Exhibit terms, if +applicable. +d. Repayment. No later than 120 days after the end of each Contract Year, Plan shall calculate the +compliance rate for the provider selected Engagement Activity and Quality Measure. Please see +additional calculation information in Schedule A. attached hereto and incorporated herein. If the +provider selected target compliance percentage for Engagement Activity is less than or equal to 75% of +the required goal for the Contract Year, Provider shall repay Plan fifty percent (50%) of the Collaborative +Clinical Engagement Bonus paid for the applicable Contract Year. Such repayment shall be in the form +of, at Plan's option, a recoupment from any incentive payment or combination thereof, or an offset of +future bonus payments payable in connection with any subsequent Contract Year. Plan shall be solely +responsible for the methodology used, and the final calculation indicated above. +5. Term and Termination. The term of this Exhibit is 12 months beginning the first day of the month after the +Provider agrees through the execution of this exhibit to participate in the Collaborative Clinical Engagement +Program. Either party may terminate participation of Provider and the Practitioners in the Collaborative Clinical +Engagement Program for any reason prior to the expiration or termination of the Agreement upon ninety (90) +days prior written notice to the other party. In the event of such termination, or any termination of the Agreement, +Provider shall not be eligible for payment of any unpaid Collaborative Clinical Engagement Bonus corresponding +to the Contract Year in which such termination is effective, and this Exhibit and the Collaborative Clinical +Engagement Program will be of no further force and effect. +6. Modifications. Plan reserves the right to amend the terms and conditions of this Exhibit, unilaterally upon thirty +(30) days prior notice to Provider. If changing only Schedule A, Health Plan agrees to provide the revised +Schedule A to Provider no less than thirty (30) days prior to the start of the Contract Year. +7. Regulatory Requirements. Provider agrees that, in connection with any Medicare and Medicaid products, +Provider shall and shall prohibit the Practitioners and other persons under contract with Provider from claiming +payment in any form directly or indirectly from a federal health care program (as that term is defined in Section +1128B(f) of the Social Security Act, 42 U.S.C. 1320a-7b(f)) for items or services covered under this Agreement. +Provider and each Practitioner acknowledge and agree (i) that it, he or she has not given or received remuneration +in return for or to induce the provision or acceptance of business (other than business covered by this Agreement) +for which payment may be made in whole or in part by a federal health care program on a fee-for-service or cost +basis; and (ii) that it, he or she will not shift the financial burden of this Agreement to the extent that increased +payments are claimed from a federal health care program. +PPA_TX_Jan2018 +Page 2 of 5 + +Start of Page No. = 3 +Funds distributed by Plan to Provider under this Exhibit during each Contract Year, combined with all other +Incentive Payments made to Provider by Plan during such Contract Year, may not exceed thirty-three percent +(33%) of total claims payments made by Plan to Provider during such Contract Year. Limitations to Incentive +Payments for provider to remain under the 33% threshold shall be made in the sole discretion of Plan. +IN WITNESS WHEREOF, the parties hereto have executed this Addendum including Schedule A, effective as of the +date first above written. +SHP: XYZ HEALTH PLAN Inc. +PROVIDER: DUMMY PHYSICIANS ALLIANCE +Authorized Signature +Authorized Signature +Paunth +Smith +- +Printed Name: Harvey Specter +Printed Name: Luis Litt +Title: President & CEO +Title: +President +Signature Date: 09/16/2020 +Signature Date: +8/26/2020 +TIN: 12-3456789 +PPA_TX_Jan2018 +Page 3 of 5 + +This page has 2 signature. + +Start of Page No. = 4 +COLLABORATIVE CLINICAL ENGAGEMENT +INCENTIVE PROGRAM EXHIBIT +SCHEDULE A +A. +Collaborative Clinical Engagement Services may include, but are not limited to: +Collaborate with Plan to assess current population health practices. +Provide care coordination services to Covered Persons. +Agree to meet with Plan engagement team on a regularly scheduled basis to evaluate Quality Measure +performance, collaboration opportunities and population health best practices. +Assist Health Plan with the collection of HEDIS data via medical record information. +Provide regular reports regarding activities and outreach to Covered Persons. +Choose one Quality Measure set forth below in Table 1, to be evaluated for the quality bonus. +Table 1. +B. +Due to the constraints of COVID-19, virtual visits using a technology platform will substitute for in-person +visits through December 31st, 2020, The necessity for virtual visits will be monitored on a monthly basis +through the term of this agreement and conclude when deemed safe by the Centers of Disease Control, HHSC +or Plan. +Choose one engagement goal set forth below in Table 2, to be evaluated for the Engagement Activity bonus. +PPA TX Jan2018 +Page 4 of 5 + + +-------Table Start-------- +d9a31643-2162-4bfc-8825-3bb1735b1814 +[['Quality Measure', 'Goal (Completion Rate = Network Average)', 'Requirement', 'Measurement', 'Provider Selection (Initial 1 Box)'], ['Chronic Care Visits', '89.35% (Completion Rate)', 'Coordinate care for this patient population by ensuring 3 or more visits are completed with a qualified physician', "Percent of the provider's panel with one or more dominant chronic conditions that have three or more qualified physician visits", None], ['Well Visit for Infant', '67.46% (Completion Rate)', 'Schedule the patient with this care gap for a visit with their PCP and complete the wellness visit', "Percent of provider's eligible panel that received 6 or more pediatric well- visits for infants from birth to 15 months", None], ['Well Visit for Child 3 to 6 Years of Age', '71.08% (Completion Rate)', 'Schedule the patient with this care gap for a visit with their PCP and complete the wellness visit', "Percent of provider's eligible panel (children aged 3 to 6 years) that received at least 1 pediatric well-visit within the 12 rolling month period", None], ['Post-Discharge Follow-Up', '76.07% (Completion Rate)', 'Schedule the patient a follow up visit with their PCP within 30 days (preferably within 7 days) after discharge from an inpatient stay', "Percent of the provider's panel that visited a physician office within 30 days post-discharge", None], ['PCP Visit', '82.05% (Completion Rate)', 'Ensure patients have at least 1 visit to their assigned PCP annually', "Percent of the provider's panel visiting a Primary Care Provider", None], ['Generic Rx', '80.86% (Completion Rate)', 'When appropriate and available, prescribe a generic drug', "Percent difference between a physician's expected generic prescription rate and current actual rate of generic drug prescriptions (from all physicians seen by the members)", None], ['Manage PHN and EHN Member Lists', '90.00% (Outreach Success Rate for Compliant Members - Minimum 2 Outreach calls per attempt)', 'Review a list of EHN an PHN members; outreach to these members once a month', "Percent of provider's eligible panel placed on a care management plan with a successful outreach (if outreach was not successful, 2 attempts must be made per call as determined by care management plan (if 0 successful outreaches are made in a quarter, then member will be deemed ineligible for the measure)", None], ['Colorectal Cancer Screening', '10,73% (Completion Rate)', 'Review the care gap with your patient and assist in coordinating care; ensure completion of screening', "Percent of provider's eligible panel that received colorectal cancer screening (colonoscopy-centric) within the 12 rolling month period", None], ['Breast Cancer Screening', '51.39% (Completion Rate)', 'Review the care gap with your patient and assist in coordinating care; ensure completion of screening', "Percent of provider's eligible panel that received a mammogram within the 12 rolling month period", None]] + Table 1. B. Due to the constraints of COVID-19, virtual visits using a technology platform will substitute for in-person visits through December 31st, 2020, The necessity for virtual visits will be monitored on a monthly basis through the term of this agreement and conclude when deemed safe by the Centers of Disease Control, HHSC or Plan. +-------Table End-------- + +Start of Page No. = 5 +Table 2. +PPA_TX_Jan2018 +Page 5 of 5 + + +-------Table Start-------- +23bbd93b-ece1-4dff-8f19-53b739cd168e +[['Required Engagement Frequency', 'Engagement Percentage Goal', 'Time Requirement', 'Provider Selection (Initial 1 Box)'], ['Virtual visits once a month with weekly calls', '90% Visit Compliance 80% Call Compliance', 'Quarter day (2 hours) observation and half day (4 hours) strategic planning', '8th'], ['Virtual visits twice a month with weekly calls', '80% Visit Compliance 80% Call Compliance', 'Quarter day (2 hours) observation and half day (4 hours) strategic planning', None], ['Bi-monthly virtual visits with 2 calls a week (weekly planning and status)', '100% Visit Compliance 85% Call Compliance', 'Half day (4 hours) observation and half day (4 hours) strategic planning', None]] + Table 2. +-------Table End-------- + +Start of Page No. = 6 +Signature: +That +Signature: +Email: dummy.email@company.com +Email: replacement.email@company.com \ No newline at end of file diff --git a/assets/sampleOne/tx_76-06.Pdf b/assets/sampleOne/tx_76-06.Pdf new file mode 100644 index 00000000..32c5945f Binary files /dev/null and b/assets/sampleOne/tx_76-06.Pdf differ diff --git a/assets/sampleOne/tx_76-06.txt b/assets/sampleOne/tx_76-06.txt new file mode 100644 index 00000000..0d6043c3 --- /dev/null +++ b/assets/sampleOne/tx_76-06.txt @@ -0,0 +1,110 @@ +Document Index +PARTICIPATING PROVIDER AGREEMENT 1 +ARTICLE - DEFINITIONS 1 + + + +Start of Page No. = 1 +PARTICIPATING PROVIDER AGREEMENT +This Participating Provider Agreement (together with all Attachments and amendments, this "Agreement") +is made and entered by and between BEST HEALTHCARE PROVIDER ("Provider") and SUFFOLK HealthPlan, Inc. +("Health Plan" or "MCO") (each a "Party" and collectively the "Parties"). This Agreement is effective as of the +date designated by Health Plan on the signature page of this Agreement ("Effective Date"). +WHEREAS, Provider desires to provide certain health care services to individuals in products offered by or +available from or through a Company or Payor (as hereafter defined), and Provider desires to participate in such +products as a Participating Provider (as defined herein), all as hereinafter set forth. +WHEREAS, Health Plan desires for Provider to provide such health care services to individuals in such +products, and Health Plan desires to have Provider participate in certain of such products as a Participating Provider, +all as hereinafter set forth. +NOW, THEREFORE, in consideration of the recitals and mutual promises herein stated, the Parties hereby +agree to the provisions set forth below. +ARTICLE - DEFINITIONS +When appearing with initial capital letters in this Agreement (including an Attachment(s)), the following +quoted and underlined terms (and the plural thereof, when appropriate) have the meanings set forth below. +1.1. +"Affiliate" means a person or entity directly or indirectly controlling, controlled by, or under +common control with Health Plan. For purposes of this Agreement, "Affiliate" includes, but is not limited to, +SUFFOLK of Texas, Inc., SUFFOLK Health Plans, Inc., SUFFOLK National Health Insurance Company, SUFFOLK +Health Plans, Inc. and SUFFOLK of Texas, Inc. +1.2. +"Attachment" means any document, including an addendum, schedule or exhibit, attached to this +Agreement as of the Effective Date or that becomes attached pursuant to Section 2.2 or Section 8.7, all of which are +incorporated herein by reference and may be amended from time to time as provided in this Agreement. +1.3. +"Clean Claim" has, as to each particular Product, the meaning set forth in the applicable Product +Attachment or, if no such definition exists, the Provider Manual. +1.4. +"Company" means (collectively or individually, as appropriate in the context) Health Plan and/or +one or more of its Affiliates, except those specifically excluded by Health Plan. +1.5. +"Compensation Schedule" means at any given time the then effective schedule(s) of maximum rates +applicable to a particular Product under which Provider and Contracted Providers will be compensated for the +provision of Covered Services to Covered Persons. Such Compensation Schedule(s) will be set forth or described in +one or more Attachments to this Agreement, and may be included within a Product Attachment. +1.6. +"Contracted Provider" means a physician, hospital, health care professional or any other provider of +items or services that is employed by or has a contractual relationship with Provider and that provides Covered +Services. The term "Contracted Provider" includes Provider for those Covered Services provided by Provider. +1.7. +"Coverage Agreement" means any agreement, program or certificate entered into, issued or agreed +to +by Company or Payor, under which Company or Payor furnishes administrative services or other services in +support of a health care program for an individual or group of individuals, and which may include access to one or +more of Company's provider networks or vendor arrangements, except those excluded by Health Plan. +Page 1 of 88 + +Start of Page No. = 2 +1.8. +"Covered Person" means any individual entitled to receive Covered Services pursuant to the terms +of a Coverage Agreement. +1.9. +"Covered Services" means those services and items for which benefits are available and payable +under the applicable Coverage Agreement and which are determined, if applicable, to be Medically Necessary under +the applicable Coverage Agreement. +1.10. +"Managed Care Organization" or "MCO" will have the same meaning as Health Plan. +1.11. +"Negative Balance" means an account balance in which Provider or Contracted Provider debits +exceed credits as a result of Health Plan or Payor overpayments or payments made in error. +1.12. +"Medically Necessary" or "Medical Necessity" shall have the meaning defined in the applicable +Coverage Agreement or applicable Regulatory Requirements. +1.13. "Participating Provider" means, with respect to a particular Product, any physician, hospital, +ancillary, or other health care provider that has contracted, directly or indirectly, with Health Plan to provide Covered +Services to Covered Persons, that has been approved for participation by Company, and that is designated by +Company as a "participating provider" in such Product. +1.14. +"Payor" means the entity (including Company where applicable) that bears direct financial +responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services +rendered to Covered Persons under a Coverage Agreement and, if such entity is not Company, such entity contracts, +directly or indirectly, with Company for the provision of certain administrative or other services with respect to such +Coverage Agreement. +1.15. +"Payor Contract" means the contract with a Payor, pursuant to which Company furnishes +administrative services or other services in support of the Coverage Agreements entered into, issued or agreed to by +a Payor, which services may include access to one or more of Company's provider networks or vendor arrangements, +except those excluded by Health Plan. The term "Payor Contract" includes Company's or other Payor's contract +with a governmental authority (also referred to herein as a "Governmental Contract") under which Company or Payor +arranges for the provision of Covered Services to Covered Persons. +1.16. +"Product" means any program or health benefit arrangement designated as a "product" by Health +Plan (e.g., Health Plan Product, Medicaid Product, PPO Product, Payor-specific Product, etc.) that is now or hereafter +offered by or available from or through Company (and includes the Coverage Agreements that access, or are issued +or entered into in connection with such product, except those excluded by Health Plan). +1.17. +"Product Attachment" means an Attachment setting forth requirements, terms and conditions specific +or applicable to one or more Products, including certain provisions that must be included in a provider agreement +under the Regulatory Requirements, which may be alternatives to, or in addition to, the requirements, terms +and +conditions set forth in this Agreement or the Provider Manual. +1.18. +"Provider Manual" means the provider manual and any billing manuals, adopted by Company or +Payor which include, without limitation, requirements relating to utilization management, quality management, +grievances and appeals, and Product-specific, Payor-specific and State-specific requirements, as may be amended +from time to time by Company or Payor. +1.19. +"Regulatory Requirements" means all applicable federal and state statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and standards and requirements +of any accrediting or certifying organization, including, but not limited to, the requirements set forth in a Product +Attachment. +Page 2 of 88 \ No newline at end of file diff --git a/assets/sampleOne/tx_84-24.Pdf b/assets/sampleOne/tx_84-24.Pdf new file mode 100644 index 00000000..cab61a9f Binary files /dev/null and b/assets/sampleOne/tx_84-24.Pdf differ diff --git a/assets/sampleOne/tx_84-24.txt b/assets/sampleOne/tx_84-24.txt new file mode 100644 index 00000000..f9faca30 --- /dev/null +++ b/assets/sampleOne/tx_84-24.txt @@ -0,0 +1,108 @@ +Document Index +PARTICIPATING PROVIDER AGREEMENT 1 +ARTICLE I - DEFINITIONS 1 + + + +Start of Page No. = 1 +PARTICIPATING PROVIDER AGREEMENT +This Participating Provider Agreement (together with all Attachments and amendments, this "Agreement") +is made and entered by and between Trinity HealtCare +LLC ("Provider") and WellBeing HealthPlan, Inc. ("Health +Plan" or "MCO") (each a "Party" and collectively the "Parties"). This Agreement is effective as of the date designated +by Health Plan on the signature page of this Agreement ("Effective Date"). +WHEREAS, Provider desires to provide certain health care services to individuals in products offered by or +available from or through a Company or Payor (as hereafter defined), and Provider desires to participate in such +products as a Participating Provider (as defined herein), all as hereinafter set forth. +WHEREAS, Health Plan desires for Provider to provide such health care services to individuals in such +products, and Health Plan desires to have Provider participate in certain of such products as a Participating Provider, +all as hereinafter set forth. +NOW, THEREFORE, in consideration of the recitals and mutual promises herein stated, the Parties hereby +agree to the provisions set forth below. +ARTICLE I - DEFINITIONS +When appearing with initial capital letters in this Agreement (including an Attachment(s)), the following +quoted and underlined terms (and the plural thereof, when appropriate) have the meanings set forth below. +1.1. +"Affiliate" means a person or entity directly or indirectly controlling, controlled by, or under +common control with Health Plan. +1.2. +"Attachment" means any document, including an addendum, schedule or exhibit, attached to this +Agreement as of the Effective Date or that becomes attached pursuant to Section 2.2 or Section 8.7, all of which are +incorporated herein by reference and may be amended from time to time as provided in this Agreement. +1.3. +"Clean Claim" has, as to each particular Product, the meaning set forth in the applicable Product +Attachment or, if no such definition exists, the Provider Manual. +1.4. +"Company" means, as appropriate in the context, Health Plan and/or one of or more of its Affiliates, +except those specifically excluded by Health Plan. +1.5. +"Compensation Schedule" means at any given time the then effective schedule(s) of maximum rates +applicable to a particular Product under which Provider and Contracted Providers will be compensated for the +provision of Covered Services to Covered Persons. Such Compensation Schedule(s) will be set forth or described in +one or more Attachments to this Agreement, and may be included within a Product Attachment. +1.6. +"Contracted Provider" means a physician, hospital, health care professional or any other provider of +items or services that is employed by or has a contractual relationship with Provider. The term "Contracted Provider" +includes Provider for those Covered Services provided by Provider. +1.7. +"Coverage Agreement" means any agreement, program or certificate entered into, issued or agreed +to by Company or Payor, under which Company or Payor furnishes administrative services or other services in +support of a health care program for an individual or group of individuals, and which may include access to one or +more of Company's provider networks or vendor arrangements, except those excluded by Health Plan. +1.8. +"Covered Person" means any individual entitled to receive Covered Services pursuant to the terms +of a Coverage Agreement. +PPA_TX_Jan2018 +Page 1 of 74 + +Start of Page No. = 2 +1.9. +"Covered Services" means those services and items for which benefits are available and payable +under the applicable Coverage Agreement and which are determined, if applicable, to be Medically Necessary. +1.10. +"Managed Care Organization" or "MCO" will have the same meaning as Health Plan. +1.11. +"Negative Balance" means an account balance in which Provider or Contracted Provider debits +exceed credits as a result of Health Plan or Payor overpayments or payments made in error. +1.12. +"Medically Necessary" or "Medical Necessity" shall have the meaning defined in the applicable +Coverage Agreement and/or applicable Regulatory Requirements. +1.13. "Participating Provider" means, with respect to a particular Product, any physician, hospital, +ancillary, or other health care provider that has contracted, directly or indirectly, with Health Plan to provide Covered +Services to Covered Persons, that has been approved for participation by Company, and that is designated by +Company as a "participating provider" in such Product. +1.14. "Payor" means the entity (including Company where applicable) that bears direct financial +responsibility for paying from its own funds, without reimbursement from another entity, the cost of Covered Services +rendered to Covered Persons under a Coverage Agreement and, if such entity is not Company, such entity contracts, +directly or indirectly, with Company for the provision of certain administrative or other services with respect to such +Coverage Agreement. +1.15. +"Payor Contract" means the contract with a Payor, pursuant to which Company furnishes +administrative services or other services in support of the Coverage Agreements entered into, issued or agreed to by +a Payor, which services may include access to one or more of Company's provider networks or vendor arrangements, +except those excluded by Health Plan. The term "Payor Contract" includes Company's or other Payor's contract +with a governmental authority (also referred to herein as a "Governmental Contract") under which Company or Payor +arranges for the provision of Covered Services to Covered Persons. +1.16. +"Product" means any program or health benefit arrangement designated as a "product" by Health +Plan (e.g., Health Plan Product, Medicaid Product, PPO Product, Payor-specific Product, etc.) that is now or hereafter +offered by or available from or through Company (and includes the Coverage Agreements that access, or are issued +or entered into in connection with such product, except those excluded by Health Plan). +1.17. +"Product Attachment" means an Attachment setting forth requirements, terms and conditions specific +or applicable to one or more Products, including certain provisions that must be included in a provider agreement +under the Regulatory Requirements, which may be alternatives to, or in addition to, the requirements, terms and +conditions set forth in this Agreement or the Provider Manual. +1.18. +"Provider Manual" means the provider manual and any billing manuals, adopted by Company or +Payor which include, without limitation, requirements relating to utilization management, quality management, +grievances and appeals, and Product-specific, Payor-specific and State-specific requirements, as may be amended +from time to time by Company or Payor. +1.19. "Regulatory Requirements" means all applicable federal and state statutes, regulations, regulatory +guidance, judicial or administrative rulings, requirements of Governmental Contracts and standards and requirements +of any accrediting or certifying organization, including, but not limited to, the requirements set forth in a Product +Attachment. +1.20. +"State" is defined as the state identified in the applicable Attachment. +PPA_TX_Jan2018 +Page 2 of 74 \ No newline at end of file diff --git a/cmd/clientSyncRunner/main.go b/cmd/clientSyncRunner/main.go index ed20b10c..87f73790 100644 --- a/cmd/clientSyncRunner/main.go +++ b/cmd/clientSyncRunner/main.go @@ -19,7 +19,7 @@ import ( ) type ClientSyncConfig struct { - runner.BaseConfig + runner.BaseConfig[clientsyncrunner.Body] documentsync.DocSyncConfig } @@ -28,7 +28,7 @@ func main() { cfg := &ClientSyncConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[clientsyncrunner.Body] { svc := clientsync.New(cfg) c := clientsyncrunner.New(cfg.GetValidator(), &clientsyncrunner.Services{ diff --git a/cmd/docCleanRunner/main.go b/cmd/docCleanRunner/main.go index 40e8dd0e..ea018554 100644 --- a/cmd/docCleanRunner/main.go +++ b/cmd/docCleanRunner/main.go @@ -16,14 +16,14 @@ import ( documentclean "queryorchestration/internal/document/clean" "queryorchestration/internal/server/runner" "queryorchestration/internal/serviceconfig/objectstore" - "queryorchestration/internal/serviceconfig/queue/documenttext" + "queryorchestration/internal/serviceconfig/queue/documenttexttrigger" _ "github.com/lib/pq" ) type DocCleanConfig struct { - runner.BaseConfig - documenttext.DocTextConfig + runner.BaseConfig[doccleanrunner.Body] + documenttexttrigger.DocTextTriggerConfig objectstore.ObjectStoreConfig } @@ -32,7 +32,7 @@ func main() { cfg := &DocCleanConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[doccleanrunner.Body] { clean := documentclean.New(cfg) return doccleanrunner.New(cfg.GetValidator(), &doccleanrunner.Services{ diff --git a/cmd/docInitRunner/main.go b/cmd/docInitRunner/main.go index d2f720fa..19895fff 100644 --- a/cmd/docInitRunner/main.go +++ b/cmd/docInitRunner/main.go @@ -29,7 +29,7 @@ import ( ) type DocInitConfig struct { - runner.BaseConfig + runner.BaseConfig[docinitrunner.Body] documentsyncc.DocSyncConfig } @@ -38,7 +38,7 @@ func main() { cfg := &DocInitConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[docinitrunner.Body] { docinit := documentinit.New(cfg) return docinitrunner.New(cfg.GetValidator(), &docinitrunner.Services{ diff --git a/cmd/docSyncRunner/main.go b/cmd/docSyncRunner/main.go index dda71302..d8d5a3ae 100644 --- a/cmd/docSyncRunner/main.go +++ b/cmd/docSyncRunner/main.go @@ -25,7 +25,7 @@ import ( ) type DocSyncConfig struct { - runner.BaseConfig + runner.BaseConfig[docsyncrunner.Body] documentcleanc.DocCleanConfig } @@ -34,7 +34,7 @@ func main() { cfg := &DocSyncConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[docsyncrunner.Body] { cli := client.New(cfg) doc := document.New(cfg) docsync := documentsync.New(cfg, &documentsync.Services{ diff --git a/cmd/docTextProcessRunner/main.go b/cmd/docTextProcessRunner/main.go new file mode 100644 index 00000000..f6c38459 --- /dev/null +++ b/cmd/docTextProcessRunner/main.go @@ -0,0 +1,66 @@ +// **Listens For**: Body Containing Textract Result Document Metadata +// +// **Action**. +// +// Process textract output. +// +// An event with the document id is pushed to the QUERYSYNC queue. +package main + +import ( + "context" + "log/slog" + "os" + + doctextprocessrunner "queryorchestration/api/docTextProcessRunner" + documenttext "queryorchestration/internal/document/text" + "queryorchestration/internal/server/runner" + "queryorchestration/internal/serviceconfig/aws" + "queryorchestration/internal/serviceconfig/objectstore" + "queryorchestration/internal/serviceconfig/queue/querysync" + "queryorchestration/internal/serviceconfig/textract" + + _ "github.com/lib/pq" +) + +type DocTextProcessConfig struct { + runner.BaseConfig[doctextprocessrunner.Body] + aws.AWSConfig + textract.TextractConfig + querysync.QuerySyncConfig + objectstore.ObjectStoreConfig +} + +func main() { + ctx := context.Background() + + cfg := &DocTextProcessConfig{} + + cfg.ControllerFunc = func() runner.Controller[doctextprocessrunner.Body] { + text := documenttext.New(cfg) + + return doctextprocessrunner.New(cfg.GetValidator(), &doctextprocessrunner.Services{ + Text: text, + }) + } + + server, err := runner.New(ctx, cfg) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + err = cfg.SetStoreClient(ctx) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + err = cfg.SetTextractClient(ctx) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + server.Listen(ctx) +} diff --git a/cmd/docTextRunner/main.go b/cmd/docTextRunner/main.go index ffa02128..f08b3c1a 100644 --- a/cmd/docTextRunner/main.go +++ b/cmd/docTextRunner/main.go @@ -2,9 +2,9 @@ // // **Action**. // -// If the document text is not already extracted according to the collector standards, the text is extracted. +// If the document text is not already extracted according to the collector standards, trigger the textract job for text detection. // -// An event with the document id is pushed to the QUERYSYNC queue. +// Otherwise, add an event to the QUERYSYNC queue. package main import ( @@ -15,24 +15,26 @@ import ( doctextrunner "queryorchestration/api/docTextRunner" documenttext "queryorchestration/internal/document/text" "queryorchestration/internal/server/runner" + "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/serviceconfig/queue/querysync" "queryorchestration/internal/serviceconfig/textract" _ "github.com/lib/pq" ) -type DocTextConfig struct { - runner.BaseConfig - querysync.QuerySyncConfig +type DocTextTriggerConfig struct { + runner.BaseConfig[doctextrunner.Body] textract.TextractConfig + querysync.QuerySyncConfig + objectstore.ObjectStoreConfig } func main() { ctx := context.Background() - cfg := &DocTextConfig{} + cfg := &DocTextTriggerConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[doctextrunner.Body] { text := documenttext.New(cfg) return doctextrunner.New(cfg.GetValidator(), &doctextrunner.Services{ @@ -46,5 +48,11 @@ func main() { os.Exit(1) } + err = cfg.SetTextractClient(ctx) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + server.Listen(ctx) } diff --git a/cmd/queryRunner/main.go b/cmd/queryRunner/main.go index fa1b0e47..0cbeb3fa 100644 --- a/cmd/queryRunner/main.go +++ b/cmd/queryRunner/main.go @@ -24,7 +24,7 @@ import ( ) type QueryConfig struct { - runner.BaseConfig + runner.BaseConfig[queryrunner.Body] queryc.QueryConfig } @@ -33,7 +33,7 @@ func main() { cfg := &QueryConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[queryrunner.Body] { que := query.New(cfg) res := result.New(cfg, &result.Services{ Query: que, diff --git a/cmd/querySyncRunner/main.go b/cmd/querySyncRunner/main.go index f773b42f..8211cc51 100644 --- a/cmd/querySyncRunner/main.go +++ b/cmd/querySyncRunner/main.go @@ -30,7 +30,7 @@ import ( ) type QuerySyncConfig struct { - runner.BaseConfig + runner.BaseConfig[querysyncrunner.Body] queryc.QueryConfig } @@ -39,7 +39,7 @@ func main() { cfg := &QuerySyncConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[querysyncrunner.Body] { sync := resultsync.New(cfg) svc := querysync.New(cfg, &querysync.Services{ ResultSync: sync, diff --git a/cmd/queryVersionSyncRunner/main.go b/cmd/queryVersionSyncRunner/main.go index 4becf596..f10daace 100644 --- a/cmd/queryVersionSyncRunner/main.go +++ b/cmd/queryVersionSyncRunner/main.go @@ -19,7 +19,7 @@ import ( ) type QueryVersionSyncConfig struct { - runner.BaseConfig + runner.BaseConfig[queryversionsyncrunner.Body] clientsync.ClientSyncConfig } @@ -28,7 +28,7 @@ func main() { cfg := &QueryVersionSyncConfig{} - cfg.ControllerFunc = func() runner.Controller { + cfg.ControllerFunc = func() runner.Controller[queryversionsyncrunner.Body] { svc := queryversionsync.New(cfg) c := queryversionsyncrunner.New(cfg.GetValidator(), &queryversionsyncrunner.Services{ diff --git a/cmd/storeEventRunner/main.go b/cmd/storeEventRunner/main.go new file mode 100644 index 00000000..babe337c --- /dev/null +++ b/cmd/storeEventRunner/main.go @@ -0,0 +1,50 @@ +// **Listens For**: S3 Event +// +// **Action**. +// +// It will identify the type of event and the location of said event, and forward the task accordingly. +// +// It supports the document initialisation and document text processing stages. Events may be pushed to the DOCINIT and DOCTEXTPROCESS queues. +package main + +import ( + "context" + "log/slog" + "os" + + storeeventrunner "queryorchestration/api/storeEventRunner" + documentstore "queryorchestration/internal/document/store" + "queryorchestration/internal/server/runner" + "queryorchestration/internal/serviceconfig/queue/documentinit" + "queryorchestration/internal/serviceconfig/queue/documenttextprocess" + + _ "github.com/lib/pq" +) + +type StoreEventConfig struct { + runner.BaseConfig[storeeventrunner.S3EventNotification] + documentinit.DocInitConfig + documenttextprocess.DocTextProcessConfig +} + +func main() { + ctx := context.Background() + + cfg := &StoreEventConfig{} + + cfg.ControllerFunc = func() runner.Controller[storeeventrunner.S3EventNotification] { + store := documentstore.New(cfg) + + return storeeventrunner.New(cfg.GetValidator(), &storeeventrunner.Services{ + Store: store, + }) + } + + server, err := runner.New(ctx, cfg) + if err != nil { + slog.Error(err.Error()) + os.Exit(1) + } + + server.Listen(ctx) +} diff --git a/cmd/textractGenerator_test/textdetection.go b/cmd/textractGenerator_test/textdetection.go new file mode 100644 index 00000000..cf2da003 --- /dev/null +++ b/cmd/textractGenerator_test/textdetection.go @@ -0,0 +1,70 @@ +//go:build aws + +//go:generate go run -tags=aws ./textdetection.go +package main + +import ( + "context" + "encoding/json" + "fmt" + "log/slog" + "os" + "queryorchestration/internal/serviceconfig/aws" + "queryorchestration/internal/serviceconfig/textract" + + awstextract "github.com/aws/aws-sdk-go-v2/service/textract" + "github.com/aws/aws-sdk-go-v2/service/textract/types" +) + +func main() { + ctx := context.Background() + + cfg := &textract.TextractConfig{} + profile := aws.Profile(os.Getenv("AWS_PROFILE")) + if profile == "" { + slog.Error("profile not available") + os.Exit(1) + } + + err := cfg.SetTextractClientWithProfile(ctx, profile) + if err != nil { + slog.Error("error creating client", "error", err) + os.Exit(1) + } + + base := "../../assets/sampleGeneration" + name := "helloWorld" + filename := fmt.Sprintf("%s/%s.pdf", base, name) + content, err := os.ReadFile(filename) + if err != nil { + slog.Error("error writing file", "error", err) + os.Exit(1) + } + + slog.Info("detecting text", "filename", filename) + + res, err := cfg.GetTextractClient().DetectDocumentText(ctx, &awstextract.DetectDocumentTextInput{ + Document: &types.Document{ + Bytes: content, + }, + }) + if err != nil { + slog.Error("error detecting text", "error", err) + os.Exit(1) + } + + jsonContent, err := json.MarshalIndent(res, "", "\t") + if err != nil { + slog.Error("error marshaling json", "error", err) + os.Exit(1) + } + + outputFilename := fmt.Sprintf("%s/generated/%s.gen", base, name) + err = os.WriteFile(outputFilename, jsonContent, 0600) + if err != nil { + slog.Error("error writing file", "error", err) + os.Exit(1) + } + + fmt.Println("Successfully generated " + outputFilename) +} diff --git a/deployments/compose.local.yaml b/deployments/compose.local.yaml index 78536803..048c1b68 100644 --- a/deployments/compose.local.yaml +++ b/deployments/compose.local.yaml @@ -1,5 +1,37 @@ --- services: + store_event_runner: + image: queryorchestration:latest + command: ["./storeEventRunner"] + depends_on: + localstack: + condition: service_healthy + db: + condition: service_healthy + ports: + - "8081:8080" + expose: + - 8080 + environment: + LOG_LEVEL: DEBUG + QUEUE_URL: ${STORE_EVENT_URL} + DOCUMENT_INIT_URL: ${DOCUMENT_INIT_URL} + DOCUMENT_TEXT_PROCESS_URL: ${DOCUMENT_TEXT_PROCESS_URL} + AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} + AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} + AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN} + AWS_REGION: ${AWS_REGION} + PGUSER: ${PGUSER} + PGPASSWORD: ${PGPASSWORD} + PGHOST: db + PGPORT: 5432 + PGDATABASE: ${PGDATABASE} + DB_NOSSL: ${DB_NOSSL} + AWS_ENDPOINT_URL: "http://localstack:4566" + AWS_S3_USE_PATH_STYLE: true + networks: + - server-network + doc_init_runner: image: queryorchestration:latest command: ["./docInitRunner"] @@ -9,7 +41,7 @@ services: db: condition: service_healthy ports: - - "8081:8080" + - "8082:8080" expose: - 8080 environment: @@ -30,6 +62,7 @@ services: AWS_S3_USE_PATH_STYLE: true networks: - server-network + doc_sync_runner: image: queryorchestration:latest command: ["./docSyncRunner"] @@ -39,7 +72,7 @@ services: db: condition: service_healthy ports: - - "8082:8080" + - "8083:8080" expose: - 8080 environment: @@ -70,13 +103,13 @@ services: db: condition: service_healthy ports: - - "8083:8080" + - "8084:8080" expose: - 8080 environment: LOG_LEVEL: DEBUG QUEUE_URL: ${DOCUMENT_CLEAN_URL} - DOCUMENT_TEXT_URL: ${DOCUMENT_TEXT_URL} + DOCUMENT_TEXT_TRIGGER_URL: ${DOCUMENT_TEXT_TRIGGER_URL} AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN} @@ -101,12 +134,43 @@ services: db: condition: service_healthy ports: - - "8084:8080" + - "8085:8080" expose: - 8080 environment: LOG_LEVEL: DEBUG - QUEUE_URL: ${DOCUMENT_TEXT_URL} + QUEUE_URL: ${DOCUMENT_TEXT_TRIGGER_URL} + QUERY_SYNC_URL: ${QUERY_SYNC_URL} + AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} + AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} + AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN} + AWS_REGION: ${AWS_REGION} + PGUSER: ${PGUSER} + PGPASSWORD: ${PGPASSWORD} + PGHOST: db + PGPORT: 5432 + PGDATABASE: ${PGDATABASE} + DB_NOSSL: ${DB_NOSSL} + AWS_ENDPOINT_URL: "http://localstack:4566" + AWS_S3_USE_PATH_STYLE: true + networks: + - server-network + + doc_text_process_runner: + image: queryorchestration:latest + command: ["./docTextProcessRunner"] + depends_on: + localstack: + condition: service_healthy + db: + condition: service_healthy + ports: + - "8086:8080" + expose: + - 8080 + environment: + LOG_LEVEL: DEBUG + QUEUE_URL: ${DOCUMENT_TEXT_PROCESS_URL} QUERY_SYNC_URL: ${QUERY_SYNC_URL} AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} @@ -132,7 +196,7 @@ services: db: condition: service_healthy ports: - - "8085:8080" + - "8087:8080" expose: - 8080 environment: @@ -163,7 +227,7 @@ services: db: condition: service_healthy ports: - - "8086:8080" + - "8088:8080" expose: - 8080 environment: @@ -225,7 +289,7 @@ services: db: condition: service_healthy ports: - - "8088:8080" + - "8089:8080" expose: - 8080 environment: @@ -256,7 +320,7 @@ services: db: condition: service_healthy ports: - - "8089:8080" + - "8090:8080" expose: - 8080 environment: diff --git a/deployments/prometheus.allmetrics.yaml b/deployments/prometheus.allmetrics.yaml index d9267dc2..f13cd85f 100644 --- a/deployments/prometheus.allmetrics.yaml +++ b/deployments/prometheus.allmetrics.yaml @@ -10,6 +10,12 @@ scrape_configs: - "query_api:8080" metrics_path: "/metrics" + - job_name: "store_event_runner" + static_configs: + - targets: + - "store_event_runner:8080" + metrics_path: "/metrics" + - job_name: "doc_init_runner" static_configs: - targets: @@ -22,10 +28,16 @@ scrape_configs: - "doc_clean_runner:8080" metrics_path: "/metrics" - - job_name: "doc_text_runner" + - job_name: "doc_text_trigger_runner" static_configs: - targets: - - "doc_text_runner:8080" + - "doc_text_trigger_runner:8080" + metrics_path: "/metrics" + + - job_name: "doc_text_process_runner" + static_configs: + - targets: + - "doc_text_process_runner:8080" metrics_path: "/metrics" - job_name: "query_sync_runner" diff --git a/devbox.json b/devbox.json index 9343d894..94aef93c 100644 --- a/devbox.json +++ b/devbox.json @@ -3,7 +3,8 @@ "env": { "APP_ENV": "development", "AWS_ACCESS_KEY_ID": "test", - "AWS_ENDPOINT_URL": "http://localhost:4566", + "AWS_ENDPOINT_URL_S3": "http://localhost:4566", + "AWS_ENDPOINT_URL_SQS": "http://localhost:4566", "AWS_REGION": "us-east-1", "AWS_SECRET_ACCESS_KEY": "test", "AWS_SESSION_TOKEN": "", @@ -13,7 +14,8 @@ "DOCUMENT_CLEAN_URL": "http://localstack:4566/queue/us-east-1/000000000000/document_clean", "DOCUMENT_INIT_URL": "http://localstack:4566/queue/us-east-1/000000000000/document_init", "DOCUMENT_SYNC_URL": "http://localstack:4566/queue/us-east-1/000000000000/document_sync", - "DOCUMENT_TEXT_URL": "http://localstack:4566/queue/us-east-1/000000000000/document_text", + "DOCUMENT_TEXT_PROCESS_URL": "http://localstack:4566/queue/us-east-1/000000000000/document_text_process", + "DOCUMENT_TEXT_TRIGGER_URL": "http://localstack:4566/queue/us-east-1/000000000000/document_text_trigger", "PGDATABASE": "query_orchestration", "PGHOST": "localhost", "PGPASSWORD": "pass", @@ -24,13 +26,16 @@ "QNAME_DOCUMENT_CLEAN": "document_clean", "QNAME_DOCUMENT_INIT": "document_init", "QNAME_DOCUMENT_SYNC": "document_sync", - "QNAME_DOCUMENT_TEXT": "document_text", + "QNAME_DOCUMENT_TEXT_PROCESS": "document_text_process", + "QNAME_DOCUMENT_TEXT_TRIGGER": "document_text_trigger", "QNAME_QUERY_RUNNER": "query_runner", "QNAME_QUERY_SYNC": "query_sync", "QNAME_QUERY_VERSION_SYNC": "query_version_sync", + "QNAME_STORE_EVENT": "store_event", "QUERY_SYNC_URL": "http://localstack:4566/queue/us-east-1/000000000000/query_sync", "QUERY_URL": "http://localstack:4566/queue/us-east-1/000000000000/query_runner", - "QUERY_VERSION_SYNC_URL": "http://localstack:4566/queue/us-east-1/000000000000/query_version_sync" + "QUERY_VERSION_SYNC_URL": "http://localstack:4566/queue/us-east-1/000000000000/query_version_sync", + "STORE_EVENT_URL": "http://localstack:4566/queue/us-east-1/000000000000/store_event" }, "env_from": ".env", "packages": [ diff --git a/docs/README.md b/docs/README.md index 4072f0a8..211c18f2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -48,15 +48,25 @@ By validating: the client can_sync parameter. If eligible, send an event to the DOCCLEAN queue. +## docTextProcessRunner + +**Listens For**: Body Containing Textract Result Document Metadata + +**Action**. + +Process textract output. + +An event with the document id is pushed to the QUERYSYNC queue. + ## docTextRunner **Listens For**: Body Containing Document ID **Action**. -If the document text is not already extracted according to the collector standards, the text is extracted. +If the document text is not already extracted according to the collector standards, trigger the textract job for text detection. -An event with the document id is pushed to the QUERYSYNC queue. +Otherwise, add an event to the QUERYSYNC queue. ## metricsExample\_test @@ -126,4 +136,14 @@ An event with the document id is pushed to the DOCTEXT queue. Adds an event for each client into the CLIENTSYNC queue for the given query, i.e. each client that contains the query in its dependency tree. +## storeEventRunner + +**Listens For**: S3 Event + +**Action**. + +It will identify the type of event and the location of said event, and forward the task accordingly. + +It supports the document initialisation and document text processing stages. Events may be pushed to the DOCINIT and DOCTEXTPROCESS queues. + Generated by Doczy diff --git a/internal/client/create.go b/internal/client/create.go index 72abe157..addf847d 100644 --- a/internal/client/create.go +++ b/internal/client/create.go @@ -3,34 +3,33 @@ package client import ( "context" "errors" + "fmt" "regexp" "strings" "queryorchestration/internal/database/repository" - - "github.com/google/uuid" ) type CreateParams struct { - Name string - ExternalId string + Name string + ID string } -func (s *Service) Create(ctx context.Context, params CreateParams) (uuid.UUID, error) { +func (s *Service) Create(ctx context.Context, params CreateParams) (string, error) { err := s.normalizeCreate(¶ms) if err != nil { - return uuid.Nil, err + return "", err } - id, err := s.cfg.GetDBQueries().CreateClient(ctx, &repository.CreateClientParams{ - Name: params.Name, - Externalid: params.ExternalId, + err = s.cfg.GetDBQueries().CreateClient(ctx, &repository.CreateClientParams{ + Name: params.Name, + ID: params.ID, }) if err != nil { - return uuid.Nil, err + return "", err } - return id, nil + return params.ID, nil } func (s *Service) normalizeCreate(params *CreateParams) error { @@ -39,7 +38,7 @@ func (s *Service) normalizeCreate(params *CreateParams) error { return err } - err = normalizeExternalID(¶ms.ExternalId) + err = normalizeID(¶ms.ID) if err != nil { return err } @@ -47,13 +46,16 @@ func (s *Service) normalizeCreate(params *CreateParams) error { return nil } -func normalizeExternalID(id *string) error { +const CLIENT_ID_REGEX = `[a-zA-Z0-9\_#-]+` + +func normalizeID(id *string) error { if id == nil { return nil } trim := strings.TrimSpace(*id) - pattern := regexp.MustCompile(`^[a-zA-Z0-9\_]+$`) + patternStr := fmt.Sprintf("^%s$", CLIENT_ID_REGEX) + pattern := regexp.MustCompile(patternStr) if !pattern.MatchString(trim) { return errors.New("invalid external id") } diff --git a/internal/client/create_test.go b/internal/client/create_test.go index ccb52778..daf7c958 100644 --- a/internal/client/create_test.go +++ b/internal/client/create_test.go @@ -7,7 +7,6 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig" - "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -25,20 +24,16 @@ func TestCreate(t *testing.T) { svc := New(cfg) params := CreateParams{ - Name: "client_name", - ExternalId: "external_id", + Name: "client_name", + ID: "external_id", } - aid := uuid.New() - pool.ExpectQuery("name: CreateClient :one").WithArgs(params.ExternalId, params.Name). - WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(aid), - ) + pool.ExpectExec("name: CreateClient :exec").WithArgs(params.ID, params.Name). + WillReturnResult(pgxmock.NewResult("", 1)) id, err := svc.Create(ctx, params) require.NoError(t, err) - assert.Equal(t, aid, id) + assert.Equal(t, params.ID, id) } func TestNormalizeCreate(t *testing.T) { @@ -48,29 +43,29 @@ func TestNormalizeCreate(t *testing.T) { t.Run("no change", func(t *testing.T) { params := &CreateParams{ - Name: "client_name", - ExternalId: "external_id", + Name: "client_name", + ID: "external_id", } err := svc.normalizeCreate(params) require.NoError(t, err) assert.Equal(t, "client_name", params.Name) - assert.Equal(t, "external_id", params.ExternalId) + assert.Equal(t, "external_id", params.ID) }) t.Run("all change", func(t *testing.T) { params := &CreateParams{ - Name: " client_name", - ExternalId: " external_id", + Name: " client_name", + ID: " external_id", } err := svc.normalizeCreate(params) require.NoError(t, err) assert.Equal(t, "client_name", params.Name) - assert.Equal(t, "external_id", params.ExternalId) + assert.Equal(t, "external_id", params.ID) }) } -func TestNormalizeExternalID(t *testing.T) { +func TestNormalizeID(t *testing.T) { externalIds := []string{ "ABC", "ABC_XYZ", @@ -78,10 +73,10 @@ func TestNormalizeExternalID(t *testing.T) { } for _, id := range externalIds { - assert.Nil(t, normalizeExternalID(&id)) + assert.Nil(t, normalizeID(&id)) } id := " ABC\t" - assert.Nil(t, normalizeExternalID(&id)) + assert.Nil(t, normalizeID(&id)) assert.Equal(t, "ABC", id) } diff --git a/internal/client/get.go b/internal/client/get.go index 65d88e3d..6479e0eb 100644 --- a/internal/client/get.go +++ b/internal/client/get.go @@ -4,11 +4,9 @@ import ( "context" "queryorchestration/internal/database/repository" - - "github.com/google/uuid" ) -func (s *Service) Get(ctx context.Context, id uuid.UUID) (*Client, error) { +func (s *Service) Get(ctx context.Context, id string) (*Client, error) { client, err := s.cfg.GetDBQueries().GetClient(ctx, id) if err != nil { return nil, err @@ -17,20 +15,10 @@ func (s *Service) Get(ctx context.Context, id uuid.UUID) (*Client, error) { return parseFullClient(client), nil } -func (s *Service) GetByExternalId(ctx context.Context, id string) (*Client, error) { - client, err := s.cfg.GetDBQueries().GetClientByExternalId(ctx, id) - if err != nil { - return nil, err - } - - return parseFullClient(client), nil -} - func parseFullClient(client *repository.Fullclient) *Client { return &Client{ - ID: client.ID, - ExternalID: client.Externalid, - Name: client.Name, - CanSync: client.Cansync, + ID: client.ID, + Name: client.Name, + CanSync: client.Cansync, } } diff --git a/internal/client/get_test.go b/internal/client/get_test.go index 08364e07..857e7c67 100644 --- a/internal/client/get_test.go +++ b/internal/client/get_test.go @@ -8,7 +8,6 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig" - "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -25,58 +24,20 @@ func TestGet(t *testing.T) { svc := New(cfg) - id := uuid.New() + id := "ID" pool.ExpectQuery("name: GetClient :one").WithArgs(id). WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(id, "client_id", "client_name", false), + pgxmock.NewRows([]string{"id", "name", "canSync"}). + AddRow("ID", "client_name", false), ) cli, err := svc.Get(ctx, id) require.NoError(t, err) assert.EqualExportedValues(t, &Client{ - ID: id, - ExternalID: "client_id", - Name: "client_name", - CanSync: false, - }, cli) - - dberr := "database failure" - pool.ExpectQuery("name: GetClient :one").WithArgs(id). - WillReturnError(errors.New(dberr)) - - _, err = svc.Get(ctx, id) - assert.EqualError(t, err, dberr) -} - -func TestGetByExternalId(t *testing.T) { - ctx := context.Background() - - pool, err := pgxmock.NewPool() - require.NoError(t, err) - cfg := &serviceconfig.BaseConfig{} - cfg.DBPool = pool - cfg.DBQueries = repository.New(pool) - - svc := New(cfg) - - id := uuid.New() - externalId := "clientId" - - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(externalId). - WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(id, "client_id", "client_name", false), - ) - - cli, err := svc.GetByExternalId(ctx, externalId) - require.NoError(t, err) - assert.EqualExportedValues(t, &Client{ - ID: id, - ExternalID: "client_id", - Name: "client_name", - CanSync: false, + ID: id, + Name: "client_name", + CanSync: false, }, cli) dberr := "database failure" @@ -89,16 +50,14 @@ func TestGetByExternalId(t *testing.T) { func TestParseFullClient(t *testing.T) { in := &repository.Fullclient{ - ID: uuid.New(), - Externalid: "external_id", - Name: "name", - Cansync: true, + ID: "external_id", + Name: "name", + Cansync: true, } out := parseFullClient(in) assert.EqualExportedValues(t, &Client{ - ID: in.ID, - ExternalID: "external_id", - Name: "name", - CanSync: true, + ID: "external_id", + Name: "name", + CanSync: true, }, out) } diff --git a/internal/client/service.go b/internal/client/service.go index 9ae99ecc..055d2483 100644 --- a/internal/client/service.go +++ b/internal/client/service.go @@ -6,15 +6,12 @@ import ( "strings" "queryorchestration/internal/serviceconfig" - - "github.com/google/uuid" ) type Client struct { - ID uuid.UUID - ExternalID string - Name string - CanSync bool + ID string + Name string + CanSync bool } func (c *Client) normalizeCanSyncUpdate(n **bool) { diff --git a/internal/client/serviceprivate_test.go b/internal/client/serviceprivate_test.go index da567e06..d03da022 100644 --- a/internal/client/serviceprivate_test.go +++ b/internal/client/serviceprivate_test.go @@ -3,7 +3,6 @@ package client import ( "testing" - "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -36,7 +35,7 @@ func TestNormalizeName(t *testing.T) { func TestNormalizeCanSyncUpdate(t *testing.T) { c := Client{ - ID: uuid.New(), + ID: "EXAMPLE", CanSync: true, } @@ -58,7 +57,7 @@ func TestNormalizeCanSyncUpdate(t *testing.T) { func TestNormalizeNameUpdate(t *testing.T) { c := Client{ - ID: uuid.New(), + ID: "EXAMPLE", Name: "example_name", } diff --git a/internal/client/status.go b/internal/client/status.go index 50400124..843087fa 100644 --- a/internal/client/status.go +++ b/internal/client/status.go @@ -12,8 +12,8 @@ const ( IN_SYNC Status = "in_sync" ) -func (s *Service) GetStatusByExternalId(ctx context.Context, id string) (Status, error) { - client, err := s.cfg.GetDBQueries().GetClientByExternalId(ctx, id) +func (s *Service) GetStatus(ctx context.Context, id string) (Status, error) { + client, err := s.cfg.GetDBQueries().GetClient(ctx, id) if err != nil { return NOT_SYNCING, err } else if !client.Cansync { diff --git a/internal/client/status_test.go b/internal/client/status_test.go index b0aa84ec..320c174f 100644 --- a/internal/client/status_test.go +++ b/internal/client/status_test.go @@ -9,13 +9,12 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig" - "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestGetStatusByExternalId(t *testing.T) { +func TestGetStatus(t *testing.T) { ctx := context.Background() pool, err := pgxmock.NewPool() @@ -26,53 +25,52 @@ func TestGetStatusByExternalId(t *testing.T) { svc := client.New(cfg) - externalId := "clientid" - clientId := uuid.New() + clientId := "clientid" t.Run("is synced", func(t *testing.T) { - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(externalId).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "can_sync"}). - AddRow(clientId, externalId, "name", true), + pool.ExpectQuery("name: GetClient :one").WithArgs(clientId).WillReturnRows( + pgxmock.NewRows([]string{"id", "name", "can_sync"}). + AddRow(clientId, "name", true), ) pool.ExpectQuery("name: IsClientSynced :one").WithArgs(&clientId).WillReturnRows( pgxmock.NewRows([]string{"issynced"}). AddRow(true), ) - issynced, err := svc.GetStatusByExternalId(ctx, externalId) + issynced, err := svc.GetStatus(ctx, clientId) require.NoError(t, err) assert.Equal(t, client.IN_SYNC, issynced) }) t.Run("not synced", func(t *testing.T) { - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(externalId).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "can_sync"}). - AddRow(clientId, externalId, "name", true), + pool.ExpectQuery("name: GetClient :one").WithArgs(clientId).WillReturnRows( + pgxmock.NewRows([]string{"clientId", "name", "can_sync"}). + AddRow(clientId, "name", true), ) pool.ExpectQuery("name: IsClientSynced :one").WithArgs(&clientId).WillReturnRows( pgxmock.NewRows([]string{"issynced"}). AddRow(false), ) - issynced, err := svc.GetStatusByExternalId(ctx, externalId) + issynced, err := svc.GetStatus(ctx, clientId) require.NoError(t, err) assert.Equal(t, client.NOT_SYNCED, issynced) }) t.Run("not syncing", func(t *testing.T) { - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(externalId).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "can_sync"}). - AddRow(clientId, "id", "name", false), + pool.ExpectQuery("name: GetClient :one").WithArgs(clientId).WillReturnRows( + pgxmock.NewRows([]string{"clientId", "name", "can_sync"}). + AddRow(clientId, "name", false), ) - issynced, err := svc.GetStatusByExternalId(ctx, externalId) + issynced, err := svc.GetStatus(ctx, clientId) require.NoError(t, err) assert.Equal(t, client.NOT_SYNCING, issynced) }) t.Run("db error", func(t *testing.T) { errStr := "db fail" - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(externalId). + pool.ExpectQuery("name: GetClient :one").WithArgs(clientId). WillReturnError(errors.New(errStr)) - _, err = svc.GetStatusByExternalId(ctx, externalId) + _, err = svc.GetStatus(ctx, clientId) assert.EqualError(t, err, errStr) }) } diff --git a/internal/client/sync/sync.go b/internal/client/sync/sync.go index d99499a7..826d1566 100644 --- a/internal/client/sync/sync.go +++ b/internal/client/sync/sync.go @@ -9,11 +9,9 @@ import ( docsyncrunner "queryorchestration/api/docSyncRunner" "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig/queue" - - "github.com/google/uuid" ) -func (s *Service) Sync(ctx context.Context, id uuid.UUID) error { +func (s *Service) Sync(ctx context.Context, id string) error { hasMore := true offset := int32(0) dbid := id @@ -36,7 +34,7 @@ func (s *Service) Sync(ctx context.Context, id uuid.UUID) error { err := s.cfg.SendToQueue(ctx, &queue.SendParams{ QueueURL: s.cfg.GetDocumentSyncURL(), Body: docsyncrunner.Body{ - ID: *id.ID, + DocumentID: *id.ID, }, }) if err != nil { diff --git a/internal/client/sync/sync_test.go b/internal/client/sync/sync_test.go index 74a7a764..50af87be 100644 --- a/internal/client/sync/sync_test.go +++ b/internal/client/sync/sync_test.go @@ -39,7 +39,7 @@ func TestTrigger(t *testing.T) { svc := New(cfg) - clientId := uuid.New() + clientId := "huuh" docs := []document.DocumentSummary{ { ID: uuid.New(), @@ -100,7 +100,7 @@ func TestTrigger(t *testing.T) { svc := New(cfg) - clientId := uuid.New() + clientId := "hola" svc.batchSize = 1 pool.ExpectQuery("name: ListDocumentIDsBatch :many").WithArgs(clientId, svc.batchSize, int32(0)). diff --git a/internal/client/update.go b/internal/client/update.go index e4141fd7..90f495e6 100644 --- a/internal/client/update.go +++ b/internal/client/update.go @@ -7,30 +7,14 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/validation" - - "github.com/google/uuid" ) -func (s *Service) UpdateByExternalId(ctx context.Context, id string, entity *Update) error { - client, err := s.cfg.GetDBQueries().GetClientByExternalId(ctx, id) - if err != nil { - return err - } - - err = s.Update(ctx, client.ID, entity) - if err != nil { - return err - } - - return nil -} - type Update struct { Name *string CanSync *bool } -func (s *Service) Update(ctx context.Context, id uuid.UUID, entity *Update) error { +func (s *Service) Update(ctx context.Context, id string, entity *Update) error { current, err := s.Get(ctx, id) if err != nil { return err @@ -49,7 +33,7 @@ func (s *Service) Update(ctx context.Context, id uuid.UUID, entity *Update) erro return nil } -func (s *Service) submitUpdate(ctx context.Context, id uuid.UUID, entity *Update) error { +func (s *Service) submitUpdate(ctx context.Context, id string, entity *Update) error { return s.cfg.ExecuteDBTransaction(ctx, func(ctx context.Context, q *repository.Queries) error { id := id @@ -79,7 +63,7 @@ func (s *Service) submitUpdate(ctx context.Context, id uuid.UUID, entity *Update }) } -func (s *Service) normalizeUpdateParams(id uuid.UUID, current *Client, entity *Update) error { +func (s *Service) normalizeUpdateParams(id string, current *Client, entity *Update) error { if entity == nil || current == nil || current.ID != id { return errors.New("no updates presented") } diff --git a/internal/client/update_test.go b/internal/client/update_test.go index f4730cba..7b6af969 100644 --- a/internal/client/update_test.go +++ b/internal/client/update_test.go @@ -7,7 +7,6 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig" - "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -25,7 +24,7 @@ func TestUpdate(t *testing.T) { svc := New(cfg) c := Client{ - ID: uuid.New(), + ID: "huhu", Name: "example_name", CanSync: false, } @@ -70,11 +69,11 @@ func TestUpdate(t *testing.T) { func TestNormalizeUpdateParams(t *testing.T) { svc := Service{} - err := svc.normalizeUpdateParams(uuid.Nil, nil, nil) + err := svc.normalizeUpdateParams("huhu", nil, nil) assert.Error(t, err) current := &Client{ - ID: uuid.New(), + ID: "hi", Name: "client", } update := &Update{} @@ -117,7 +116,7 @@ func TestSubmitUpdate(t *testing.T) { svc := New(cfg) c := Client{ - ID: uuid.New(), + ID: "hello", Name: "example_name", CanSync: false, } @@ -152,70 +151,3 @@ func TestSubmitUpdate(t *testing.T) { err = svc.submitUpdate(ctx, c.ID, &update) require.NoError(t, err) } - -func TestUpdateByExternalId(t *testing.T) { - ctx := context.Background() - - pool, err := pgxmock.NewPool() - require.NoError(t, err) - cfg := &serviceconfig.BaseConfig{} - cfg.DBPool = pool - cfg.DBQueries = repository.New(pool) - - svc := New(cfg) - - c := Client{ - ID: uuid.New(), - ExternalID: "extarnal_id", - Name: "example_name", - CanSync: false, - } - t.Run("no update", func(t *testing.T) { - update := Update{} - - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(c.ExternalID). - WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(c.ID, c.ExternalID, c.Name, c.CanSync), - ) - - pool.ExpectQuery("name: GetClient :one").WithArgs(c.ID). - WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(c.ID, c.ExternalID, c.Name, c.CanSync), - ) - - err = svc.UpdateByExternalId(ctx, c.ExternalID, &update) - assert.Error(t, err) - }) - t.Run("no update", func(t *testing.T) { - update := Update{} - c.CanSync = false - update.CanSync = &c.CanSync - - pool.ExpectQuery("name: GetClient :one").WithArgs(c.ID). - WillReturnRows( - pgxmock.NewRows([]string{"id", "name", "canSync"}). - AddRow(c.ID, c.Name, c.CanSync), - ) - - err = svc.UpdateByExternalId(ctx, c.ExternalID, &update) - assert.Error(t, err) - }) - t.Run("no update", func(t *testing.T) { - update := Update{} - c.Name = "updated_name" - update.Name = &c.Name - - pool.ExpectQuery("name: GetClient :one").WithArgs(c.ID). - WillReturnRows( - pgxmock.NewRows([]string{"id", "name", "canSync"}). - AddRow(c.ID, c.Name, c.CanSync), - ) - pool.ExpectExec("name: UpdateClient :exec").WithArgs(*update.Name, c.ID). - WillReturnResult(pgxmock.NewResult("", 1)) - - err = svc.UpdateByExternalId(ctx, c.ExternalID, &update) - assert.Error(t, err) - }) -} diff --git a/internal/collector/get.go b/internal/collector/get.go index 002591c7..fda9dae9 100644 --- a/internal/collector/get.go +++ b/internal/collector/get.go @@ -4,20 +4,9 @@ import ( "context" resultprocessor "queryorchestration/internal/query/result/processor" - - "github.com/google/uuid" ) -func (s *Service) GetByClientExternalID(ctx context.Context, clientID string) (*Collector, error) { - dbColl, err := s.cfg.GetDBQueries().GetCollectorByClientExternalID(ctx, clientID) - if err != nil { - return nil, err - } - - return parseDBCollector(dbColl) -} - -func (s *Service) GetByClientID(ctx context.Context, clientID uuid.UUID) (*Collector, error) { +func (s *Service) GetByClientID(ctx context.Context, clientID string) (*Collector, error) { dbColl, err := s.cfg.GetDBQueries().GetCollectorByClientID(ctx, clientID) if err != nil { return nil, err @@ -26,7 +15,7 @@ func (s *Service) GetByClientID(ctx context.Context, clientID uuid.UUID) (*Colle return parseDBCollector(dbColl) } -func (s *Service) ListQueries(ctx context.Context, id uuid.UUID) ([]*resultprocessor.Query, error) { +func (s *Service) ListQueries(ctx context.Context, id string) ([]*resultprocessor.Query, error) { queries, err := s.cfg.GetDBQueries().ListCollectorQueries(ctx, id) if err != nil { return nil, err diff --git a/internal/collector/get_test.go b/internal/collector/get_test.go index 1f2942ea..5fc08439 100644 --- a/internal/collector/get_test.go +++ b/internal/collector/get_test.go @@ -30,7 +30,7 @@ func TestGetByClientID(t *testing.T) { minCleanV := int64(2) minTextV := int64(4) ogc := collector.Collector{ - ClientID: uuid.New(), + ClientID: "hi", MinCleanVersion: minCleanV, MinTextVersion: minTextV, Fields: map[string]uuid.UUID{ @@ -60,7 +60,7 @@ func TestListQueries(t *testing.T) { svc := collector.New(cfg) - clientId := uuid.New() + clientId := "id" ogc := []*resultprocessor.Query{ { ID: uuid.New(), diff --git a/internal/collector/parse_test.go b/internal/collector/parse_test.go index d1d9f795..2b6ade56 100644 --- a/internal/collector/parse_test.go +++ b/internal/collector/parse_test.go @@ -19,7 +19,7 @@ func TestParseDBCollector(t *testing.T) { minCleanV := int64(1) minTextV := int64(2) ogc := Collector{ - ClientID: uuid.New(), + ClientID: "hi", MinCleanVersion: minCleanV, MinTextVersion: minTextV, Fields: map[string]uuid.UUID{ diff --git a/internal/collector/service.go b/internal/collector/service.go index 342291ce..5ba33936 100644 --- a/internal/collector/service.go +++ b/internal/collector/service.go @@ -7,7 +7,7 @@ import ( ) type Collector struct { - ClientID uuid.UUID + ClientID string MinCleanVersion int64 MinTextVersion int64 ActiveVersion int32 diff --git a/internal/collector/set/set.go b/internal/collector/set/set.go index a34d5fce..f5c19cad 100644 --- a/internal/collector/set/set.go +++ b/internal/collector/set/set.go @@ -15,20 +15,6 @@ import ( "github.com/google/uuid" ) -func (s *Service) SetByClientExternalId(ctx context.Context, id string, params *SetParams) error { - client, err := s.cfg.GetDBQueries().GetClientByExternalId(ctx, id) - if err != nil { - return err - } - - err = s.SetByClientId(ctx, client.ID, params) - if err != nil { - return err - } - - return nil -} - type SetParams struct { ActiveVersion *int32 MinCleanVersion *int64 @@ -36,7 +22,7 @@ type SetParams struct { Fields *map[string]uuid.UUID } -func (s *Service) SetByClientId(ctx context.Context, id uuid.UUID, params *SetParams) error { +func (s *Service) SetByClientId(ctx context.Context, id string, params *SetParams) error { current, err := s.svc.Collector.GetByClientID(ctx, id) if err != nil { return err @@ -68,20 +54,20 @@ func (s *Service) informSet(ctx context.Context, update *dbSetParams) error { return s.cfg.SendToQueue(ctx, &queue.SendParams{ QueueURL: s.cfg.GetClientSyncURL(), Body: clientsyncrunner.Body{ - ID: update.ClientID, + ClientID: update.ClientID, }, }) } type dbSetParams struct { - ClientID uuid.UUID + ClientID string ActiveVersion *int32 MinCleanVersion *int64 MinTextVersion *int64 Fields *map[string]uuid.UUID } -func (s *Service) getSetParams(ctx context.Context, id uuid.UUID, current *collector.Collector, params *SetParams) (*dbSetParams, error) { +func (s *Service) getSetParams(ctx context.Context, id string, current *collector.Collector, params *SetParams) (*dbSetParams, error) { err := s.normalizeCodeVersions(current, params) if err != nil { return nil, err diff --git a/internal/collector/set/set_test.go b/internal/collector/set/set_test.go index c1f16ef1..7c3ab9b2 100644 --- a/internal/collector/set/set_test.go +++ b/internal/collector/set/set_test.go @@ -13,7 +13,6 @@ import ( queuemock "queryorchestration/mocks/queue" "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/google/uuid" "github.com/jackc/pgx/v5" "github.com/pashagolub/pgxmock/v3" "github.com/stretchr/testify/mock" @@ -43,7 +42,7 @@ func TestSet(t *testing.T) { t.Run("valid", func(t *testing.T) { current := collector.Collector{ - ClientID: uuid.New(), + ClientID: "hi", ActiveVersion: 1, LatestVersion: 4, } @@ -75,7 +74,7 @@ func TestSet(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID.String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID) }), mock.Anything, ). @@ -86,7 +85,7 @@ func TestSet(t *testing.T) { }) t.Run("no collector", func(t *testing.T) { current := collector.Collector{ - ClientID: uuid.New(), + ClientID: "string", } av := int32(1) mv := int64(1) @@ -116,7 +115,7 @@ func TestSet(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID.String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID) }), mock.Anything, ). @@ -126,115 +125,3 @@ func TestSet(t *testing.T) { require.NoError(t, err) }) } - -func TestSetByExternalId(t *testing.T) { - ctx := context.Background() - - pool, err := pgxmock.NewPool() - require.NoError(t, err) - cfg := &CollectorSetConfig{} - cfg.DBPool = pool - cfg.DBQueries = repository.New(pool) - mockSQS := queuemock.NewMockSQSClient(t) - cfg.QueueClient = mockSQS - cfg.ClientSyncURL = "here" - - svc := collectorset.New(cfg, &collectorset.Services{ - Collector: collector.New(cfg), - }) - - externalId := "client_id" - - t.Run("valid", func(t *testing.T) { - current := collector.Collector{ - ClientID: uuid.New(), - ActiveVersion: 1, - LatestVersion: 4, - } - av := int32(2) - mv := int64(1) - update := collectorset.SetParams{ - ActiveVersion: &av, - MinCleanVersion: &mv, - } - - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(externalId).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "can_sync"}). - AddRow(current.ClientID, externalId, "name", true), - ) - pool.ExpectQuery("name: GetCollectorByClientID :one").WithArgs(current.ClientID). - WillReturnRows( - pgxmock.NewRows([]string{"clientId", "minCleanVersion", "minTextVersion", "activeVersion", "latestVersion", "fields"}). - AddRow(current.ClientID, current.MinCleanVersion, current.MinTextVersion, current.ActiveVersion, current.LatestVersion, []byte("")), - ) - pool.ExpectBeginTx(pgx.TxOptions{}) - rv := current.LatestVersion + 1 - pool.ExpectQuery("name: AddLatestCollectorVersion :one").WithArgs(current.ClientID).WillReturnRows( - pgxmock.NewRows([]string{"version"}). - AddRow(rv), - ) - pool.ExpectExec("name: SetActiveCollectorVersion :exec").WithArgs(current.ClientID, int32(2)). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectExec("name: SetCollectorCleanVersion :exec").WithArgs(current.ClientID, rv, *update.MinCleanVersion). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectCommit() - - mockSQS.EXPECT(). - SendMessage( - mock.Anything, - mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID.String()) - }), - mock.Anything, - ). - Return(&sqs.SendMessageOutput{}, nil) - - err = svc.SetByClientExternalId(ctx, externalId, &update) - require.NoError(t, err) - }) - t.Run("no collector", func(t *testing.T) { - current := collector.Collector{ - ClientID: uuid.New(), - } - av := int32(1) - mv := int64(1) - update := collectorset.SetParams{ - ActiveVersion: &av, - MinCleanVersion: &mv, - } - - pool.ExpectQuery("name: GetClientByExternalId :one").WithArgs(externalId).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "can_sync"}). - AddRow(current.ClientID, externalId, "name", true), - ) - pool.ExpectQuery("name: GetCollectorByClientID :one").WithArgs(current.ClientID). - WillReturnRows( - pgxmock.NewRows([]string{"clientId", "minCleanVersion", "minTextVersion", "activeVersion", "latestVersion", "fields"}). - AddRow(current.ClientID, current.MinCleanVersion, current.MinTextVersion, current.ActiveVersion, current.LatestVersion, []byte("")), - ) - pool.ExpectBeginTx(pgx.TxOptions{}) - rv := current.LatestVersion + 1 - pool.ExpectQuery("name: AddLatestCollectorVersion :one").WithArgs(current.ClientID).WillReturnRows( - pgxmock.NewRows([]string{"version"}). - AddRow(rv), - ) - pool.ExpectExec("name: SetActiveCollectorVersion :exec").WithArgs(current.ClientID, int32(1)). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectExec("name: SetCollectorCleanVersion :exec").WithArgs(current.ClientID, rv, *update.MinCleanVersion). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectCommit() - - mockSQS.EXPECT(). - SendMessage( - mock.Anything, - mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", current.ClientID.String()) - }), - mock.Anything, - ). - Return(&sqs.SendMessageOutput{}, nil) - - err = svc.SetByClientExternalId(ctx, externalId, &update) - require.NoError(t, err) - }) -} diff --git a/internal/collector/set/setprivate_test.go b/internal/collector/set/setprivate_test.go index 84773ca4..12101e9b 100644 --- a/internal/collector/set/setprivate_test.go +++ b/internal/collector/set/setprivate_test.go @@ -63,7 +63,7 @@ func TestGetSetParams(t *testing.T) { AddRow(true), ) - clientId := uuid.New() + clientId := "string" dbparams, err := svc.getSetParams(ctx, clientId, ¤t, ¶ms) require.NoError(t, err) @@ -177,7 +177,7 @@ func TestSubmitSet(t *testing.T) { minCleanV := int64(2) minTextV := int64(4) current := collector.Collector{ - ClientID: uuid.New(), + ClientID: "hello", ActiveVersion: 1, LatestVersion: 1, MinCleanVersion: 1, @@ -243,7 +243,7 @@ func TestSubmitSet(t *testing.T) { } current := collector.Collector{ - ClientID: uuid.New(), + ClientID: "hell", ActiveVersion: 1, LatestVersion: 1, MinCleanVersion: 1, @@ -618,7 +618,7 @@ func TestInformSet(t *testing.T) { av := int32(2) update := dbSetParams{ - ClientID: uuid.New(), + ClientID: "HI", ActiveVersion: &av, } @@ -626,7 +626,7 @@ func TestInformSet(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", update.ClientID.String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", update.ClientID) }), mock.Anything, ). @@ -650,7 +650,7 @@ func TestInformSet(t *testing.T) { svc := New(cfg, &Services{}) update := dbSetParams{ - ClientID: uuid.New(), + ClientID: "hello", } err = svc.informSet(ctx, &update) diff --git a/internal/database/migrations/00000000000003_clients.up.sql b/internal/database/migrations/00000000000003_clients.up.sql index 2c7a124a..41414b33 100644 --- a/internal/database/migrations/00000000000003_clients.up.sql +++ b/internal/database/migrations/00000000000003_clients.up.sql @@ -1,14 +1,12 @@ CREATE TABLE clients ( - id uuid primary key DEFAULT uuid_generate_v7(), - externalId varchar(255) not null, + id varchar(255) primary key, name TEXT not null, - UNIQUE (name), - UNIQUE (externalId) + UNIQUE (name) ); CREATE TABLE clientCanSync ( id uuid primary key DEFAULT uuid_generate_v7(), - clientId uuid not null, + clientId varchar(255) not null, canSync boolean not null, foreign key (clientId) references clients(id) ); diff --git a/internal/database/migrations/00000000000004_collectors.up.sql b/internal/database/migrations/00000000000004_collectors.up.sql index 27a1811b..76f05cfc 100644 --- a/internal/database/migrations/00000000000004_collectors.up.sql +++ b/internal/database/migrations/00000000000004_collectors.up.sql @@ -1,5 +1,5 @@ CREATE TABLE collectorVersions ( - clientId uuid not null, + clientId varchar(255) not null, id int not null, addedAt timestamp not null default current_timestamp, foreign key (clientId) references clients(id), @@ -25,14 +25,14 @@ EXECUTE FUNCTION setCollectorVersionNumber(); CREATE TABLE collectorActiveVersions ( id uuid primary key DEFAULT uuid_generate_v7(), - clientId uuid not null, + clientId varchar(255) not null, versionId int not null, foreign key (clientId, versionId) references collectorVersions(clientId, id) ); CREATE TABLE collectorMinCleanVersions ( id uuid primary key DEFAULT uuid_generate_v7(), - clientId uuid not null, + clientId varchar(255) not null, versionId bigint not null, addedVersion int not null, removedVersion int, @@ -59,7 +59,7 @@ EXECUTE FUNCTION removeMinCleanVersion(); CREATE TABLE collectorMinTextVersions ( id uuid primary key DEFAULT uuid_generate_v7(), - clientId uuid not null, + clientId varchar(255) not null, versionId bigint not null, addedVersion int not null, removedVersion int, @@ -86,7 +86,7 @@ EXECUTE FUNCTION removeMinTextVersion(); CREATE TABLE collectorQueries ( id uuid primary key DEFAULT uuid_generate_v7(), - clientId uuid not null, + clientId varchar(255) not null, name varchar(255) not null, queryId uuid not null, addedVersion int not null, diff --git a/internal/database/migrations/00000000000005_documents.up.sql b/internal/database/migrations/00000000000005_documents.up.sql index 63674085..9336793b 100644 --- a/internal/database/migrations/00000000000005_documents.up.sql +++ b/internal/database/migrations/00000000000005_documents.up.sql @@ -1,6 +1,6 @@ CREATE TABLE documents ( id uuid primary key DEFAULT uuid_generate_v7(), - clientId uuid not null, + clientId varchar(255) not null, hash text not null, foreign key (clientId) references clients(id), unique(clientId, hash) @@ -33,10 +33,11 @@ CREATE TABLE documentCleans ( documentId uuid not null, bucket text, key text, + hash text, mimetype cleanMimeType, fail cleanFailType, foreign key (documentId) references documents(id), - CONSTRAINT bucket_and_key_together CHECK ((bucket IS NULL) = (key IS NULL) and (bucket is null) = (mimetype is null)), + CONSTRAINT bucket_and_key_together CHECK ((bucket IS NULL) = (key IS NULL) and (bucket is null) = (mimetype is null) and (bucket is null) = (hash is null)), CONSTRAINT location_xor_fail CHECK ( (bucket IS NOT NULL) != (fail IS NOT NULL) ) @@ -49,19 +50,26 @@ CREATE TABLE documentCleanEntries ( foreign key (cleanId) references documentCleans(id) ); +CREATE TABLE documentTextTriggerExtractions ( + id uuid primary key DEFAULT uuid_generate_v7(), + cleanId uuid not null, + version bigint not null, + textractJobId text, + foreign key (cleanId) references documentCleans(id) +); + CREATE TABLE documentTextExtractions ( id uuid primary key DEFAULT uuid_generate_v7(), - cleanEntryId uuid not null, bucket text not null, key text not null, - hash text not null, - foreign key (cleanEntryId) references documentCleans(id), - unique(cleanEntryId, hash) + hash text not null ); CREATE TABLE documentTextExtractionEntries ( id uuid primary key DEFAULT uuid_generate_v7(), textId uuid not null, + triggerId uuid not null, version bigint not null, + foreign key (triggerId) references documentTextTriggerExtractions(id), foreign key (textId) references documentTextExtractions(id) ); diff --git a/internal/database/migrations/00000000000102_document_views.up.sql b/internal/database/migrations/00000000000102_document_views.up.sql index 239eaf6a..ea95a642 100644 --- a/internal/database/migrations/00000000000102_document_views.up.sql +++ b/internal/database/migrations/00000000000102_document_views.up.sql @@ -1,5 +1,5 @@ CREATE OR REPLACE FUNCTION listDocumentIDs( - _clientId uuid, + _clientId varchar(255), _batchSize INTEGER, _offset INTEGER ) @@ -28,7 +28,9 @@ WITH RankedExtractions AS ( dc.key, dc.mimetype, dc.fail, + dc.hash, dce.version, + d.clientId, ROW_NUMBER() OVER (PARTITION BY dc.documentId ORDER BY dc.id DESC, dce.id DESC) as row_num FROM documents d JOIN currentCollectorMinCleanVersions ccv ON d.clientId = ccv.clientId @@ -37,14 +39,16 @@ WITH RankedExtractions AS ( AND dce.version >= ccv.minCleanVersion ) SELECT - id, - documentId, - bucket, - key, - version, - mimetype, - fail -FROM RankedExtractions + re.id, + re.documentId, + re.bucket, + re.key, + re.version, + re.hash, + re.mimetype, + re.fail, + re.clientId +FROM RankedExtractions re WHERE row_num = 1; CREATE VIEW currentTextEntries as @@ -55,24 +59,32 @@ WITH RankedExtractions AS ( dte.bucket, dte.key, dte.hash, - dtee.version, - dte.cleanEntryId, + trigger.id as triggerId, + trigger.cleanId, + trigger.textractJobId, + trigger.version as triggerVersion, + dtee.version as extractionVersion, ROW_NUMBER() OVER (PARTITION BY cc.documentId ORDER BY dte.id DESC) as row_num FROM documents d JOIN currentCleanEntries cc on cc.documentId = d.id JOIN currentCollectorMinTextVersions ctv ON ctv.clientId = d.clientId - JOIN documentTextExtractions dte ON dte.cleanEntryId = cc.id - JOIN documentTextExtractionEntries dtee on dte.id = dtee.textId + JOIN documentTextTriggerExtractions trigger ON trigger.cleanId = cc.id + AND trigger.version >= ctv.minTextVersion + JOIN documentTextExtractionEntries dtee on dtee.triggerId = trigger.id AND dtee.version >= ctv.minTextVersion + JOIN documentTextExtractions dte ON dte.id = dtee.textId ) SELECT id, documentId, bucket, key, - version, hash, - cleanEntryId + cleanId, + triggerId, + textractJobId, + triggerVersion, + extractionVersion FROM RankedExtractions WHERE row_num = 1; @@ -92,7 +104,7 @@ FROM clients c LEFT JOIN RankedExtractions r on r.clientId = c.id and r.row_num = 1; CREATE VIEW fullClients as -SELECT c.id, c.externalId, c.name, cs.canSync +SELECT c.id, c.name, cs.canSync FROM clients as c JOIN currentClientCanSync as cs on cs.clientId = c.id; diff --git a/internal/database/migrations_test.go b/internal/database/migrations_test.go index 5ecf7add..ece55045 100644 --- a/internal/database/migrations_test.go +++ b/internal/database/migrations_test.go @@ -6,7 +6,6 @@ import ( migrations "queryorchestration/internal/database" "queryorchestration/internal/serviceconfig" - "queryorchestration/internal/serviceconfig/database" "queryorchestration/internal/test" "github.com/stretchr/testify/assert" @@ -22,9 +21,7 @@ func TestRunMigrations(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, - }) + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{}) defer cleanup() err := migrations.RunMigrations(ctx, cfg) @@ -36,14 +33,12 @@ func TestRunMigrationsNoDB(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - cfg.SetDBConfig(&database.DBConfig{ - DBUser: "invalid_user", - DBSecret: "invalid_pass", - DBHost: "invalid_host", - DBPort: 5432, - DBName: "invalid_name", - DBNoSSL: true, - }) + cfg.SetDBUser("invalid_user") + cfg.SetDBSecret("invalid_pass") + cfg.SetDBHost("invalid_host") + cfg.SetDBPort(5432) + cfg.SetDBName("invalid_name") + cfg.SetDBNoSSL(true) err := migrations.RunMigrations(ctx, cfg) assert.Error(t, err) diff --git a/internal/database/queries/clean.sql b/internal/database/queries/clean.sql index 17fcccc5..0eb625e9 100644 --- a/internal/database/queries/clean.sql +++ b/internal/database/queries/clean.sql @@ -4,24 +4,24 @@ SELECT EXISTS( ); -- name: GetCleanEntry :one -SELECT id, documentId, bucket, key, version, mimetype, fail +SELECT id, documentId, bucket, key, version, hash, mimetype, fail, clientId FROM currentCleanEntries WHERE id = @cleanId; -- name: GetCleanEntryByDocId :one -SELECT id, documentId, bucket, key, version, mimetype, fail +SELECT id, documentId, bucket, key, version, hash, mimetype, fail, clientId FROM currentCleanEntries WHERE documentId = @documentId; -- name: AddDocumentClean :one -INSERT INTO documentCleans (documentId, bucket, key, mimetype, fail) VALUES ($1, $2, $3, $4, $5) returning id; +INSERT INTO documentCleans (documentId, bucket, key, hash, mimetype, fail) VALUES ($1, $2, $3, $4, $5, $6) returning id; -- name: AddDocumentCleanEntry :exec INSERT INTO documentCleanEntries (cleanId, version) VALUES ($1, $2); -- name: GetMostRecentDocumentCleanEntry :one WITH cleans as ( - SELECT id, documentId, bucket, key, mimetype, fail + SELECT id, documentId, bucket, key, hash, mimetype, fail FROM documentCleans dc WHERE documentId = @documentId ORDER BY id DESC ) @@ -31,6 +31,7 @@ SELECT dc.bucket, dc.key, dce.version, + dc.hash, dc.mimetype, dc.fail FROM cleans dc diff --git a/internal/database/queries/client.sql b/internal/database/queries/client.sql index 768dfc4f..e504800c 100644 --- a/internal/database/queries/client.sql +++ b/internal/database/queries/client.sql @@ -1,12 +1,9 @@ --- name: CreateClient :one -INSERT INTO clients (externalId, name) VALUES ($1, $2) RETURNING id; +-- name: CreateClient :exec +INSERT INTO clients (id, name) VALUES ($1, $2); -- name: GetClient :one SELECT * FROM fullClients WHERE id = $1; --- name: GetClientByExternalId :one -SELECT * FROM fullClients WHERE externalId = $1; - -- name: UpdateClient :exec UPDATE clients SET name = $1 WHERE id = $2; @@ -39,7 +36,7 @@ doc_text_entries AS ( d.clean_fail FROM doc_clean_entries d - LEFT JOIN currentTextEntries cte ON cte.cleanEntryId = d.clean_entry_id + LEFT JOIN currentTextEntries cte ON cte.cleanId = d.clean_entry_id ), required_results AS ( -- All required document-query-version combinations diff --git a/internal/database/queries/collector.sql b/internal/database/queries/collector.sql index 5c0b7d05..6e946f16 100644 --- a/internal/database/queries/collector.sql +++ b/internal/database/queries/collector.sql @@ -4,14 +4,6 @@ SELECT * FROM collectorQueryDependencyTree WHERE clientId = @clientId; -- name: GetCollectorByClientID :one SELECT * FROM fullActiveCollectors WHERE clientId = @clientId LIMIT 1; --- name: GetCollectorByClientExternalID :one -WITH client as ( - SELECT id from clients where externalId = @clientId -) -SELECT fc.* - FROM fullActiveCollectors as fc - JOIN client as c ON fc.clientId = c.id LIMIT 1; - -- name: AddLatestCollectorVersion :one INSERT INTO collectorVersions (clientId) VALUES ($1) RETURNING id; diff --git a/internal/database/queries/document.sql b/internal/database/queries/document.sql index 9b195348..3abb737d 100644 --- a/internal/database/queries/document.sql +++ b/internal/database/queries/document.sql @@ -20,21 +20,15 @@ namedResults AS ( ) SELECT d.id, - c.externalId AS clientId, + d.clientId, d.hash, COALESCE(jsonb_object_agg(r.name, r.value) FILTER (WHERE r.name IS NOT NULL), '{}') AS fields FROM docs AS d -JOIN clients AS c ON c.id = d.clientId LEFT JOIN namedResults AS r ON d.id = r.id -GROUP BY d.id, c.externalId, d.hash; +GROUP BY d.id, d.clientId, d.hash; --- name: ListDocumentsByClientExternalId :many -WITH client as ( - SELECT id from clients where externalId = @clientId -) -SELECT d.id, d.hash - from documents as d - JOIN client as c on d.clientId = c.id; +-- name: ListDocumentsByClient :many +SELECT id, hash from documents where clientId = @clientId; -- name: CreateDocument :one INSERT INTO documents (clientId, hash) VALUES ($1, $2) RETURNING id; diff --git a/internal/database/queries/text.sql b/internal/database/queries/text.sql index 9f177d1d..a90fa378 100644 --- a/internal/database/queries/text.sql +++ b/internal/database/queries/text.sql @@ -4,17 +4,28 @@ SELECT EXISTS( ); -- name: GetDocumentTextExtractionByHash :one -SELECT id, documentId, bucket, key, version, hash, cleanEntryId - FROM currentTextEntries - WHERE cleanEntryId = @cleanEntryId and hash = @hash; +SELECT id FROM currentTextEntries WHERE cleanId = @cleanEntryId and hash = @hash; + +-- name: AddDocumentTextTrigger :one +INSERT INTO documentTextTriggerExtractions (cleanId, version) VALUES ($1, $2) returning id; + +-- name: AddDocumentTextTriggerJobId :exec +UPDATE documentTextTriggerExtractions SET textractJobId = @textractJobId WHERE id = @id; + +-- name: GetDocumentTextTrigger :one +SELECT dt.id, dt.cleanId, dt.version, dt.textractJobId, dc.documentId + from documentTextTriggerExtractions as dt + join documentCleans as dc on dt.cleanId = dc.id + where dt.id = @triggerId; -- name: AddDocumentText :one -INSERT INTO documentTextExtractions (bucket, key, cleanEntryId, hash) VALUES ($1, $2, $3, $4) returning id; +INSERT INTO documentTextExtractions (bucket, key, hash) VALUES ($1, $2, $3) returning id; -- name: AddDocumentTextEntry :exec -INSERT INTO documentTextExtractionEntries (textId, version) VALUES ($1, $2); +INSERT INTO documentTextExtractionEntries (textId, triggerId, version) VALUES ($1, $2, $3); -- name: GetTextEntryByDocId :one -SELECT id, documentId, bucket, key, version, hash, cleanEntryId +SELECT id, documentId, bucket, key, hash, cleanId, + triggerId, textractJobId, triggerVersion, extractionVersion FROM currentTextEntries WHERE documentId = @documentId; diff --git a/internal/database/repository/clean.sql.go b/internal/database/repository/clean.sql.go index 7988ffbb..bb160b1c 100644 --- a/internal/database/repository/clean.sql.go +++ b/internal/database/repository/clean.sql.go @@ -12,25 +12,27 @@ import ( ) const addDocumentClean = `-- name: AddDocumentClean :one -INSERT INTO documentCleans (documentId, bucket, key, mimetype, fail) VALUES ($1, $2, $3, $4, $5) returning id +INSERT INTO documentCleans (documentId, bucket, key, hash, mimetype, fail) VALUES ($1, $2, $3, $4, $5, $6) returning id ` type AddDocumentCleanParams struct { Documentid uuid.UUID `db:"documentid"` Bucket *string `db:"bucket"` Key *string `db:"key"` + Hash *string `db:"hash"` Mimetype NullCleanmimetype `db:"mimetype"` Fail NullCleanfailtype `db:"fail"` } // AddDocumentClean // -// INSERT INTO documentCleans (documentId, bucket, key, mimetype, fail) VALUES ($1, $2, $3, $4, $5) returning id +// INSERT INTO documentCleans (documentId, bucket, key, hash, mimetype, fail) VALUES ($1, $2, $3, $4, $5, $6) returning id func (q *Queries) AddDocumentClean(ctx context.Context, arg *AddDocumentCleanParams) (uuid.UUID, error) { row := q.db.QueryRow(ctx, addDocumentClean, arg.Documentid, arg.Bucket, arg.Key, + arg.Hash, arg.Mimetype, arg.Fail, ) @@ -57,14 +59,14 @@ func (q *Queries) AddDocumentCleanEntry(ctx context.Context, arg *AddDocumentCle } const getCleanEntry = `-- name: GetCleanEntry :one -SELECT id, documentId, bucket, key, version, mimetype, fail +SELECT id, documentId, bucket, key, version, hash, mimetype, fail, clientId FROM currentCleanEntries WHERE id = $1 ` // GetCleanEntry // -// SELECT id, documentId, bucket, key, version, mimetype, fail +// SELECT id, documentId, bucket, key, version, hash, mimetype, fail, clientId // FROM currentCleanEntries // WHERE id = $1 func (q *Queries) GetCleanEntry(ctx context.Context, cleanid uuid.UUID) (*Currentcleanentry, error) { @@ -76,21 +78,23 @@ func (q *Queries) GetCleanEntry(ctx context.Context, cleanid uuid.UUID) (*Curren &i.Bucket, &i.Key, &i.Version, + &i.Hash, &i.Mimetype, &i.Fail, + &i.Clientid, ) return &i, err } const getCleanEntryByDocId = `-- name: GetCleanEntryByDocId :one -SELECT id, documentId, bucket, key, version, mimetype, fail +SELECT id, documentId, bucket, key, version, hash, mimetype, fail, clientId FROM currentCleanEntries WHERE documentId = $1 ` // GetCleanEntryByDocId // -// SELECT id, documentId, bucket, key, version, mimetype, fail +// SELECT id, documentId, bucket, key, version, hash, mimetype, fail, clientId // FROM currentCleanEntries // WHERE documentId = $1 func (q *Queries) GetCleanEntryByDocId(ctx context.Context, documentid uuid.UUID) (*Currentcleanentry, error) { @@ -102,15 +106,17 @@ func (q *Queries) GetCleanEntryByDocId(ctx context.Context, documentid uuid.UUID &i.Bucket, &i.Key, &i.Version, + &i.Hash, &i.Mimetype, &i.Fail, + &i.Clientid, ) return &i, err } const getMostRecentDocumentCleanEntry = `-- name: GetMostRecentDocumentCleanEntry :one WITH cleans as ( - SELECT id, documentId, bucket, key, mimetype, fail + SELECT id, documentId, bucket, key, hash, mimetype, fail FROM documentCleans dc WHERE documentId = $1 ORDER BY id DESC ) @@ -120,6 +126,7 @@ SELECT dc.bucket, dc.key, dce.version, + dc.hash, dc.mimetype, dc.fail FROM cleans dc @@ -134,6 +141,7 @@ type GetMostRecentDocumentCleanEntryRow struct { Bucket *string `db:"bucket"` Key *string `db:"key"` Version int64 `db:"version"` + Hash *string `db:"hash"` Mimetype NullCleanmimetype `db:"mimetype"` Fail NullCleanfailtype `db:"fail"` } @@ -141,7 +149,7 @@ type GetMostRecentDocumentCleanEntryRow struct { // GetMostRecentDocumentCleanEntry // // WITH cleans as ( -// SELECT id, documentId, bucket, key, mimetype, fail +// SELECT id, documentId, bucket, key, hash, mimetype, fail // FROM documentCleans dc // WHERE documentId = $1 ORDER BY id DESC // ) @@ -151,6 +159,7 @@ type GetMostRecentDocumentCleanEntryRow struct { // dc.bucket, // dc.key, // dce.version, +// dc.hash, // dc.mimetype, // dc.fail // FROM cleans dc @@ -166,6 +175,7 @@ func (q *Queries) GetMostRecentDocumentCleanEntry(ctx context.Context, documenti &i.Bucket, &i.Key, &i.Version, + &i.Hash, &i.Mimetype, &i.Fail, ) diff --git a/internal/database/repository/clean_test.go b/internal/database/repository/clean_test.go index 47490cf0..67c339e9 100644 --- a/internal/database/repository/clean_test.go +++ b/internal/database/repository/clean_test.go @@ -20,17 +20,17 @@ func TestClean(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() queries := cfg.GetDBQueries() - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientId := "EXAMPLE" + err := queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) @@ -48,6 +48,7 @@ func TestClean(t *testing.T) { bucket := "example_bucket" key := "example_key" + cleanHash := "hello" mimetype := repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -60,6 +61,7 @@ func TestClean(t *testing.T) { Documentid: id, Bucket: &bucket, Key: &key, + Hash: &cleanHash, Mimetype: mimetype, Fail: fail, }) @@ -85,14 +87,17 @@ func TestClean(t *testing.T) { assert.Equal(t, id, clean.Documentid) assert.Nil(t, clean.Bucket) assert.Nil(t, clean.Key) + assert.Nil(t, clean.Hash) assert.Equal(t, fail, clean.Fail) assert.Equal(t, int64(1), clean.Version) assert.Equal(t, failcleanid, clean.ID) + assert.Equal(t, "EXAMPLE", clean.Clientid) cleanid, err := queries.AddDocumentClean(ctx, &repository.AddDocumentCleanParams{ Documentid: id, Bucket: &bucket, Key: &key, + Hash: &cleanHash, Mimetype: mimetype, }) require.NoError(t, err) @@ -112,9 +117,11 @@ func TestClean(t *testing.T) { assert.False(t, clean.Fail.Valid) assert.Equal(t, bucket, *clean.Bucket) assert.Equal(t, key, *clean.Key) + assert.Equal(t, cleanHash, *clean.Hash) assert.Equal(t, mimetype, clean.Mimetype) assert.Equal(t, int64(2), clean.Version) assert.Equal(t, cleanid, clean.ID) + assert.Equal(t, "EXAMPLE", clean.Clientid) docclean, err := queries.GetCleanEntryByDocId(ctx, id) require.NoError(t, err) @@ -125,6 +132,7 @@ func TestClean(t *testing.T) { assert.Equal(t, clean.Documentid, recent.Documentid) assert.Equal(t, clean.Bucket, recent.Bucket) assert.Equal(t, clean.Key, recent.Key) + assert.Equal(t, clean.Hash, recent.Hash) assert.Equal(t, clean.Mimetype, recent.Mimetype) assert.Equal(t, clean.Fail, recent.Fail) assert.Equal(t, clean.Version, recent.Version) @@ -153,6 +161,7 @@ func TestClean(t *testing.T) { assert.Equal(t, clean.Documentid, recent.Documentid) assert.Equal(t, clean.Bucket, recent.Bucket) assert.Equal(t, clean.Key, recent.Key) + assert.Equal(t, clean.Hash, recent.Hash) assert.Equal(t, clean.Mimetype, recent.Mimetype) assert.Equal(t, clean.Fail, recent.Fail) assert.Equal(t, clean.Version, recent.Version) diff --git a/internal/database/repository/client.sql.go b/internal/database/repository/client.sql.go index 1ca4665c..84e6bee4 100644 --- a/internal/database/repository/client.sql.go +++ b/internal/database/repository/client.sql.go @@ -7,8 +7,6 @@ package repository import ( "context" - - "github.com/google/uuid" ) const addClientCanSync = `-- name: AddClientCanSync :exec @@ -16,8 +14,8 @@ INSERT INTO clientCanSync (canSync, clientId) VALUES ($1, $2) ` type AddClientCanSyncParams struct { - Cansync bool `db:"cansync"` - Clientid uuid.UUID `db:"clientid"` + Cansync bool `db:"cansync"` + Clientid string `db:"clientid"` } // AddClientCanSync @@ -28,60 +26,34 @@ func (q *Queries) AddClientCanSync(ctx context.Context, arg *AddClientCanSyncPar return err } -const createClient = `-- name: CreateClient :one -INSERT INTO clients (externalId, name) VALUES ($1, $2) RETURNING id +const createClient = `-- name: CreateClient :exec +INSERT INTO clients (id, name) VALUES ($1, $2) ` type CreateClientParams struct { - Externalid string `db:"externalid"` - Name string `db:"name"` + ID string `db:"id"` + Name string `db:"name"` } // CreateClient // -// INSERT INTO clients (externalId, name) VALUES ($1, $2) RETURNING id -func (q *Queries) CreateClient(ctx context.Context, arg *CreateClientParams) (uuid.UUID, error) { - row := q.db.QueryRow(ctx, createClient, arg.Externalid, arg.Name) - var id uuid.UUID - err := row.Scan(&id) - return id, err +// INSERT INTO clients (id, name) VALUES ($1, $2) +func (q *Queries) CreateClient(ctx context.Context, arg *CreateClientParams) error { + _, err := q.db.Exec(ctx, createClient, arg.ID, arg.Name) + return err } const getClient = `-- name: GetClient :one -SELECT id, externalid, name, cansync FROM fullClients WHERE id = $1 +SELECT id, name, cansync FROM fullClients WHERE id = $1 ` // GetClient // -// SELECT id, externalid, name, cansync FROM fullClients WHERE id = $1 -func (q *Queries) GetClient(ctx context.Context, id uuid.UUID) (*Fullclient, error) { +// SELECT id, name, cansync FROM fullClients WHERE id = $1 +func (q *Queries) GetClient(ctx context.Context, id string) (*Fullclient, error) { row := q.db.QueryRow(ctx, getClient, id) var i Fullclient - err := row.Scan( - &i.ID, - &i.Externalid, - &i.Name, - &i.Cansync, - ) - return &i, err -} - -const getClientByExternalId = `-- name: GetClientByExternalId :one -SELECT id, externalid, name, cansync FROM fullClients WHERE externalId = $1 -` - -// GetClientByExternalId -// -// SELECT id, externalid, name, cansync FROM fullClients WHERE externalId = $1 -func (q *Queries) GetClientByExternalId(ctx context.Context, externalid string) (*Fullclient, error) { - row := q.db.QueryRow(ctx, getClientByExternalId, externalid) - var i Fullclient - err := row.Scan( - &i.ID, - &i.Externalid, - &i.Name, - &i.Cansync, - ) + err := row.Scan(&i.ID, &i.Name, &i.Cansync) return &i, err } @@ -111,7 +83,7 @@ doc_text_entries AS ( d.clean_fail FROM doc_clean_entries d - LEFT JOIN currentTextEntries cte ON cte.cleanEntryId = d.clean_entry_id + LEFT JOIN currentTextEntries cte ON cte.cleanId = d.clean_entry_id ), required_results AS ( -- All required document-query-version combinations @@ -209,7 +181,7 @@ SELECT ( // d.clean_fail // FROM // doc_clean_entries d -// LEFT JOIN currentTextEntries cte ON cte.cleanEntryId = d.clean_entry_id +// LEFT JOIN currentTextEntries cte ON cte.cleanId = d.clean_entry_id // ), // required_results AS ( // -- All required document-query-version combinations @@ -278,7 +250,7 @@ SELECT ( // NOT EXISTS (SELECT 1 FROM dependency_check) // )::bool // )::bool as is_synced -func (q *Queries) IsClientSynced(ctx context.Context, dollar_1 *uuid.UUID) (bool, error) { +func (q *Queries) IsClientSynced(ctx context.Context, dollar_1 *string) (bool, error) { row := q.db.QueryRow(ctx, isClientSynced, dollar_1) var is_synced bool err := row.Scan(&is_synced) @@ -290,8 +262,8 @@ UPDATE clients SET name = $1 WHERE id = $2 ` type UpdateClientParams struct { - Name string `db:"name"` - ID uuid.UUID `db:"id"` + Name string `db:"name"` + ID string `db:"id"` } // UpdateClient diff --git a/internal/database/repository/client_test.go b/internal/database/repository/client_test.go index 8b8a0cb8..0642b2e6 100644 --- a/internal/database/repository/client_test.go +++ b/internal/database/repository/client_test.go @@ -20,8 +20,7 @@ func TestClient(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -29,76 +28,68 @@ func TestClient(t *testing.T) { queries := cfg.GetDBQueries() name := "example_name" - externalId := "EXAMPLE" - id, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: name, - Externalid: externalId, + clientId := "EXAMPLE" + err := queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: name, + ID: clientId, }) require.NoError(t, err) - assert.NotEmpty(t, id) - client, err := queries.GetClient(ctx, id) + client, err := queries.GetClient(ctx, clientId) require.NoError(t, err) assert.EqualExportedValues(t, &repository.Fullclient{ - ID: id, - Name: name, - Externalid: externalId, - Cansync: false, + ID: clientId, + Name: name, + Cansync: false, }, client) - externalClient, err := queries.GetClientByExternalId(ctx, externalId) - require.NoError(t, err) - assert.EqualExportedValues(t, client, externalClient) - name = "updated_client" err = queries.UpdateClient(ctx, &repository.UpdateClientParams{ - ID: id, + ID: clientId, Name: name, }) require.NoError(t, err) - client, err = queries.GetClient(ctx, id) + client, err = queries.GetClient(ctx, clientId) require.NoError(t, err) assert.EqualExportedValues(t, &repository.Fullclient{ - ID: id, - Name: name, - Externalid: externalId, - Cansync: false, + ID: clientId, + Name: name, + Cansync: false, }, client) err = queries.AddClientCanSync(ctx, &repository.AddClientCanSyncParams{ - Clientid: id, + Clientid: clientId, Cansync: true, }) require.NoError(t, err) - client, err = queries.GetClient(ctx, id) + client, err = queries.GetClient(ctx, clientId) require.NoError(t, err) assert.EqualExportedValues(t, &repository.Fullclient{ - ID: id, - Name: name, - Externalid: externalId, - Cansync: true, + ID: clientId, + Name: name, + Cansync: true, }, client) - _, err = queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: name, - Externalid: externalId, + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: name, + ID: clientId, }) assert.Error(t, err) - _, err = queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: name, - Externalid: "definitely different", + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: name, + ID: "definitely different", }) assert.Error(t, err) - _, err = queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "100 different", - Externalid: externalId, + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "100 different", + ID: clientId, }) assert.Error(t, err) - _, err = queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "sameid", - Externalid: "sameid", + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "sameid", + ID: "sameid", }) require.NoError(t, err) } diff --git a/internal/database/repository/collector.sql.go b/internal/database/repository/collector.sql.go index b1f80a34..5c4e751c 100644 --- a/internal/database/repository/collector.sql.go +++ b/internal/database/repository/collector.sql.go @@ -16,7 +16,7 @@ INSERT INTO collectorQueries (clientId, name, queryId, addedVersion) VALUES ($1, ` type AddCollectorQueryParams struct { - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Name string `db:"name"` Queryid uuid.UUID `db:"queryid"` Addedversion int32 `db:"addedversion"` @@ -42,44 +42,13 @@ INSERT INTO collectorVersions (clientId) VALUES ($1) RETURNING id // AddLatestCollectorVersion // // INSERT INTO collectorVersions (clientId) VALUES ($1) RETURNING id -func (q *Queries) AddLatestCollectorVersion(ctx context.Context, clientid uuid.UUID) (int32, error) { +func (q *Queries) AddLatestCollectorVersion(ctx context.Context, clientid string) (int32, error) { row := q.db.QueryRow(ctx, addLatestCollectorVersion, clientid) var id int32 err := row.Scan(&id) return id, err } -const getCollectorByClientExternalID = `-- name: GetCollectorByClientExternalID :one -WITH client as ( - SELECT id from clients where externalId = $1 -) -SELECT fc.clientid, fc.mincleanversion, fc.mintextversion, fc.activeversion, fc.latestversion, fc.fields - FROM fullActiveCollectors as fc - JOIN client as c ON fc.clientId = c.id LIMIT 1 -` - -// GetCollectorByClientExternalID -// -// WITH client as ( -// SELECT id from clients where externalId = $1 -// ) -// SELECT fc.clientid, fc.mincleanversion, fc.mintextversion, fc.activeversion, fc.latestversion, fc.fields -// FROM fullActiveCollectors as fc -// JOIN client as c ON fc.clientId = c.id LIMIT 1 -func (q *Queries) GetCollectorByClientExternalID(ctx context.Context, clientid string) (*Fullactivecollector, error) { - row := q.db.QueryRow(ctx, getCollectorByClientExternalID, clientid) - var i Fullactivecollector - err := row.Scan( - &i.Clientid, - &i.Mincleanversion, - &i.Mintextversion, - &i.Activeversion, - &i.Latestversion, - &i.Fields, - ) - return &i, err -} - const getCollectorByClientID = `-- name: GetCollectorByClientID :one SELECT clientid, mincleanversion, mintextversion, activeversion, latestversion, fields FROM fullActiveCollectors WHERE clientId = $1 LIMIT 1 ` @@ -87,7 +56,7 @@ SELECT clientid, mincleanversion, mintextversion, activeversion, latestversion, // GetCollectorByClientID // // SELECT clientid, mincleanversion, mintextversion, activeversion, latestversion, fields FROM fullActiveCollectors WHERE clientId = $1 LIMIT 1 -func (q *Queries) GetCollectorByClientID(ctx context.Context, clientid uuid.UUID) (*Fullactivecollector, error) { +func (q *Queries) GetCollectorByClientID(ctx context.Context, clientid string) (*Fullactivecollector, error) { row := q.db.QueryRow(ctx, getCollectorByClientID, clientid) var i Fullactivecollector err := row.Scan( @@ -108,7 +77,7 @@ SELECT clientid, queryid, type, queryversion, requiredids FROM collectorQueryDep // ListCollectorQueries // // SELECT clientid, queryid, type, queryversion, requiredids FROM collectorQueryDependencyTree WHERE clientId = $1 -func (q *Queries) ListCollectorQueries(ctx context.Context, clientid uuid.UUID) ([]*Collectorquerydependencytree, error) { +func (q *Queries) ListCollectorQueries(ctx context.Context, clientid string) ([]*Collectorquerydependencytree, error) { rows, err := q.db.Query(ctx, listCollectorQueries, clientid) if err != nil { return nil, err @@ -141,7 +110,7 @@ UPDATE collectorQueries SET removedVersion = $1 WHERE queryId = $2 and clientId type RemoveCollectorQueryParams struct { Removedversion *int32 `db:"removedversion"` Queryid uuid.UUID `db:"queryid"` - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` } // RemoveCollectorQuery @@ -157,8 +126,8 @@ INSERT INTO collectorActiveVersions (clientId, versionId) VALUES ($1, $2) ` type SetActiveCollectorVersionParams struct { - Clientid uuid.UUID `db:"clientid"` - Versionid int32 `db:"versionid"` + Clientid string `db:"clientid"` + Versionid int32 `db:"versionid"` } // SetActiveCollectorVersion @@ -174,9 +143,9 @@ INSERT INTO collectorMinCleanVersions (clientId, addedVersion, versionId) VALUES ` type SetCollectorCleanVersionParams struct { - Clientid uuid.UUID `db:"clientid"` - Addedversion int32 `db:"addedversion"` - Versionid int64 `db:"versionid"` + Clientid string `db:"clientid"` + Addedversion int32 `db:"addedversion"` + Versionid int64 `db:"versionid"` } // SetCollectorCleanVersion @@ -192,9 +161,9 @@ INSERT INTO collectorMinTextVersions (clientId, addedVersion, versionId) VALUES ` type SetCollectorTextVersionParams struct { - Clientid uuid.UUID `db:"clientid"` - Addedversion int32 `db:"addedversion"` - Versionid int64 `db:"versionid"` + Clientid string `db:"clientid"` + Addedversion int32 `db:"addedversion"` + Versionid int64 `db:"versionid"` } // SetCollectorTextVersion diff --git a/internal/database/repository/collector_test.go b/internal/database/repository/collector_test.go index bc442633..f5216b5f 100644 --- a/internal/database/repository/collector_test.go +++ b/internal/database/repository/collector_test.go @@ -22,8 +22,7 @@ func TestCollector(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -49,9 +48,10 @@ func TestCollector(t *testing.T) { }) require.NoError(t, err) - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientId := "EXAMPLE" + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) minCleanVersion := int64(2) diff --git a/internal/database/repository/document.sql.go b/internal/database/repository/document.sql.go index b2cef408..9ad9ca66 100644 --- a/internal/database/repository/document.sql.go +++ b/internal/database/repository/document.sql.go @@ -34,8 +34,8 @@ INSERT INTO documents (clientId, hash) VALUES ($1, $2) RETURNING id ` type CreateDocumentParams struct { - Clientid uuid.UUID `db:"clientid"` - Hash string `db:"hash"` + Clientid string `db:"clientid"` + Hash string `db:"hash"` } // CreateDocument @@ -87,13 +87,12 @@ namedResults AS ( ) SELECT d.id, - c.externalId AS clientId, + d.clientId, d.hash, COALESCE(jsonb_object_agg(r.name, r.value) FILTER (WHERE r.name IS NOT NULL), '{}') AS fields FROM docs AS d -JOIN clients AS c ON c.id = d.clientId LEFT JOIN namedResults AS r ON d.id = r.id -GROUP BY d.id, c.externalId, d.hash +GROUP BY d.id, d.clientId, d.hash ` type GetDocumentExternalRow struct { @@ -123,14 +122,13 @@ type GetDocumentExternalRow struct { // ) // SELECT // d.id, -// c.externalId AS clientId, +// d.clientId, // d.hash, // COALESCE(jsonb_object_agg(r.name, r.value) FILTER (WHERE r.name IS NOT NULL), '{}') AS fields // FROM docs AS d -// JOIN clients AS c ON c.id = d.clientId // LEFT JOIN namedResults AS r ON d.id = r.id -// GROUP BY d.id, c.externalId, d.hash -func (q *Queries) GetDocumentExternal(ctx context.Context, documentid *uuid.UUID) (*GetDocumentExternalRow, error) { +// GROUP BY d.id, d.clientId, d.hash +func (q *Queries) GetDocumentExternal(ctx context.Context, documentid uuid.UUID) (*GetDocumentExternalRow, error) { row := q.db.QueryRow(ctx, getDocumentExternal, documentid) var i GetDocumentExternalRow err := row.Scan( @@ -147,8 +145,8 @@ SELECT id FROM documents WHERE hash = $1 and clientId = $2 ` type GetDocumentIDByHashParams struct { - Hash string `db:"hash"` - Clientid uuid.UUID `db:"clientid"` + Hash string `db:"hash"` + Clientid string `db:"clientid"` } // GetDocumentIDByHash @@ -180,9 +178,9 @@ SELECT id, totalCount FROM listDocumentIDs($1, $2, $3) ` type ListDocumentIDsBatchParams struct { - Clientid uuid.UUID `db:"clientid"` - Batchsize int32 `db:"batchsize"` - Pageoffset int32 `db:"pageoffset"` + Clientid string `db:"clientid"` + Batchsize int32 `db:"batchsize"` + Pageoffset int32 `db:"pageoffset"` } type ListDocumentIDsBatchRow struct { @@ -213,37 +211,27 @@ func (q *Queries) ListDocumentIDsBatch(ctx context.Context, arg *ListDocumentIDs return items, nil } -const listDocumentsByClientExternalId = `-- name: ListDocumentsByClientExternalId :many -WITH client as ( - SELECT id from clients where externalId = $1 -) -SELECT d.id, d.hash - from documents as d - JOIN client as c on d.clientId = c.id +const listDocumentsByClient = `-- name: ListDocumentsByClient :many +SELECT id, hash from documents where clientId = $1 ` -type ListDocumentsByClientExternalIdRow struct { +type ListDocumentsByClientRow struct { ID uuid.UUID `db:"id"` Hash string `db:"hash"` } -// ListDocumentsByClientExternalId +// ListDocumentsByClient // -// WITH client as ( -// SELECT id from clients where externalId = $1 -// ) -// SELECT d.id, d.hash -// from documents as d -// JOIN client as c on d.clientId = c.id -func (q *Queries) ListDocumentsByClientExternalId(ctx context.Context, clientid string) ([]*ListDocumentsByClientExternalIdRow, error) { - rows, err := q.db.Query(ctx, listDocumentsByClientExternalId, clientid) +// SELECT id, hash from documents where clientId = $1 +func (q *Queries) ListDocumentsByClient(ctx context.Context, clientid string) ([]*ListDocumentsByClientRow, error) { + rows, err := q.db.Query(ctx, listDocumentsByClient, clientid) if err != nil { return nil, err } defer rows.Close() - items := []*ListDocumentsByClientExternalIdRow{} + items := []*ListDocumentsByClientRow{} for rows.Next() { - var i ListDocumentsByClientExternalIdRow + var i ListDocumentsByClientRow if err := rows.Scan(&i.ID, &i.Hash); err != nil { return nil, err } diff --git a/internal/database/repository/document_test.go b/internal/database/repository/document_test.go index 0d7c3857..05d43ba9 100644 --- a/internal/database/repository/document_test.go +++ b/internal/database/repository/document_test.go @@ -20,22 +20,21 @@ func TestDocument(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() queries := cfg.GetDBQueries() - externalId := "example_id" - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_name", - Externalid: externalId, + clientId := "EXAMPLE" + err := queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) - docs, err := queries.ListDocumentsByClientExternalId(ctx, externalId) + docs, err := queries.ListDocumentsByClient(ctx, clientId) require.NoError(t, err) assert.Len(t, docs, 0) @@ -56,7 +55,7 @@ func TestDocument(t *testing.T) { }) require.NoError(t, err) - docs, err = queries.ListDocumentsByClientExternalId(ctx, externalId) + docs, err = queries.ListDocumentsByClient(ctx, clientId) require.NoError(t, err) assert.Len(t, docs, 1) assert.Equal(t, hash, docs[0].Hash) @@ -77,21 +76,21 @@ func TestDocument(t *testing.T) { }) require.NoError(t, err) - docs, err = queries.ListDocumentsByClientExternalId(ctx, externalId) + docs, err = queries.ListDocumentsByClient(ctx, clientId) require.NoError(t, err) assert.Len(t, docs, 2) - externalTwoId := "EXAMPLE TWO" - clientTwoId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_name_two", - Externalid: externalTwoId, + clientTwoId := "EXAMPLE TWO" + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_name_two", + ID: clientTwoId, }) require.NoError(t, err) - docs, err = queries.ListDocumentsByClientExternalId(ctx, externalId) + docs, err = queries.ListDocumentsByClient(ctx, clientId) require.NoError(t, err) assert.Len(t, docs, 2) - docs, err = queries.ListDocumentsByClientExternalId(ctx, externalTwoId) + docs, err = queries.ListDocumentsByClient(ctx, clientTwoId) require.NoError(t, err) assert.Len(t, docs, 0) @@ -110,10 +109,10 @@ func TestDocument(t *testing.T) { }) require.NoError(t, err) - docs, err = queries.ListDocumentsByClientExternalId(ctx, externalId) + docs, err = queries.ListDocumentsByClient(ctx, clientId) require.NoError(t, err) assert.Len(t, docs, 2) - docs, err = queries.ListDocumentsByClientExternalId(ctx, externalTwoId) + docs, err = queries.ListDocumentsByClient(ctx, clientTwoId) require.NoError(t, err) assert.Len(t, docs, 1) assert.Equal(t, hash, docs[0].Hash) @@ -126,11 +125,11 @@ func TestDocument(t *testing.T) { Hash: hash, }, doc) - docext, err := queries.GetDocumentExternal(ctx, &id) + docext, err := queries.GetDocumentExternal(ctx, id) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: id, - Clientid: externalId, + Clientid: clientId, Hash: hash, Fields: []byte("{}"), }, docext) diff --git a/internal/database/repository/models.go b/internal/database/repository/models.go index 9ce2b233..85e4a2dd 100644 --- a/internal/database/repository/models.go +++ b/internal/database/repository/models.go @@ -180,36 +180,35 @@ func (e Querytype) Valid() bool { } type Client struct { - ID uuid.UUID `db:"id"` - Externalid string `db:"externalid"` - Name string `db:"name"` + ID string `db:"id"` + Name string `db:"name"` } type Clientcansync struct { ID uuid.UUID `db:"id"` - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Cansync bool `db:"cansync"` } type Collectoractiveversion struct { ID uuid.UUID `db:"id"` - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Versionid int32 `db:"versionid"` } type Collectorcurrentactiveversion struct { - Clientid uuid.UUID `db:"clientid"` - Activeversion int32 `db:"activeversion"` + Clientid string `db:"clientid"` + Activeversion int32 `db:"activeversion"` } type Collectorlatestversion struct { - Clientid uuid.UUID `db:"clientid"` - Latestversion int32 `db:"latestversion"` + Clientid string `db:"clientid"` + Latestversion int32 `db:"latestversion"` } type Collectormincleanversion struct { ID uuid.UUID `db:"id"` - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Versionid int64 `db:"versionid"` Addedversion int32 `db:"addedversion"` Removedversion *int32 `db:"removedversion"` @@ -217,7 +216,7 @@ type Collectormincleanversion struct { type Collectormintextversion struct { ID uuid.UUID `db:"id"` - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Versionid int64 `db:"versionid"` Addedversion int32 `db:"addedversion"` Removedversion *int32 `db:"removedversion"` @@ -225,7 +224,7 @@ type Collectormintextversion struct { type Collectorquery struct { ID uuid.UUID `db:"id"` - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Name string `db:"name"` Queryid uuid.UUID `db:"queryid"` Addedversion int32 `db:"addedversion"` @@ -233,7 +232,7 @@ type Collectorquery struct { } type Collectorquerydependencytree struct { - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Queryid *uuid.UUID `db:"queryid"` Type Querytype `db:"type"` Queryversion int32 `db:"queryversion"` @@ -241,7 +240,7 @@ type Collectorquerydependencytree struct { } type Collectorversion struct { - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` ID int32 `db:"id"` Addedat pgtype.Timestamp `db:"addedat"` } @@ -252,49 +251,54 @@ type Currentcleanentry struct { Bucket *string `db:"bucket"` Key *string `db:"key"` Version int64 `db:"version"` + Hash *string `db:"hash"` Mimetype NullCleanmimetype `db:"mimetype"` Fail NullCleanfailtype `db:"fail"` + Clientid string `db:"clientid"` } type Currentclientcansync struct { - Clientid uuid.UUID `db:"clientid"` - Cansync bool `db:"cansync"` + Clientid string `db:"clientid"` + Cansync bool `db:"cansync"` } type Currentcollectormincleanversion struct { - Clientid uuid.UUID `db:"clientid"` - Mincleanversion int64 `db:"mincleanversion"` + Clientid string `db:"clientid"` + Mincleanversion int64 `db:"mincleanversion"` } type Currentcollectormintextversion struct { - Clientid uuid.UUID `db:"clientid"` - Mintextversion int64 `db:"mintextversion"` + Clientid string `db:"clientid"` + Mintextversion int64 `db:"mintextversion"` } type Currentcollectorqueriesjsonagg struct { - Clientid uuid.UUID `db:"clientid"` - Fields []byte `db:"fields"` + Clientid string `db:"clientid"` + Fields []byte `db:"fields"` } type Currentcollectorquery struct { - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Name *string `db:"name"` Queryid *uuid.UUID `db:"queryid"` } type Currenttextentry struct { - ID uuid.UUID `db:"id"` - Documentid uuid.UUID `db:"documentid"` - Bucket string `db:"bucket"` - Key string `db:"key"` - Version int64 `db:"version"` - Hash string `db:"hash"` - Cleanentryid uuid.UUID `db:"cleanentryid"` + ID uuid.UUID `db:"id"` + Documentid uuid.UUID `db:"documentid"` + Bucket string `db:"bucket"` + Key string `db:"key"` + Hash string `db:"hash"` + Cleanid uuid.UUID `db:"cleanid"` + Triggerid uuid.UUID `db:"triggerid"` + Textractjobid *string `db:"textractjobid"` + Triggerversion int64 `db:"triggerversion"` + Extractionversion int64 `db:"extractionversion"` } type Document struct { ID uuid.UUID `db:"id"` - Clientid uuid.UUID `db:"clientid"` + Clientid string `db:"clientid"` Hash string `db:"hash"` } @@ -303,6 +307,7 @@ type Documentclean struct { Documentid uuid.UUID `db:"documentid"` Bucket *string `db:"bucket"` Key *string `db:"key"` + Hash *string `db:"hash"` Mimetype NullCleanmimetype `db:"mimetype"` Fail NullCleanfailtype `db:"fail"` } @@ -321,26 +326,33 @@ type Documententry struct { } type Documenttextextraction struct { - ID uuid.UUID `db:"id"` - Cleanentryid uuid.UUID `db:"cleanentryid"` - Bucket string `db:"bucket"` - Key string `db:"key"` - Hash string `db:"hash"` + ID uuid.UUID `db:"id"` + Bucket string `db:"bucket"` + Key string `db:"key"` + Hash string `db:"hash"` } type Documenttextextractionentry struct { - ID uuid.UUID `db:"id"` - Textid uuid.UUID `db:"textid"` - Version int64 `db:"version"` + ID uuid.UUID `db:"id"` + Textid uuid.UUID `db:"textid"` + Triggerid uuid.UUID `db:"triggerid"` + Version int64 `db:"version"` +} + +type Documenttexttriggerextraction struct { + ID uuid.UUID `db:"id"` + Cleanid uuid.UUID `db:"cleanid"` + Version int64 `db:"version"` + Textractjobid *string `db:"textractjobid"` } type Fullactivecollector struct { - Clientid uuid.UUID `db:"clientid"` - Mincleanversion int64 `db:"mincleanversion"` - Mintextversion int64 `db:"mintextversion"` - Activeversion int32 `db:"activeversion"` - Latestversion int32 `db:"latestversion"` - Fields []byte `db:"fields"` + Clientid string `db:"clientid"` + Mincleanversion int64 `db:"mincleanversion"` + Mintextversion int64 `db:"mintextversion"` + Activeversion int32 `db:"activeversion"` + Latestversion int32 `db:"latestversion"` + Fields []byte `db:"fields"` } type Fullactivequery struct { @@ -353,10 +365,9 @@ type Fullactivequery struct { } type Fullclient struct { - ID uuid.UUID `db:"id"` - Externalid string `db:"externalid"` - Name string `db:"name"` - Cansync bool `db:"cansync"` + ID string `db:"id"` + Name string `db:"name"` + Cansync bool `db:"cansync"` } type Query struct { diff --git a/internal/database/repository/query.sql.go b/internal/database/repository/query.sql.go index 7367af0a..cc1b63d1 100644 --- a/internal/database/repository/query.sql.go +++ b/internal/database/repository/query.sql.go @@ -324,15 +324,15 @@ SELECT clientId FROM collectorQueryDependencyTree WHERE queryId = $1 // ListQueryClientIDs // // SELECT clientId FROM collectorQueryDependencyTree WHERE queryId = $1 -func (q *Queries) ListQueryClientIDs(ctx context.Context, queryid *uuid.UUID) ([]uuid.UUID, error) { +func (q *Queries) ListQueryClientIDs(ctx context.Context, queryid *uuid.UUID) ([]string, error) { rows, err := q.db.Query(ctx, listQueryClientIDs, queryid) if err != nil { return nil, err } defer rows.Close() - items := []uuid.UUID{} + items := []string{} for rows.Next() { - var clientid uuid.UUID + var clientid string if err := rows.Scan(&clientid); err != nil { return nil, err } diff --git a/internal/database/repository/query_test.go b/internal/database/repository/query_test.go index ecdbbc20..d2bb1b51 100644 --- a/internal/database/repository/query_test.go +++ b/internal/database/repository/query_test.go @@ -21,8 +21,7 @@ func TestQueries(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -234,17 +233,17 @@ func TestQueryDependencyTree(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() queries := cfg.GetDBQueries() - clientID, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientID := "EXAMPLE" + err := queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientID, }) require.NoError(t, err) version, err := queries.AddLatestCollectorVersion(ctx, clientID) @@ -455,8 +454,7 @@ func TestQueriesList(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -514,8 +512,7 @@ func TestListQueryClients(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -529,9 +526,10 @@ func TestListQueryClients(t *testing.T) { require.NoError(t, err) assert.ElementsMatch(t, []uuid.UUID{}, clients) - clientOneID, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientOneID := "EXAMPLE" + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientOneID, }) require.NoError(t, err) versionOne, err := queries.AddLatestCollectorVersion(ctx, clientOneID) @@ -551,11 +549,12 @@ func TestListQueryClients(t *testing.T) { clients, err = queries.ListQueryClientIDs(ctx, &contextID) require.NoError(t, err) - assert.ElementsMatch(t, []uuid.UUID{clientOneID}, clients) + assert.ElementsMatch(t, []string{clientOneID}, clients) - clientTwoID, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client_dos", - Externalid: "EXAMPLE DOS", + clientTwoID := "EXAMPLE_DOS" + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client_dos", + ID: clientTwoID, }) require.NoError(t, err) versionTwo, err := queries.AddLatestCollectorVersion(ctx, clientTwoID) @@ -575,7 +574,7 @@ func TestListQueryClients(t *testing.T) { clients, err = queries.ListQueryClientIDs(ctx, &contextID) require.NoError(t, err) - assert.ElementsMatch(t, []uuid.UUID{clientOneID, clientTwoID}, clients) + assert.ElementsMatch(t, []string{clientOneID, clientTwoID}, clients) jsonID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeJsonExtractor)) require.NoError(t, err) @@ -597,5 +596,5 @@ func TestListQueryClients(t *testing.T) { clients, err = queries.ListQueryClientIDs(ctx, &jsonID) require.NoError(t, err) - assert.ElementsMatch(t, []uuid.UUID{clientOneID}, clients) + assert.ElementsMatch(t, []string{clientOneID}, clients) } diff --git a/internal/database/repository/result_test.go b/internal/database/repository/result_test.go index 83dfbc7e..217b5fd2 100644 --- a/internal/database/repository/result_test.go +++ b/internal/database/repository/result_test.go @@ -21,8 +21,7 @@ func TestResults(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -39,9 +38,10 @@ func TestResults(t *testing.T) { }) require.NoError(t, err) - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientId := "EXAMPLE" + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) @@ -73,10 +73,12 @@ func TestResults(t *testing.T) { bucket := "example_bucket" key := "example_key" + hash := "hash" cleanid, err := queries.AddDocumentClean(ctx, &repository.AddDocumentCleanParams{ Documentid: documentID, Bucket: &bucket, Key: &key, + Hash: &hash, Mimetype: repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -93,16 +95,21 @@ func TestResults(t *testing.T) { require.NoError(t, err) assert.False(t, issynced) + triggerId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleanid, + Version: 123, + }) + require.NoError(t, err) textId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: "hi", - Key: "hello", - Cleanentryid: cleanid, - Hash: "example", + Bucket: "hi", + Key: "hello", + Hash: "example", }) require.NoError(t, err) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textId, + Version: 1, + Textid: textId, + Triggerid: triggerId, }) require.NoError(t, err) @@ -155,8 +162,7 @@ func TestResultValues(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -166,9 +172,10 @@ func TestResultValues(t *testing.T) { jsonQueryID, err := queries.CreateQuery(ctx, repository.Querytype(repository.QuerytypeJsonExtractor)) require.NoError(t, err) - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientId := "EXAMPLE" + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) documentID, err := queries.CreateDocument(ctx, &repository.CreateDocumentParams{ @@ -238,10 +245,12 @@ func TestResultValues(t *testing.T) { bucket := "example_bucket" key := "example_key" + hash := "hash" cleanid, err := queries.AddDocumentClean(ctx, &repository.AddDocumentCleanParams{ Documentid: documentID, Bucket: &bucket, Key: &key, + Hash: &hash, Mimetype: repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -253,16 +262,21 @@ func TestResultValues(t *testing.T) { Version: 1, }) require.NoError(t, err) + triggerId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleanid, + Version: 123, + }) + require.NoError(t, err) textId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: "hi", - Key: "hello", - Cleanentryid: cleanid, - Hash: "example", + Bucket: "hi", + Key: "hello", + Hash: "example", }) require.NoError(t, err) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textId, + Version: 1, + Textid: textId, + Triggerid: triggerId, }) require.NoError(t, err) @@ -364,17 +378,17 @@ func TestUnsyncedNoDepsQueries(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() queries := cfg.GetDBQueries() - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientId := "EXAMPLE" + err := queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) version, err := queries.AddLatestCollectorVersion(ctx, clientId) @@ -437,10 +451,12 @@ func TestUnsyncedNoDepsQueries(t *testing.T) { bucket := "example_bucket" key := "example_key" + hash := "hahs" cleanid, err := queries.AddDocumentClean(ctx, &repository.AddDocumentCleanParams{ Documentid: documentID, Bucket: &bucket, Key: &key, + Hash: &hash, Mimetype: repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -460,15 +476,20 @@ func TestUnsyncedNoDepsQueries(t *testing.T) { require.NoError(t, err) assert.Len(t, qs, 0) + triggerId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleanid, + Version: 123, + }) + require.NoError(t, err) textId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: "hi", - Key: "hello", - Cleanentryid: cleanid, + Bucket: "hi", + Key: "hello", }) require.NoError(t, err) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textId, + Version: 1, + Textid: textId, + Triggerid: triggerId, }) require.NoError(t, err) @@ -515,6 +536,7 @@ func TestUnsyncedNoDepsQueries(t *testing.T) { Documentid: documentTwoID, Bucket: &bucket, Key: &key, + Hash: &hash, Mimetype: repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -534,15 +556,20 @@ func TestUnsyncedNoDepsQueries(t *testing.T) { require.NoError(t, err) assert.Len(t, qs, 0) + triggerTwoId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleantwoid, + Version: 123, + }) + require.NoError(t, err) textTwoId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: "hi", - Key: "hello", - Cleanentryid: cleantwoid, + Bucket: "hi", + Key: "hello", }) require.NoError(t, err) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textTwoId, + Version: 1, + Textid: textTwoId, + Triggerid: triggerTwoId, }) require.NoError(t, err) diff --git a/internal/database/repository/sync_test.go b/internal/database/repository/sync_test.go index 59915425..415e9085 100644 --- a/internal/database/repository/sync_test.go +++ b/internal/database/repository/sync_test.go @@ -20,17 +20,17 @@ func TestListClientDocumentIDs(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() queries := cfg.GetDBQueries() - id, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + id := "EXAMPLE" + err := queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: id, }) require.NoError(t, err) @@ -125,8 +125,7 @@ func TestClientSync(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() @@ -158,10 +157,10 @@ func TestClientSync(t *testing.T) { }) require.NoError(t, err) - externalId := "EXAMPLE" - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: externalId, + clientId := "EXAMPLE" + err = queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) @@ -193,11 +192,11 @@ func TestClientSync(t *testing.T) { }) require.NoError(t, err) - docExternal, err := queries.GetDocumentExternal(ctx, &documentID) + docExternal, err := queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_noclean", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -223,11 +222,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_noclean", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -244,20 +243,22 @@ func TestClientSync(t *testing.T) { require.NoError(t, err) assert.False(t, isSynced) - docExternal, err := queries.GetDocumentExternal(ctx, &documentID) + docExternal, err := queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) key := "example_key" + hash := "hahssh" cleanId, err := queries.AddDocumentClean(ctx, &repository.AddDocumentCleanParams{ Documentid: documentID, Bucket: &bucket, Key: &key, + Hash: &hash, Mimetype: repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -273,36 +274,41 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) + triggerId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleanId, + Version: 123, + }) + require.NoError(t, err) textId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: "hi", - Key: "hello", - Cleanentryid: cleanId, - Hash: "example", + Bucket: "hi", + Key: "hello", + Hash: "example", }) require.NoError(t, err) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textId, + Version: 1, + Textid: textId, + Triggerid: triggerId, }) require.NoError(t, err) isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -319,11 +325,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -339,11 +345,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -358,11 +364,11 @@ func TestClientSync(t *testing.T) { require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": "json_value"}`), }, docExternal) @@ -379,11 +385,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -400,11 +406,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -420,11 +426,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -438,37 +444,42 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": "updated_context_value"}`), }, docExternal) }) t.Run("update text entry", func(t *testing.T) { + triggerId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleanId, + Version: 123, + }) + require.NoError(t, err) textId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: "hi", - Key: "hello", - Cleanentryid: cleanId, + Bucket: "hi", + Key: "hello", }) require.NoError(t, err) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textId, + Version: 1, + Textid: textId, + Triggerid: triggerId, }) require.NoError(t, err) isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -484,11 +495,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -504,11 +515,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -522,11 +533,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": "updated_text_json"}`), }, docExternal) @@ -536,6 +547,7 @@ func TestClientSync(t *testing.T) { Documentid: documentID, Bucket: &bucket, Key: &key, + Hash: &hash, Mimetype: repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -551,35 +563,40 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) + triggerThreeId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleanthreeid, + Version: 123, + }) + require.NoError(t, err) textThreeId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: "hi", - Key: "hello", - Cleanentryid: cleanthreeid, + Bucket: "hi", + Key: "hello", }) require.NoError(t, err) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textThreeId, + Version: 1, + Textid: textThreeId, + Triggerid: triggerThreeId, }) require.NoError(t, err) isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -595,11 +612,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -615,11 +632,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": null}`), }, docExternal) @@ -633,11 +650,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": "update_clean_json"}`), }, docExternal) @@ -648,11 +665,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": "update_clean_json"}`), }, docExternal) @@ -667,11 +684,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"first_key": "update_clean_json"}`), }, docExternal) @@ -686,11 +703,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{}`), }, docExternal) @@ -706,11 +723,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"second_key": "update_clean_json"}`), }, docExternal) @@ -728,11 +745,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"second_key": "update_clean_json", "example_key": "update_clean_context"}`), }, docExternal) @@ -766,11 +783,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"second_key": null, "example_key": null}`), }, docExternal) @@ -786,11 +803,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"second_key": null, "example_key": null}`), }, docExternal) @@ -806,11 +823,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"second_key": null, "example_key": null}`), }, docExternal) @@ -824,11 +841,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.False(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"second_key": null, "example_key": "context_with_super_value"}`), }, docExternal) @@ -842,11 +859,11 @@ func TestClientSync(t *testing.T) { isSynced, err = queries.IsClientSynced(ctx, &clientId) require.NoError(t, err) assert.True(t, isSynced) - docExternal, err = queries.GetDocumentExternal(ctx, &documentID) + docExternal, err = queries.GetDocumentExternal(ctx, documentID) require.NoError(t, err) assert.EqualExportedValues(t, &repository.GetDocumentExternalRow{ ID: documentID, - Clientid: externalId, + Clientid: clientId, Hash: "example_hash", Fields: []byte(`{"second_key": "json_with_super", "example_key": "context_with_super_value"}`), }, docExternal) diff --git a/internal/database/repository/text.sql.go b/internal/database/repository/text.sql.go index 4a877d43..1277937a 100644 --- a/internal/database/repository/text.sql.go +++ b/internal/database/repository/text.sql.go @@ -12,52 +12,81 @@ import ( ) const addDocumentText = `-- name: AddDocumentText :one -INSERT INTO documentTextExtractions (bucket, key, cleanEntryId, hash) VALUES ($1, $2, $3, $4) returning id +INSERT INTO documentTextExtractions (bucket, key, hash) VALUES ($1, $2, $3) returning id ` type AddDocumentTextParams struct { - Bucket string `db:"bucket"` - Key string `db:"key"` - Cleanentryid uuid.UUID `db:"cleanentryid"` - Hash string `db:"hash"` + Bucket string `db:"bucket"` + Key string `db:"key"` + Hash string `db:"hash"` } // AddDocumentText // -// INSERT INTO documentTextExtractions (bucket, key, cleanEntryId, hash) VALUES ($1, $2, $3, $4) returning id +// INSERT INTO documentTextExtractions (bucket, key, hash) VALUES ($1, $2, $3) returning id func (q *Queries) AddDocumentText(ctx context.Context, arg *AddDocumentTextParams) (uuid.UUID, error) { - row := q.db.QueryRow(ctx, addDocumentText, - arg.Bucket, - arg.Key, - arg.Cleanentryid, - arg.Hash, - ) + row := q.db.QueryRow(ctx, addDocumentText, arg.Bucket, arg.Key, arg.Hash) var id uuid.UUID err := row.Scan(&id) return id, err } const addDocumentTextEntry = `-- name: AddDocumentTextEntry :exec -INSERT INTO documentTextExtractionEntries (textId, version) VALUES ($1, $2) +INSERT INTO documentTextExtractionEntries (textId, triggerId, version) VALUES ($1, $2, $3) ` type AddDocumentTextEntryParams struct { - Textid uuid.UUID `db:"textid"` - Version int64 `db:"version"` + Textid uuid.UUID `db:"textid"` + Triggerid uuid.UUID `db:"triggerid"` + Version int64 `db:"version"` } // AddDocumentTextEntry // -// INSERT INTO documentTextExtractionEntries (textId, version) VALUES ($1, $2) +// INSERT INTO documentTextExtractionEntries (textId, triggerId, version) VALUES ($1, $2, $3) func (q *Queries) AddDocumentTextEntry(ctx context.Context, arg *AddDocumentTextEntryParams) error { - _, err := q.db.Exec(ctx, addDocumentTextEntry, arg.Textid, arg.Version) + _, err := q.db.Exec(ctx, addDocumentTextEntry, arg.Textid, arg.Triggerid, arg.Version) + return err +} + +const addDocumentTextTrigger = `-- name: AddDocumentTextTrigger :one +INSERT INTO documentTextTriggerExtractions (cleanId, version) VALUES ($1, $2) returning id +` + +type AddDocumentTextTriggerParams struct { + Cleanid uuid.UUID `db:"cleanid"` + Version int64 `db:"version"` +} + +// AddDocumentTextTrigger +// +// INSERT INTO documentTextTriggerExtractions (cleanId, version) VALUES ($1, $2) returning id +func (q *Queries) AddDocumentTextTrigger(ctx context.Context, arg *AddDocumentTextTriggerParams) (uuid.UUID, error) { + row := q.db.QueryRow(ctx, addDocumentTextTrigger, arg.Cleanid, arg.Version) + var id uuid.UUID + err := row.Scan(&id) + return id, err +} + +const addDocumentTextTriggerJobId = `-- name: AddDocumentTextTriggerJobId :exec +UPDATE documentTextTriggerExtractions SET textractJobId = $1 WHERE id = $2 +` + +type AddDocumentTextTriggerJobIdParams struct { + Textractjobid *string `db:"textractjobid"` + ID uuid.UUID `db:"id"` +} + +// AddDocumentTextTriggerJobId +// +// UPDATE documentTextTriggerExtractions SET textractJobId = $1 WHERE id = $2 +func (q *Queries) AddDocumentTextTriggerJobId(ctx context.Context, arg *AddDocumentTextTriggerJobIdParams) error { + _, err := q.db.Exec(ctx, addDocumentTextTriggerJobId, arg.Textractjobid, arg.ID) return err } const getDocumentTextExtractionByHash = `-- name: GetDocumentTextExtractionByHash :one -SELECT id, documentId, bucket, key, version, hash, cleanEntryId - FROM currentTextEntries - WHERE cleanEntryId = $1 and hash = $2 +SELECT id FROM currentTextEntries WHERE cleanId = $1 and hash = $2 ` type GetDocumentTextExtractionByHashParams struct { @@ -67,33 +96,59 @@ type GetDocumentTextExtractionByHashParams struct { // GetDocumentTextExtractionByHash // -// SELECT id, documentId, bucket, key, version, hash, cleanEntryId -// FROM currentTextEntries -// WHERE cleanEntryId = $1 and hash = $2 -func (q *Queries) GetDocumentTextExtractionByHash(ctx context.Context, arg *GetDocumentTextExtractionByHashParams) (*Currenttextentry, error) { +// SELECT id FROM currentTextEntries WHERE cleanId = $1 and hash = $2 +func (q *Queries) GetDocumentTextExtractionByHash(ctx context.Context, arg *GetDocumentTextExtractionByHashParams) (uuid.UUID, error) { row := q.db.QueryRow(ctx, getDocumentTextExtractionByHash, arg.Cleanentryid, arg.Hash) - var i Currenttextentry + var id uuid.UUID + err := row.Scan(&id) + return id, err +} + +const getDocumentTextTrigger = `-- name: GetDocumentTextTrigger :one +SELECT dt.id, dt.cleanId, dt.version, dt.textractJobId, dc.documentId + from documentTextTriggerExtractions as dt + join documentCleans as dc on dt.cleanId = dc.id + where dt.id = $1 +` + +type GetDocumentTextTriggerRow struct { + ID uuid.UUID `db:"id"` + Cleanid uuid.UUID `db:"cleanid"` + Version int64 `db:"version"` + Textractjobid *string `db:"textractjobid"` + Documentid uuid.UUID `db:"documentid"` +} + +// GetDocumentTextTrigger +// +// SELECT dt.id, dt.cleanId, dt.version, dt.textractJobId, dc.documentId +// from documentTextTriggerExtractions as dt +// join documentCleans as dc on dt.cleanId = dc.id +// where dt.id = $1 +func (q *Queries) GetDocumentTextTrigger(ctx context.Context, triggerid uuid.UUID) (*GetDocumentTextTriggerRow, error) { + row := q.db.QueryRow(ctx, getDocumentTextTrigger, triggerid) + var i GetDocumentTextTriggerRow err := row.Scan( &i.ID, - &i.Documentid, - &i.Bucket, - &i.Key, + &i.Cleanid, &i.Version, - &i.Hash, - &i.Cleanentryid, + &i.Textractjobid, + &i.Documentid, ) return &i, err } const getTextEntryByDocId = `-- name: GetTextEntryByDocId :one -SELECT id, documentId, bucket, key, version, hash, cleanEntryId +SELECT id, documentId, bucket, key, hash, cleanId, + triggerId, textractJobId, triggerVersion, extractionVersion FROM currentTextEntries WHERE documentId = $1 ` // GetTextEntryByDocId // -// SELECT id, documentId, bucket, key, version, hash, cleanEntryId +// SELECT id, documentId, bucket, key, hash, cleanId, +// triggerId, textractJobId, triggerVersion, extractionVersion // FROM currentTextEntries // WHERE documentId = $1 func (q *Queries) GetTextEntryByDocId(ctx context.Context, documentid uuid.UUID) (*Currenttextentry, error) { @@ -104,9 +159,12 @@ func (q *Queries) GetTextEntryByDocId(ctx context.Context, documentid uuid.UUID) &i.Documentid, &i.Bucket, &i.Key, - &i.Version, &i.Hash, - &i.Cleanentryid, + &i.Cleanid, + &i.Triggerid, + &i.Textractjobid, + &i.Triggerversion, + &i.Extractionversion, ) return &i, err } diff --git a/internal/database/repository/text_test.go b/internal/database/repository/text_test.go index 76a65f2f..c4a59d4f 100644 --- a/internal/database/repository/text_test.go +++ b/internal/database/repository/text_test.go @@ -21,17 +21,17 @@ func TestTextExtraction(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, textup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, textup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer textup() queries := cfg.GetDBQueries() - clientId, err := queries.CreateClient(ctx, &repository.CreateClientParams{ - Name: "example_client", - Externalid: "EXAMPLE", + clientId := "EXAMPLE" + err := queries.CreateClient(ctx, &repository.CreateClientParams{ + Name: "example_client", + ID: clientId, }) require.NoError(t, err) @@ -49,6 +49,7 @@ func TestTextExtraction(t *testing.T) { Documentid: id, Bucket: &bucket, Key: &key, + Hash: &hash, Mimetype: repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, @@ -65,11 +66,50 @@ func TestTextExtraction(t *testing.T) { require.NoError(t, err) assert.False(t, isextract) + triggerId, err := queries.AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: cleanid, + Version: 123, + }) + require.NoError(t, err) + + trigger, err := queries.GetDocumentTextTrigger(ctx, triggerId) + require.NoError(t, err) + assert.EqualExportedValues(t, &repository.GetDocumentTextTriggerRow{ + ID: triggerId, + Cleanid: cleanid, + Version: 123, + Documentid: id, + }, trigger) + + isextract, err = queries.IsDocumentTextExtracted(ctx, id) + require.NoError(t, err) + assert.False(t, isextract) + + textractId := "hello" + err = queries.AddDocumentTextTriggerJobId(ctx, &repository.AddDocumentTextTriggerJobIdParams{ + Textractjobid: &textractId, + ID: triggerId, + }) + require.NoError(t, err) + + trigger, err = queries.GetDocumentTextTrigger(ctx, triggerId) + require.NoError(t, err) + assert.EqualExportedValues(t, &repository.GetDocumentTextTriggerRow{ + ID: triggerId, + Cleanid: cleanid, + Version: 123, + Textractjobid: &textractId, + Documentid: id, + }, trigger) + + isextract, err = queries.IsDocumentTextExtracted(ctx, id) + require.NoError(t, err) + assert.False(t, isextract) + textId, err := queries.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: bucket, - Key: key, - Cleanentryid: cleanid, - Hash: "example", + Bucket: bucket, + Key: key, + Hash: "example", }) require.NoError(t, err) assert.NotNil(t, textId) @@ -80,8 +120,9 @@ func TestTextExtraction(t *testing.T) { assert.False(t, isextract) err = queries.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: 1, - Textid: textId, + Textid: textId, + Triggerid: triggerId, + Version: 543, }) require.NoError(t, err) @@ -91,10 +132,16 @@ func TestTextExtraction(t *testing.T) { text, err := queries.GetTextEntryByDocId(ctx, id) require.NoError(t, err) + assert.Equal(t, textId, text.ID) assert.Equal(t, id, text.Documentid) assert.Equal(t, bucket, text.Bucket) assert.Equal(t, key, text.Key) - assert.Equal(t, int64(1), text.Version) + assert.Equal(t, "example", text.Hash) + assert.Equal(t, cleanid, text.Cleanid) + assert.Equal(t, triggerId, text.Triggerid) + assert.Equal(t, textractId, *text.Textractjobid) + assert.Equal(t, int64(123), text.Triggerversion) + assert.Equal(t, int64(543), text.Extractionversion) assert.Equal(t, textId, text.ID) uniqueEntry, err := queries.GetDocumentTextExtractionByHash(ctx, &repository.GetDocumentTextExtractionByHashParams{ @@ -102,7 +149,7 @@ func TestTextExtraction(t *testing.T) { Cleanentryid: cleanid, }) require.NoError(t, err) - assert.EqualExportedValues(t, text, uniqueEntry) + assert.EqualExportedValues(t, text.ID, uniqueEntry) _, err = queries.GetDocumentTextExtractionByHash(ctx, &repository.GetDocumentTextExtractionByHashParams{ Hash: "definitely invalid", diff --git a/internal/document/clean/clean.go b/internal/document/clean/clean.go index e3642bd3..58c545ae 100644 --- a/internal/document/clean/clean.go +++ b/internal/document/clean/clean.go @@ -9,6 +9,7 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/document" + documenttypes "queryorchestration/internal/document/types" "queryorchestration/internal/serviceconfig/build" "github.com/aws/aws-sdk-go-v2/service/s3" @@ -21,25 +22,11 @@ type CleanParams struct { Location document.Location } -type InvalidDocumentReason string - -const ( - InvalidDocumentMimeType InvalidDocumentReason = "invalid_mimetype" - InvalidDocumentRead InvalidDocumentReason = "invalid_read" - InvalidDocumentReadPages InvalidDocumentReason = "invalid_read_pages" - InvalidDocumentZeroPageCount InvalidDocumentReason = "zero_page_count" - InvalidDocumentLargePageCount InvalidDocumentReason = "large_page_count" - InvalidDocumentLargeFile InvalidDocumentReason = "large_file" - InvalidDocumentSmallDimensions InvalidDocumentReason = "small_dimensions" - InvalidDocumentLargeDimensions InvalidDocumentReason = "large_dimensions" - InvalidDocumentSmallDPI InvalidDocumentReason = "small_dpi" - InvalidDocumentLargeDPI InvalidDocumentReason = "large_dpi" -) - type ExecuteCleanResponse struct { location *document.Location - mimetype *MimeType - failReason *InvalidDocumentReason + mimetype *documenttypes.MimeType + hash *string + failReason *documenttypes.InvalidDocumentReason } func (s *Service) executeCleanTasks(ctx context.Context, params *CleanParams) (*ExecuteCleanResponse, error) { @@ -60,8 +47,8 @@ func (s *Service) executeCleanTasks(ctx context.Context, params *CleanParams) (* mimeType, err := s.getAcceptedMimeType(ctx, params, out.ContentType, length) if err != nil { return nil, err - } else if mimeType == MimeTypeInvalid { - reason := InvalidDocumentMimeType + } else if mimeType == documenttypes.MimeTypeInvalid { + reason := documenttypes.InvalidDocumentMimeType return &ExecuteCleanResponse{ failReason: &reason, }, nil @@ -72,7 +59,7 @@ func (s *Service) executeCleanTasks(ctx context.Context, params *CleanParams) (* return nil, err } - corruptReason := content.isCorrupt(ctx) + corruptReason := content.IsCorrupt(ctx) if corruptReason != nil { return &ExecuteCleanResponse{ failReason: corruptReason, @@ -82,6 +69,7 @@ func (s *Service) executeCleanTasks(ctx context.Context, params *CleanParams) (* return &ExecuteCleanResponse{ location: ¶ms.Location, mimetype: &mimeType, + hash: ¶ms.Hash, }, nil } @@ -128,11 +116,12 @@ func (s *Service) storeClean(ctx context.Context, id uuid.UUID, out *ExecuteClea } if out.failReason != nil { slog.Info("Failed document", "id", id, "reason", *out.failReason) - params.Fail = ToDBNullFailType(*out.failReason) + params.Fail = documenttypes.ToDBNullFailType(*out.failReason) } else { params.Bucket = &out.location.Bucket params.Key = &out.location.Key - params.Mimetype = ToDBNullMimeType(*out.mimetype) + params.Hash = out.hash + params.Mimetype = documenttypes.ToDBNullMimeType(*out.mimetype) } err := s.cfg.ExecuteDBTransaction(ctx, func(ctx context.Context, q *repository.Queries) error { @@ -178,7 +167,7 @@ func (s *Service) isNewClean(lastEntry *repository.GetMostRecentDocumentCleanEnt } if out.failReason != nil { - return *out.failReason != ParseDBNullFailType(lastEntry.Fail) + return *out.failReason != documenttypes.ParseDBNullFailType(lastEntry.Fail) } if lastEntry.Fail.Valid { @@ -191,5 +180,5 @@ func (s *Service) isNewClean(lastEntry *repository.GetMostRecentDocumentCleanEnt return !(out.location.Bucket == *lastEntry.Bucket && out.location.Key == *lastEntry.Key && - *out.mimetype == ParseDBNullMimeType(lastEntry.Mimetype)) + *out.mimetype == documenttypes.ParseDBNullMimeType(lastEntry.Mimetype)) } diff --git a/internal/document/clean/clean_test.go b/internal/document/clean/clean_test.go index f0e3d0b4..9c5f0bdc 100644 --- a/internal/document/clean/clean_test.go +++ b/internal/document/clean/clean_test.go @@ -8,6 +8,7 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/document" + documenttypes "queryorchestration/internal/document/types" objectstoremock "queryorchestration/mocks/objectstore" "github.com/stretchr/testify/require" @@ -36,7 +37,7 @@ func TestClean(t *testing.T) { doc := document.DocumentSummary{ ID: uuid.New(), - ClientID: uuid.New(), + ClientID: "yuyu", Hash: "example_hash", } inloc := document.Location{ @@ -62,10 +63,10 @@ func TestClean(t *testing.T) { pool.ExpectBegin() pool.ExpectQuery("name: GetMostRecentDocumentCleanEntry :one").WithArgs(dbid). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}), + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail"}), ) cleanid := uuid.New() - pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, dbmimetype, repository.NullCleanfailtype{}). + pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, &doc.Hash, dbmimetype, repository.NullCleanfailtype{}). WillReturnRows( pgxmock.NewRows([]string{"id"}). AddRow(cleanid), @@ -155,6 +156,7 @@ func TestExecuteCleanTasks(t *testing.T) { }) require.NoError(t, err) assert.EqualExportedValues(t, ExecuteCleanResponse{ + hash: &hash, location: &inloc, }, *outloc) } @@ -181,9 +183,11 @@ func TestStoreClean(t *testing.T) { } t.Run("no prev entry", func(t *testing.T) { mimeType := "application/pdf" + hash := "heyman" params := &ExecuteCleanResponse{ location: &inloc, - mimetype: (*MimeType)(&mimeType), + hash: &hash, + mimetype: (*documenttypes.MimeType)(&mimeType), } dbid := doc.ID @@ -194,10 +198,10 @@ func TestStoreClean(t *testing.T) { pool.ExpectBegin() pool.ExpectQuery("name: GetMostRecentDocumentCleanEntry :one").WithArgs(dbid). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}), + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail"}), ) cleanid := uuid.New() - pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, dbmimetype, repository.NullCleanfailtype{}). + pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, params.hash, dbmimetype, repository.NullCleanfailtype{}). WillReturnRows( pgxmock.NewRows([]string{"id"}). AddRow(cleanid), @@ -211,9 +215,11 @@ func TestStoreClean(t *testing.T) { }) t.Run("diff prev entry", func(t *testing.T) { mimeType := "application/pdf" + hash := "heyman" params := &ExecuteCleanResponse{ location: &inloc, - mimetype: (*MimeType)(&mimeType), + hash: &hash, + mimetype: (*documenttypes.MimeType)(&mimeType), } dbid := doc.ID @@ -224,11 +230,11 @@ func TestStoreClean(t *testing.T) { pool.ExpectBegin() pool.ExpectQuery("name: GetMostRecentDocumentCleanEntry :one").WithArgs(dbid). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(uuid.New(), dbid, nil, nil, int64(1), nil, repository.CleanfailtypeInvalidRead), + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail"}). + AddRow(uuid.New(), dbid, nil, nil, int64(1), nil, nil, repository.CleanfailtypeInvalidRead), ) cleanid := uuid.New() - pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, dbmimetype, repository.NullCleanfailtype{}). + pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, params.hash, dbmimetype, repository.NullCleanfailtype{}). WillReturnRows( pgxmock.NewRows([]string{"id"}). AddRow(cleanid), @@ -241,7 +247,7 @@ func TestStoreClean(t *testing.T) { require.NoError(t, err) }) t.Run("same fail", func(t *testing.T) { - reason := InvalidDocumentMimeType + reason := documenttypes.InvalidDocumentMimeType params := &ExecuteCleanResponse{ failReason: &reason, } @@ -251,8 +257,8 @@ func TestStoreClean(t *testing.T) { pool.ExpectBegin() pool.ExpectQuery("name: GetMostRecentDocumentCleanEntry :one").WithArgs(dbid). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(cleanid, dbid, nil, nil, int64(1), nil, repository.NullCleanfailtype{ + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail"}). + AddRow(cleanid, dbid, nil, nil, int64(1), nil, nil, repository.NullCleanfailtype{ Valid: true, Cleanfailtype: repository.CleanfailtypeInvalidMimetype, }), @@ -281,7 +287,7 @@ func TestIsNewClean(t *testing.T) { Cleanfailtype: repository.CleanfailtypeInvalidMimetype, }, } - reason := InvalidDocumentMimeType + reason := documenttypes.InvalidDocumentMimeType params := &ExecuteCleanResponse{ failReason: &reason, } @@ -295,7 +301,7 @@ func TestIsNewClean(t *testing.T) { Cleanfailtype: repository.CleanfailtypeInvalidMimetype, }, } - reason := InvalidDocumentLargeDPI + reason := documenttypes.InvalidDocumentLargeDPI params := &ExecuteCleanResponse{ failReason: &reason, } @@ -306,7 +312,7 @@ func TestIsNewClean(t *testing.T) { Bucket: "bucket", Key: "hi", } - mimeType := MimeTypePDF + mimeType := documenttypes.MimeTypePDF var lastEntry *repository.GetMostRecentDocumentCleanEntryRow = &repository.GetMostRecentDocumentCleanEntryRow{ ID: uuid.New(), Bucket: &loc.Bucket, @@ -331,7 +337,7 @@ func TestIsNewClean(t *testing.T) { Bucket: "bucket", Key: "different_location", } - mimeType := MimeTypePDF + mimeType := documenttypes.MimeTypePDF var lastEntry *repository.GetMostRecentDocumentCleanEntryRow = &repository.GetMostRecentDocumentCleanEntryRow{ ID: uuid.New(), Bucket: &ogloc.Bucket, diff --git a/internal/document/clean/content.go b/internal/document/clean/content.go index e4ab31a7..1e287c48 100644 --- a/internal/document/clean/content.go +++ b/internal/document/clean/content.go @@ -1,19 +1,19 @@ package documentclean import ( - "bytes" "context" "errors" - "io" + + documenttypes "queryorchestration/internal/document/types" "github.com/aws/aws-sdk-go-v2/service/s3" ) type Content interface { - isCorrupt(context.Context) *InvalidDocumentReason + IsCorrupt(context.Context) *documenttypes.InvalidDocumentReason } -func (s *Service) getContent(ctx context.Context, params *CleanParams, mimeType MimeType) (Content, error) { +func (s *Service) getContent(ctx context.Context, params *CleanParams, mimeType documenttypes.MimeType) (Content, error) { resp, err := s.cfg.GetStoreClient().GetObject(ctx, &s3.GetObjectInput{ Bucket: ¶ms.Location.Bucket, Key: ¶ms.Location.Key, @@ -24,29 +24,17 @@ func (s *Service) getContent(ctx context.Context, params *CleanParams, mimeType } defer resp.Body.Close() - seek, err := ReaderToSeeker(resp.Body) - if err != nil { - return nil, err - } - var content Content switch mimeType { - case MimeTypePDF: - content = NewPDF(seek) + case documenttypes.MimeTypePDF: + pdf, err := documenttypes.NewPDFFromReadCloser(resp.Body) + if err != nil { + return nil, err + } + content = pdf default: return nil, errors.New("invalid mimetype") } return content, nil } - -func ReaderToSeeker(readCloser io.ReadCloser) (io.ReadSeeker, error) { - data, err := io.ReadAll(readCloser) - if err != nil { - return nil, err - } - - readCloser.Close() - - return bytes.NewReader(data), nil -} diff --git a/internal/document/clean/contentType.go b/internal/document/clean/contentType.go index a654568f..f9f45411 100644 --- a/internal/document/clean/contentType.go +++ b/internal/document/clean/contentType.go @@ -5,19 +5,13 @@ import ( "context" "fmt" + documenttypes "queryorchestration/internal/document/types" + "github.com/aws/aws-sdk-go-v2/service/s3" ) -type MimeType string - -const ( - MimeTypePDF MimeType = "application/pdf" - MimeTypeBinaryOctetStream MimeType = "binary/octet-stream" - MimeTypeInvalid MimeType = "invalid" -) - -var AcceptMimeTypes = []MimeType{ - MimeTypePDF, +var AcceptMimeTypes = []documenttypes.MimeType{ + documenttypes.MimeTypePDF, } const ( @@ -36,21 +30,21 @@ var ( PDFSignatureEnd = []byte(PDFSignatureEndStr) ) -func (s *Service) getAcceptedMimeType(ctx context.Context, params *CleanParams, contentType *string, length int64) (MimeType, error) { +func (s *Service) getAcceptedMimeType(ctx context.Context, params *CleanParams, contentType *string, length int64) (documenttypes.MimeType, error) { mimeType := s.getMetadataMimeType(contentType) - if mimeType != MimeTypeInvalid && mimeType != MimeTypeBinaryOctetStream { + if mimeType != documenttypes.MimeTypeInvalid && mimeType != documenttypes.MimeTypeBinaryOctetStream { return mimeType, nil } return s.getBodyMimeType(ctx, params, length) } -func (s *Service) getMetadataMimeType(contentType *string) MimeType { +func (s *Service) getMetadataMimeType(contentType *string) documenttypes.MimeType { if contentType == nil { - return MimeTypeInvalid + return documenttypes.MimeTypeInvalid } - parsedType := MimeType(*contentType) + parsedType := documenttypes.MimeType(*contentType) for _, accepted := range AcceptMimeTypes { if accepted == parsedType { @@ -58,23 +52,23 @@ func (s *Service) getMetadataMimeType(contentType *string) MimeType { } } - return MimeTypeInvalid + return documenttypes.MimeTypeInvalid } -func (s *Service) getBodyMimeType(ctx context.Context, params *CleanParams, length int64) (MimeType, error) { +func (s *Service) getBodyMimeType(ctx context.Context, params *CleanParams, length int64) (documenttypes.MimeType, error) { startBuffer, err := s.getBytesBuffer(ctx, params, 0, 5) if err != nil { - return MimeTypeInvalid, err + return documenttypes.MimeTypeInvalid, err } endBuffer, err := s.getBytesBuffer(ctx, params, length-6, length) if err != nil { - return MimeTypeInvalid, err + return documenttypes.MimeTypeInvalid, err } - prefixMimeType := MimeTypeInvalid + prefixMimeType := documenttypes.MimeTypeInvalid if bytes.HasPrefix(startBuffer, PDFSignature) && bytes.HasSuffix(endBuffer, PDFSignatureEnd) { - prefixMimeType = MimeTypePDF + prefixMimeType = documenttypes.MimeTypePDF } return prefixMimeType, nil diff --git a/internal/document/clean/contentType_test.go b/internal/document/clean/contentType_test.go index 8388e0a8..cf2e7bb6 100644 --- a/internal/document/clean/contentType_test.go +++ b/internal/document/clean/contentType_test.go @@ -8,6 +8,7 @@ import ( "testing" "queryorchestration/internal/document" + documenttypes "queryorchestration/internal/document/types" objectstoremock "queryorchestration/mocks/objectstore" "github.com/aws/aws-sdk-go-v2/service/s3" @@ -50,7 +51,7 @@ func TestGetBodyMimeType(t *testing.T) { contentType, err := svc.getBodyMimeType(ctx, params, int64(len(bodyStr))) require.NoError(t, err) - assert.Equal(t, MimeTypeInvalid, contentType) + assert.Equal(t, documenttypes.MimeTypeInvalid, contentType) }) t.Run("pdf", func(t *testing.T) { ctx := context.Background() @@ -96,7 +97,7 @@ func TestGetBodyMimeType(t *testing.T) { contentType, err := svc.getBodyMimeType(ctx, params, int64(len(bodyStr))) require.NoError(t, err) - assert.Equal(t, MimeTypePDF, contentType) + assert.Equal(t, documenttypes.MimeTypePDF, contentType) }) t.Run("pdf start", func(t *testing.T) { ctx := context.Background() @@ -142,7 +143,7 @@ func TestGetBodyMimeType(t *testing.T) { contentType, err := svc.getBodyMimeType(ctx, params, int64(len(bodyStr))) require.NoError(t, err) - assert.Equal(t, MimeTypeInvalid, contentType) + assert.Equal(t, documenttypes.MimeTypeInvalid, contentType) }) t.Run("pdf end", func(t *testing.T) { ctx := context.Background() @@ -188,7 +189,7 @@ func TestGetBodyMimeType(t *testing.T) { contentType, err := svc.getBodyMimeType(ctx, params, int64(len(bodyStr))) require.NoError(t, err) - assert.Equal(t, MimeTypeInvalid, contentType) + assert.Equal(t, documenttypes.MimeTypeInvalid, contentType) }) t.Run("short", func(t *testing.T) { ctx := context.Background() @@ -231,21 +232,21 @@ func TestGetMetadataMimeType(t *testing.T) { svc := Service{} contentType := svc.getMetadataMimeType(nil) - assert.Equal(t, MimeTypeInvalid, contentType) + assert.Equal(t, documenttypes.MimeTypeInvalid, contentType) }) t.Run("invalid type", func(t *testing.T) { svc := Service{} inType := "invalid_type" contentType := svc.getMetadataMimeType(&inType) - assert.Equal(t, MimeTypeInvalid, contentType) + assert.Equal(t, documenttypes.MimeTypeInvalid, contentType) }) t.Run("pdf", func(t *testing.T) { svc := Service{} inType := "application/pdf" contentType := svc.getMetadataMimeType(&inType) - assert.Equal(t, MimeTypePDF, contentType) + assert.Equal(t, documenttypes.MimeTypePDF, contentType) }) } @@ -283,7 +284,7 @@ func TestGetAcceptedMimeType(t *testing.T) { inType := "invalid_type" contentType, err := svc.getAcceptedMimeType(ctx, params, &inType, int64(len(bodyStr))) require.NoError(t, err) - assert.Equal(t, MimeTypeInvalid, contentType) + assert.Equal(t, documenttypes.MimeTypeInvalid, contentType) }) t.Run("pdf mimetype", func(t *testing.T) { ctx := context.Background() @@ -296,7 +297,7 @@ func TestGetAcceptedMimeType(t *testing.T) { inType := "application/pdf" contentType, err := svc.getAcceptedMimeType(ctx, &CleanParams{}, &inType, 0) require.NoError(t, err) - assert.Equal(t, MimeTypePDF, contentType) + assert.Equal(t, documenttypes.MimeTypePDF, contentType) }) t.Run("pdf format", func(t *testing.T) { ctx := context.Background() @@ -342,7 +343,7 @@ func TestGetAcceptedMimeType(t *testing.T) { inType := "invalid_type" contentType, err := svc.getAcceptedMimeType(ctx, params, &inType, int64(len(bodyStr))) require.NoError(t, err) - assert.Equal(t, MimeTypePDF, contentType) + assert.Equal(t, documenttypes.MimeTypePDF, contentType) }) } diff --git a/internal/document/clean/content_test.go b/internal/document/clean/content_test.go index 9a54148d..49ce8de5 100644 --- a/internal/document/clean/content_test.go +++ b/internal/document/clean/content_test.go @@ -7,6 +7,7 @@ import ( "testing" "queryorchestration/internal/document" + documenttypes "queryorchestration/internal/document/types" objectstoremock "queryorchestration/mocks/objectstore" "github.com/aws/aws-sdk-go-v2/service/s3" @@ -35,7 +36,7 @@ func TestGetContent(t *testing.T) { Hash: "hash", Location: inloc, } - mimeType := MimeTypePDF + mimeType := documenttypes.MimeTypePDF body := io.NopCloser(strings.NewReader(pdfHelloWorld)) mockS3.EXPECT(). diff --git a/internal/document/clean/create.go b/internal/document/clean/create.go index c5b01133..88430b4a 100644 --- a/internal/document/clean/create.go +++ b/internal/document/clean/create.go @@ -9,20 +9,20 @@ import ( "github.com/google/uuid" ) -func (s *Service) Clean(ctx context.Context, id uuid.UUID) error { - isclean, err := s.cfg.GetDBQueries().HasDocumentCleanEntry(ctx, id) +func (s *Service) Clean(ctx context.Context, documentId uuid.UUID) error { + isclean, err := s.cfg.GetDBQueries().HasDocumentCleanEntry(ctx, documentId) if err != nil { return err } if !isclean { - err = s.clean(ctx, id) + err = s.clean(ctx, documentId) if err != nil { return err } } - err = s.informClean(ctx, id) + err = s.informClean(ctx, documentId) if err != nil { return err } @@ -30,11 +30,11 @@ func (s *Service) Clean(ctx context.Context, id uuid.UUID) error { return nil } -func (s *Service) informClean(ctx context.Context, id uuid.UUID) error { +func (s *Service) informClean(ctx context.Context, documentId uuid.UUID) error { err := s.cfg.SendToQueue(ctx, &queue.SendParams{ - QueueURL: s.cfg.GetDocumentTextURL(), + QueueURL: s.cfg.GetDocumentTextTriggerURL(), Body: doctextrunner.Body{ - ID: id, + DocumentID: documentId, }, }) if err != nil { diff --git a/internal/document/clean/create_test.go b/internal/document/clean/create_test.go index a0b2eae3..0414caeb 100644 --- a/internal/document/clean/create_test.go +++ b/internal/document/clean/create_test.go @@ -10,8 +10,9 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/document" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/aws" "queryorchestration/internal/serviceconfig/objectstore" - "queryorchestration/internal/serviceconfig/queue/documenttext" + "queryorchestration/internal/serviceconfig/queue/documenttexttrigger" objectstoremock "queryorchestration/mocks/objectstore" queuemock "queryorchestration/mocks/queue" @@ -24,8 +25,9 @@ import ( ) type DocCleanConfig struct { + aws.AWSConfig serviceconfig.BaseConfig - documenttext.DocTextConfig + documenttexttrigger.DocTextTriggerConfig objectstore.ObjectStoreConfig } @@ -38,7 +40,7 @@ func TestCreate(t *testing.T) { cfg := &DocCleanConfig{} cfg.QueueClient = mockSQS - cfg.DocumentTextURL = "/i/am/here" + cfg.DocumentTextTriggerURL = "/i/am/here" cfg.DBPool = pool cfg.DBQueries = repository.New(pool) mockS3 := objectstoremock.NewMockS3Client(t) @@ -50,7 +52,7 @@ func TestCreate(t *testing.T) { doc := document.DocumentSummary{ ID: uuid.New(), - ClientID: uuid.New(), + ClientID: "yuyu", Hash: "example_hash", } inloc := document.Location{ @@ -80,10 +82,10 @@ func TestCreate(t *testing.T) { pool.ExpectBegin() pool.ExpectQuery("name: GetMostRecentDocumentCleanEntry :one").WithArgs(dbid). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}), + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail"}), ) cleanid := uuid.New() - pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, dbmimetype, repository.NullCleanfailtype{}). + pool.ExpectQuery("name: AddDocumentClean :one").WithArgs(dbid, &inloc.Bucket, &inloc.Key, &doc.Hash, dbmimetype, repository.NullCleanfailtype{}). WillReturnRows( pgxmock.NewRows([]string{"id"}). AddRow(cleanid), @@ -96,7 +98,7 @@ func TestCreate(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.DocumentTextURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", doc.ID) + return *in.QueueUrl == cfg.DocumentTextTriggerURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", doc.ID) }), mock.Anything, ). @@ -137,7 +139,7 @@ func TestInformClean(t *testing.T) { cfg := &DocCleanConfig{} cfg.QueueClient = mockSQS - cfg.DocumentTextURL = "/i/am/here" + cfg.DocumentTextTriggerURL = "/i/am/here" svc := Service{ cfg: cfg, } @@ -147,7 +149,7 @@ func TestInformClean(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.DocumentTextURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", id) + return *in.QueueUrl == cfg.DocumentTextTriggerURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", id) }), mock.Anything, ). diff --git a/internal/document/clean/service.go b/internal/document/clean/service.go index a7277ed7..521620f6 100644 --- a/internal/document/clean/service.go +++ b/internal/document/clean/service.go @@ -3,12 +3,12 @@ package documentclean import ( "queryorchestration/internal/serviceconfig" "queryorchestration/internal/serviceconfig/objectstore" - "queryorchestration/internal/serviceconfig/queue/documenttext" + "queryorchestration/internal/serviceconfig/queue/documenttexttrigger" ) type ConfigProvider interface { serviceconfig.ConfigProvider - documenttext.ConfigProvider + documenttexttrigger.ConfigProvider objectstore.ConfigProvider } diff --git a/internal/document/clean/service_test.go b/internal/document/clean/service_test.go index 7f4cd1e5..186c4e35 100644 --- a/internal/document/clean/service_test.go +++ b/internal/document/clean/service_test.go @@ -6,14 +6,14 @@ import ( documentclean "queryorchestration/internal/document/clean" "queryorchestration/internal/serviceconfig" "queryorchestration/internal/serviceconfig/objectstore" - "queryorchestration/internal/serviceconfig/queue/documenttext" + "queryorchestration/internal/serviceconfig/queue/documenttexttrigger" "github.com/stretchr/testify/assert" ) type DocCleanConfig struct { serviceconfig.BaseConfig - documenttext.DocTextConfig + documenttexttrigger.DocTextTriggerConfig objectstore.ConfigProvider } diff --git a/internal/document/get.go b/internal/document/get.go index 40d0fe99..c272d421 100644 --- a/internal/document/get.go +++ b/internal/document/get.go @@ -21,7 +21,7 @@ func (s *Service) GetSummary(ctx context.Context, id uuid.UUID) (*DocumentSummar } func (s *Service) GetExternal(ctx context.Context, id uuid.UUID) (*DocumentExternal, error) { - doc, err := s.cfg.GetDBQueries().GetDocumentExternal(ctx, &id) + doc, err := s.cfg.GetDBQueries().GetDocumentExternal(ctx, id) if err != nil { return nil, err } diff --git a/internal/document/get_test.go b/internal/document/get_test.go index cb51b0d2..2dd29d4d 100644 --- a/internal/document/get_test.go +++ b/internal/document/get_test.go @@ -28,7 +28,7 @@ func TestGetSummary(t *testing.T) { doc := document.DocumentSummary{ ID: uuid.New(), - ClientID: uuid.New(), + ClientID: "example", Hash: "example_hash", } @@ -63,7 +63,7 @@ func TestGetExternal(t *testing.T) { }, } - pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(&doc.Id). + pool.ExpectQuery("name: GetDocumentExternal :one").WithArgs(doc.Id). WillReturnRows( pgxmock.NewRows([]string{"id", "clientId", "hash", "fields"}). AddRow(doc.Id, "externalID", "example", []byte(`{"json": "hello"}`)), diff --git a/internal/document/init/create.go b/internal/document/init/create.go index c963515a..810a79b2 100644 --- a/internal/document/init/create.go +++ b/internal/document/init/create.go @@ -4,9 +4,7 @@ import ( "context" "database/sql" "errors" - "fmt" "log/slog" - "regexp" docsyncrunner "queryorchestration/api/docSyncRunner" "queryorchestration/internal/database/repository" @@ -17,7 +15,7 @@ import ( ) type Create struct { - ClientID uuid.UUID + ClientID string Location document.Location Bucket string Hash string @@ -38,7 +36,7 @@ func (s *Service) Create(ctx context.Context, doc *Create) (uuid.UUID, error) { err := s.cfg.SendToQueue(ctx, &queue.SendParams{ QueueURL: s.cfg.GetDocumentSyncURL(), Body: docsyncrunner.Body{ - ID: id, + DocumentID: id, }, }) if err != nil { @@ -51,7 +49,7 @@ func (s *Service) Create(ctx context.Context, doc *Create) (uuid.UUID, error) { type createDocumentParams struct { ID *uuid.UUID - ClientID uuid.UUID + ClientID string Hash string Location document.Location } @@ -89,11 +87,11 @@ func (s *Service) submitCreate(ctx context.Context, params *createDocumentParams if err != nil { return err } - slog.Debug("document created", "id", createid.String(), "client", params.ClientID.String()) + slog.Debug("document created", "id", createid.String(), "client", params.ClientID) dbid = createid } else { - slog.Debug("document exists", "id", params.ID.String(), "client", params.ClientID.String()) + slog.Debug("document exists", "id", params.ID.String(), "client", params.ClientID) dbid = *params.ID } @@ -117,18 +115,3 @@ func (s *Service) submitCreate(ctx context.Context, params *createDocumentParams return id, nil } - -func (s *Service) GetClientIDFromKey(key string) (uuid.UUID, error) { - re := regexp.MustCompile(`^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/.+$`) - match := re.FindStringSubmatch(key) - if len(match) < 2 { - return uuid.Nil, fmt.Errorf("no client id match found in key") - } - - id, err := uuid.Parse(match[1]) - if err != nil { - return uuid.Nil, err - } - - return id, nil -} diff --git a/internal/document/init/create_test.go b/internal/document/init/create_test.go index d927eb8b..d04dc953 100644 --- a/internal/document/init/create_test.go +++ b/internal/document/init/create_test.go @@ -33,7 +33,7 @@ func TestCreate(t *testing.T) { svc := New(cfg) - clientId := uuid.New() + clientId := "hi" doc := document.DocumentSummary{ ID: uuid.New(), ClientID: clientId, @@ -101,7 +101,7 @@ func TestGetCreateParams(t *testing.T) { svc := New(cfg) doc := document.DocumentSummary{ - ClientID: uuid.New(), + ClientID: "hello", Hash: "example_hash", } location := document.Location{ @@ -139,7 +139,7 @@ func TestGetCreateParamsExisting(t *testing.T) { doc := document.DocumentSummary{ ID: uuid.New(), - ClientID: uuid.New(), + ClientID: "hello", Hash: "example_hash", } location := document.Location{ @@ -179,7 +179,7 @@ func TestGetCreateParamsCurrentDocErr(t *testing.T) { svc := New(cfg) doc := document.DocumentSummary{ - ClientID: uuid.New(), + ClientID: "hello", Hash: "example_hash", } location := document.Location{ @@ -210,7 +210,7 @@ func TestSubmitCreate(t *testing.T) { doc := document.DocumentSummary{ ID: uuid.New(), - ClientID: uuid.New(), + ClientID: "hello", Hash: "example_hash", } location := document.Location{ @@ -250,7 +250,7 @@ func TestSubmitCreateExists(t *testing.T) { doc := document.DocumentSummary{ ID: uuid.New(), - ClientID: uuid.New(), + ClientID: "hello", Hash: "example_hash", } location := document.Location{ @@ -273,28 +273,3 @@ func TestSubmitCreateExists(t *testing.T) { require.NoError(t, err) assert.Equal(t, doc.ID, id) } - -func TestGetClientIDFromKey(t *testing.T) { - svc := Service{} - - _, err := svc.GetClientIDFromKey("") - assert.Error(t, err) - - _, err = svc.GetClientIDFromKey("jkhaskhweuifhwhieh") - assert.Error(t, err) - - _, err = svc.GetClientIDFromKey("aaa/bbb/ccc") - assert.Error(t, err) - - id := uuid.New() - _, err = svc.GetClientIDFromKey(fmt.Sprintf("aaa/%s/bbb", id.String())) - assert.Error(t, err) - - aid, err := svc.GetClientIDFromKey(fmt.Sprintf("%s/%s/bbb", id.String(), uuid.NewString())) - require.NoError(t, err) - assert.Equal(t, id, aid) - - aid, err = svc.GetClientIDFromKey(fmt.Sprintf("%s/bbb", id.String())) - require.NoError(t, err) - assert.Equal(t, id, aid) -} diff --git a/internal/document/list.go b/internal/document/list.go index cb559c4d..1a9f36d0 100644 --- a/internal/document/list.go +++ b/internal/document/list.go @@ -4,8 +4,8 @@ import ( "context" ) -func (s *Service) ListByClientExternalId(ctx context.Context, id string) ([]*DocumentSummary, error) { - documents, err := s.cfg.GetDBQueries().ListDocumentsByClientExternalId(ctx, id) +func (s *Service) ListByClient(ctx context.Context, id string) ([]*DocumentSummary, error) { + documents, err := s.cfg.GetDBQueries().ListDocumentsByClient(ctx, id) if err != nil { return nil, err } diff --git a/internal/document/list_test.go b/internal/document/list_test.go index f7dacc7e..678945e8 100644 --- a/internal/document/list_test.go +++ b/internal/document/list_test.go @@ -33,13 +33,13 @@ func TestListByClientId(t *testing.T) { }, } - pool.ExpectQuery("name: ListDocumentsByClientExternalId :many").WithArgs(clientId). + pool.ExpectQuery("name: ListDocumentsByClient :many").WithArgs(clientId). WillReturnRows( pgxmock.NewRows([]string{"id", "hash"}). AddRow(doc[0].ID, doc[0].Hash), ) - adoc, err := svc.ListByClientExternalId(ctx, clientId) + adoc, err := svc.ListByClient(ctx, clientId) require.NoError(t, err) assert.Equal(t, doc, adoc) } diff --git a/internal/document/service.go b/internal/document/service.go index bd1834f5..25524955 100644 --- a/internal/document/service.go +++ b/internal/document/service.go @@ -13,7 +13,7 @@ type Location struct { type DocumentSummary struct { ID uuid.UUID - ClientID uuid.UUID + ClientID string Hash string } diff --git a/internal/document/store/process.go b/internal/document/store/process.go new file mode 100644 index 00000000..e95370f9 --- /dev/null +++ b/internal/document/store/process.go @@ -0,0 +1,90 @@ +package documentstore + +import ( + "context" + "fmt" + "log/slog" + "regexp" + + docinitrunner "queryorchestration/api/docInitRunner" + doctextprocessrunner "queryorchestration/api/docTextProcessRunner" + "queryorchestration/internal/client" + "queryorchestration/internal/serviceconfig/queue" +) + +type Params struct { + Event EventS3 + Key string + Bucket string + Hash string +} + +type EventS3 string + +const ( + EventS3ObjectCreatedPut = "ObjectCreated:Put" +) + +func (s *Service) Process(ctx context.Context, params Params) error { + if !s.isSupportedEvent(params.Event) { + slog.Warn("unsupported event", "name", params.Event) + return nil + } + + task, clientId := getKeyMetadata(params.Key) + + queueParams := &queue.SendParams{} + switch task { + case DocInit: + queueParams.QueueURL = s.cfg.GetDocInitURL() + queueParams.Body = docinitrunner.Body{ + Bucket: params.Bucket, + Key: params.Key, + Hash: params.Hash, + ClientID: clientId, + } + case DocTextProcess: + queueParams.QueueURL = s.cfg.GetDocumentTextProcessURL() + queueParams.Body = doctextprocessrunner.Body{ + Bucket: params.Bucket, + Key: params.Key, + Hash: params.Hash, + ClientID: clientId, + } + default: + slog.Info("unsupported key", "key", params.Key) + return nil + } + + return s.cfg.SendToQueue(ctx, queueParams) +} + +type Task string + +const ( + DocInit Task = "import" + DocTextProcess Task = "text/textract" + Invalid Task = "" +) + +func getKeyMetadata(key string) (Task, string) { + regexStr := fmt.Sprintf(`^(%s)/(import|text/textract)/.+$`, client.CLIENT_ID_REGEX) + re := regexp.MustCompile(regexStr) + match := re.FindStringSubmatch(key) + if len(match) < 3 { + return Invalid, "" + } + + task := Task(match[2]) + if task == Invalid { + return Invalid, "" + } + + clientId := match[1] + + return task, clientId +} + +func (s *Service) isSupportedEvent(name EventS3) bool { + return name == EventS3ObjectCreatedPut +} diff --git a/internal/document/store/process_test.go b/internal/document/store/process_test.go new file mode 100644 index 00000000..5fd2c16f --- /dev/null +++ b/internal/document/store/process_test.go @@ -0,0 +1,117 @@ +package documentstore + +import ( + "context" + "fmt" + "testing" + + "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/queue/documentinit" + "queryorchestration/internal/serviceconfig/queue/documenttextprocess" + queuemock "queryorchestration/mocks/queue" + + "github.com/aws/aws-sdk-go-v2/service/sqs" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +type ProcessConfig struct { + serviceconfig.BaseConfig + documentinit.DocInitConfig + documenttextprocess.DocTextProcessConfig +} + +func TestProcess(t *testing.T) { + ctx := context.Background() + + cfg := &ProcessConfig{} + mockSQS := queuemock.NewMockSQSClient(t) + cfg.QueueClient = mockSQS + cfg.DocInitURL = "docinit" + cfg.DocumentTextProcessURL = "doctextprocess" + + svc := New(cfg) + + t.Run("invalid event", func(t *testing.T) { + err := svc.Process(ctx, Params{ + Event: EventS3("invalid"), + }) + assert.NoError(t, err) + }) + t.Run("invalid key", func(t *testing.T) { + err := svc.Process(ctx, Params{ + Event: EventS3ObjectCreatedPut, + Key: "7db16095-9155-47d4-8004-b3b3ead93c83/invalid", + }) + assert.NoError(t, err) + }) + t.Run("document init", func(t *testing.T) { + mockSQS.EXPECT(). + SendMessage( + mock.Anything, + mock.MatchedBy(func(in *sqs.SendMessageInput) bool { + return *in.QueueUrl == cfg.DocInitURL + }), + mock.Anything, + ). + Return(&sqs.SendMessageOutput{}, nil) + + err := svc.Process(ctx, Params{ + Event: EventS3ObjectCreatedPut, + Key: "7db16095-9155-47d4-8004-b3b3ead93c83/import/a", + }) + assert.NoError(t, err) + }) + t.Run("document text process", func(t *testing.T) { + mockSQS.EXPECT(). + SendMessage( + mock.Anything, + mock.MatchedBy(func(in *sqs.SendMessageInput) bool { + return *in.QueueUrl == cfg.DocumentTextProcessURL + }), + mock.Anything, + ). + Return(&sqs.SendMessageOutput{}, nil) + + err := svc.Process(ctx, Params{ + Event: EventS3ObjectCreatedPut, + Key: "7db16095-9155-47d4-8004-b3b3ead93c83/text/textract/a", + }) + assert.NoError(t, err) + }) +} + +func TestIsSupportedEvent(t *testing.T) { + svc := Service{} + + t.Run("put", func(t *testing.T) { + assert.True(t, svc.isSupportedEvent(EventS3ObjectCreatedPut)) + }) + t.Run("invalid", func(t *testing.T) { + assert.False(t, svc.isSupportedEvent("invalid")) + }) +} + +func TestGetKeyMetadata(t *testing.T) { + baseClientId := "hello" + + task, clientId := getKeyMetadata(fmt.Sprintf("%s/import/a", baseClientId)) + assert.Equal(t, DocInit, task) + assert.Equal(t, baseClientId, clientId) + + task, clientId = getKeyMetadata(fmt.Sprintf("%s/text/textract/a", baseClientId)) + assert.Equal(t, DocTextProcess, task) + assert.Equal(t, baseClientId, clientId) + + task, clientId = getKeyMetadata("a") + assert.Equal(t, Invalid, task) + assert.Equal(t, "", clientId) + + task, clientId = getKeyMetadata("fdee2e22-ad0f-4e30-91c8-d63c3501162f/something/a") + assert.Equal(t, Invalid, task) + assert.Equal(t, "", clientId) + + task, clientId = getKeyMetadata("a/import/a") + assert.Equal(t, DocInit, task) + assert.Equal(t, "a", clientId) +} diff --git a/internal/document/store/service.go b/internal/document/store/service.go new file mode 100644 index 00000000..caad120e --- /dev/null +++ b/internal/document/store/service.go @@ -0,0 +1,23 @@ +package documentstore + +import ( + "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/queue/documentinit" + "queryorchestration/internal/serviceconfig/queue/documenttextprocess" +) + +type ConfigProvider interface { + serviceconfig.ConfigProvider + documentinit.ConfigProvider + documenttextprocess.ConfigProvider +} + +type Service struct { + cfg ConfigProvider +} + +func New(cfg ConfigProvider) *Service { + return &Service{ + cfg, + } +} diff --git a/internal/document/store/service_test.go b/internal/document/store/service_test.go new file mode 100644 index 00000000..1cc9172a --- /dev/null +++ b/internal/document/store/service_test.go @@ -0,0 +1,22 @@ +package documentstore + +import ( + "testing" + + "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/queue/documentinit" + "queryorchestration/internal/serviceconfig/queue/documenttextprocess" + + "github.com/stretchr/testify/assert" +) + +type DocInitConfig struct { + serviceconfig.BaseConfig + documentinit.DocInitConfig + documenttextprocess.DocTextProcessConfig +} + +func TestNew(t *testing.T) { + svc := New(&DocInitConfig{}) + assert.NotNil(t, svc) +} diff --git a/internal/document/sync/sync.go b/internal/document/sync/sync.go index 48ac9899..8eb04acf 100644 --- a/internal/document/sync/sync.go +++ b/internal/document/sync/sync.go @@ -31,7 +31,7 @@ func (s *Service) Sync(ctx context.Context, id uuid.UUID) error { err = s.cfg.SendToQueue(ctx, &queue.SendParams{ QueueURL: s.cfg.GetDocumentCleanURL(), Body: doccleanrunner.Body{ - ID: id, + DocumentID: id, }, }) if err != nil { diff --git a/internal/document/sync/sync_test.go b/internal/document/sync/sync_test.go index 4d09ac8c..28b70de2 100644 --- a/internal/document/sync/sync_test.go +++ b/internal/document/sync/sync_test.go @@ -37,7 +37,7 @@ func TestSync(t *testing.T) { }) j := client.Client{ - ID: uuid.New(), + ID: "clientid", CanSync: true, } doc := document.DocumentSummary{ @@ -52,8 +52,8 @@ func TestSync(t *testing.T) { AddRow(doc.ID, doc.ClientID, doc.Hash), ) pool.ExpectQuery("name: GetClient :one").WithArgs(j.ID).WillReturnRows( - pgxmock.NewRows([]string{"id", "externalId", "name", "canSync"}). - AddRow(j.ID, "id", "client_name", true), + pgxmock.NewRows([]string{"id", "name", "canSync"}). + AddRow(j.ID, "client_name", true), ) mockSQS.EXPECT(). diff --git a/internal/document/text/create.go b/internal/document/text/create.go deleted file mode 100644 index 0354ebb3..00000000 --- a/internal/document/text/create.go +++ /dev/null @@ -1,56 +0,0 @@ -package documenttext - -import ( - "context" - "log/slog" - - querysyncrunner "queryorchestration/api/querySyncRunner" - "queryorchestration/internal/serviceconfig/queue" - - "github.com/google/uuid" -) - -func (s *Service) Extract(ctx context.Context, id uuid.UUID) error { - slog.Debug("extracting document text", "id", id.String()) - - isextracted, err := s.cfg.GetDBQueries().IsDocumentTextExtracted(ctx, id) - if err != nil { - return err - } - - if !isextracted { - entry, err := s.cfg.GetDBQueries().GetCleanEntryByDocId(ctx, id) - if err != nil { - return err - } else if entry.Fail.Valid { - slog.Error("document has no clean document", "id", id) - return nil - } - - err = s.extract(ctx, entry.ID) - if err != nil { - return err - } - } - - err = s.informExtraction(ctx, id) - if err != nil { - return err - } - - return nil -} - -func (s *Service) informExtraction(ctx context.Context, id uuid.UUID) error { - err := s.cfg.SendToQueue(ctx, &queue.SendParams{ - QueueURL: s.cfg.GetQuerySyncURL(), - Body: querysyncrunner.Body{ - ID: id, - }, - }) - if err != nil { - return err - } - - return nil -} diff --git a/internal/document/text/create_test.go b/internal/document/text/create_test.go deleted file mode 100644 index b687c549..00000000 --- a/internal/document/text/create_test.go +++ /dev/null @@ -1,142 +0,0 @@ -package documenttext - -import ( - "context" - "fmt" - "testing" - - "queryorchestration/internal/database/repository" - "queryorchestration/internal/document" - "queryorchestration/internal/serviceconfig" - "queryorchestration/internal/serviceconfig/queue/querysync" - "queryorchestration/internal/serviceconfig/textract" - queuemock "queryorchestration/mocks/queue" - - "github.com/stretchr/testify/require" - - "github.com/aws/aws-sdk-go-v2/service/sqs" - "github.com/google/uuid" - "github.com/pashagolub/pgxmock/v3" - "github.com/stretchr/testify/mock" -) - -type DocTextConfig struct { - serviceconfig.BaseConfig - querysync.QuerySyncConfig - textract.TextractConfig -} - -func TestCreate(t *testing.T) { - ctx := context.Background() - pool, err := pgxmock.NewPool() - require.NoError(t, err) - - mockSQS := queuemock.NewMockSQSClient(t) - - cfg := &DocTextConfig{} - cfg.QueueClient = mockSQS - cfg.QuerySyncURL = "/i/am/here" - cfg.DBPool = pool - cfg.DBQueries = repository.New(pool) - - svc := Service{ - cfg: cfg, - } - - t.Run("valid", func(t *testing.T) { - id := uuid.New() - inloc := document.Location{ - Bucket: "bucket_name", - Key: "/i/am/here", - } - - pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"isextracted"}). - AddRow(false), - ) - cleanId := uuid.New() - mimeType := "application/pdf" - dbmimetype := repository.NullCleanmimetype{ - Valid: true, - Cleanmimetype: repository.Cleanmimetype(mimeType), - } - pool.ExpectQuery("name: GetCleanEntryByDocId :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(cleanId, id, &inloc.Bucket, &inloc.Key, int32(1), dbmimetype, repository.NullCleanfailtype{}), - ) - pool.ExpectQuery("name: GetCleanEntry :one").WithArgs(cleanId).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(cleanId, id, &inloc.Bucket, &inloc.Key, int32(1), dbmimetype, repository.NullCleanfailtype{}), - ) - textId := uuid.New() - pool.ExpectBegin() - pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(cleanId, "example").WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "cleanEntryId"}), - ) - pool.ExpectQuery("name: AddDocumentText :one").WithArgs(inloc.Bucket, inloc.Key, cleanId, "example"). - WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(textId), - ) - pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, pgxmock.AnyArg()). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectCommit() - - mockSQS.EXPECT(). - SendMessage( - mock.Anything, - mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.QuerySyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", id) - }), - mock.Anything, - ). - Return(&sqs.SendMessageOutput{}, nil) - - err = svc.Extract(ctx, id) - require.NoError(t, err) - }) - t.Run("invalid clean", func(t *testing.T) { - id := uuid.New() - fail := repository.NullCleanfailtype{ - Valid: true, - Cleanfailtype: repository.CleanfailtypeInvalidMimetype, - } - - pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"isextracted"}).AddRow(false), - ) - pool.ExpectQuery("name: GetCleanEntryByDocId :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(id, uuid.New(), nil, nil, int64(1), nil, fail), - ) - - err = svc.Extract(ctx, id) - require.NoError(t, err) - }) -} - -func TestInformClean(t *testing.T) { - ctx := context.Background() - mockSQS := queuemock.NewMockSQSClient(t) - - cfg := &DocTextConfig{} - cfg.QueueClient = mockSQS - cfg.QuerySyncURL = "/i/am/here" - svc := Service{ - cfg: cfg, - } - id := uuid.New() - - mockSQS.EXPECT(). - SendMessage( - mock.Anything, - mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.QuerySyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", id) - }), - mock.Anything, - ). - Return(&sqs.SendMessageOutput{}, nil) - - err := svc.informExtraction(ctx, id) - require.NoError(t, err) -} diff --git a/internal/document/text/extract.go b/internal/document/text/extract.go index d0e00d73..b696d2ed 100644 --- a/internal/document/text/extract.go +++ b/internal/document/text/extract.go @@ -2,53 +2,33 @@ package documenttext import ( "context" - "database/sql" - "errors" - "fmt" + "log/slog" - "queryorchestration/internal/database/repository" - "queryorchestration/internal/document" - "queryorchestration/internal/serviceconfig/build" + querysyncrunner "queryorchestration/api/querySyncRunner" + "queryorchestration/internal/serviceconfig/queue" "github.com/google/uuid" ) -type extraction struct { - TextLocation document.Location - Hash string -} +func (s *Service) Extract(ctx context.Context, documentId uuid.UUID) error { + slog.Debug("extracting document text", "id", documentId.String()) -func (s *Service) executeExtraction(ctx context.Context, cleanId uuid.UUID) (*extraction, error) { - entry, err := s.cfg.GetDBQueries().GetCleanEntry(ctx, cleanId) - if err != nil { - return nil, err - } else if entry.Fail.Valid { - return nil, fmt.Errorf("no valid cleaning") - } - - // analysis, detection - diff? - // split page by page? - // output format - // index - // pages - // block types - - return &extraction{ - Hash: "example", - TextLocation: document.Location{ - Bucket: *entry.Bucket, - Key: *entry.Key, - }, - }, nil -} - -func (s *Service) extract(ctx context.Context, cleanId uuid.UUID) error { - details, err := s.executeExtraction(ctx, cleanId) + isextracted, err := s.cfg.GetDBQueries().IsDocumentTextExtracted(ctx, documentId) if err != nil { return err + } else if isextracted { + return s.informExtraction(ctx, documentId) } - err = s.storeExtraction(ctx, cleanId, details) + entry, err := s.cfg.GetDBQueries().GetCleanEntryByDocId(ctx, documentId) + if err != nil { + return err + } else if entry.Fail.Valid { + slog.Error("document has no clean document", "id", documentId) + return nil + } + + err = s.triggerExtract(ctx, entry) if err != nil { return err } @@ -56,43 +36,16 @@ func (s *Service) extract(ctx context.Context, cleanId uuid.UUID) error { return nil } -func (s *Service) storeExtraction(ctx context.Context, cleanId uuid.UUID, details *extraction) error { - version := build.GetVersionUnixTimestamp() - - return s.cfg.ExecuteDBTransaction(ctx, func(ctx context.Context, q *repository.Queries) error { - existing, err := q.GetDocumentTextExtractionByHash(ctx, &repository.GetDocumentTextExtractionByHashParams{ - Hash: details.Hash, - Cleanentryid: cleanId, - }) - if err != nil && !errors.Is(err, sql.ErrNoRows) { - return err - } - - var textId uuid.UUID - if existing == nil || errors.Is(err, sql.ErrNoRows) { - newTextId, err := q.AddDocumentText(ctx, &repository.AddDocumentTextParams{ - Bucket: details.TextLocation.Bucket, - Key: details.TextLocation.Key, - Cleanentryid: cleanId, - Hash: details.Hash, - }) - if err != nil { - return err - } - - textId = newTextId - } else { - textId = existing.ID - } - - err = q.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ - Version: version, - Textid: textId, - }) - if err != nil { - return err - } - - return nil +func (s *Service) informExtraction(ctx context.Context, id uuid.UUID) error { + err := s.cfg.SendToQueue(ctx, &queue.SendParams{ + QueueURL: s.cfg.GetQuerySyncURL(), + Body: querysyncrunner.Body{ + DocumentID: id, + }, }) + if err != nil { + return err + } + + return nil } diff --git a/internal/document/text/extract_test.go b/internal/document/text/extract_test.go index a17aa50b..ef5c1057 100644 --- a/internal/document/text/extract_test.go +++ b/internal/document/text/extract_test.go @@ -2,161 +2,150 @@ package documenttext import ( "context" + "fmt" "testing" "queryorchestration/internal/database/repository" "queryorchestration/internal/document" + "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/aws" + "queryorchestration/internal/serviceconfig/objectstore" + "queryorchestration/internal/serviceconfig/queue/querysync" + "queryorchestration/internal/serviceconfig/textract" + objectstoremock "queryorchestration/mocks/objectstore" + queuemock "queryorchestration/mocks/queue" + textractmock "queryorchestration/mocks/textract" "github.com/stretchr/testify/require" + "github.com/aws/aws-sdk-go-v2/service/sqs" + awstextract "github.com/aws/aws-sdk-go-v2/service/textract" "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) -func TestExtract(t *testing.T) { +type DocTextConfig struct { + aws.AWSConfig + serviceconfig.BaseConfig + querysync.QuerySyncConfig + textract.TextractConfig + objectstore.ObjectStoreConfig +} + +func TestCreate(t *testing.T) { ctx := context.Background() pool, err := pgxmock.NewPool() require.NoError(t, err) + mockSQS := queuemock.NewMockSQSClient(t) + cfg := &DocTextConfig{} + cfg.QueueClient = mockSQS + cfg.QuerySyncURL = "/i/am/here" cfg.DBPool = pool cfg.DBQueries = repository.New(pool) + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + mockTextract := textractmock.NewMockTextractClient(t) + cfg.TextractClient = mockTextract svc := Service{ cfg: cfg, } - t.Run("successful clean", func(t *testing.T) { - id := uuid.New() + t.Run("valid", func(t *testing.T) { + docId := uuid.New() + cleanId := uuid.New() inloc := document.Location{ Bucket: "bucket_name", Key: "/i/am/here", } + clientId := "AAA" + hash := "example" - cleanId := uuid.New() - dbCleanId := cleanId + pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(docId).WillReturnRows( + pgxmock.NewRows([]string{"isextracted"}). + AddRow(false), + ) mimeType := "application/pdf" dbmimetype := repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.Cleanmimetype(mimeType), } - pool.ExpectQuery("name: GetCleanEntry :one").WithArgs(dbCleanId).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(dbCleanId, id, &inloc.Bucket, &inloc.Key, int64(1), dbmimetype, repository.NullCleanfailtype{}), + pool.ExpectQuery("name: GetCleanEntryByDocId :one").WithArgs(docId).WillReturnRows( + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail", "externalClientId"}). + AddRow(cleanId, docId, &inloc.Bucket, &inloc.Key, int64(1), &hash, dbmimetype, repository.NullCleanfailtype{}, clientId), ) - textId := uuid.New() + + jobId := "hello" + triggerId := uuid.New() pool.ExpectBegin() - pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(dbCleanId, "example").WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "cleanEntryId"}), + pool.ExpectQuery("name: AddDocumentTextTrigger :one").WithArgs(cleanId, pgxmock.AnyArg()).WillReturnRows( + pgxmock.NewRows([]string{"id"}).AddRow(triggerId), ) - pool.ExpectQuery("name: AddDocumentText :one").WithArgs(inloc.Bucket, inloc.Key, dbCleanId, "example"). - WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(textId), - ) - pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, pgxmock.AnyArg()). + + mockTextract.EXPECT(). + StartDocumentTextDetection( + mock.Anything, + mock.MatchedBy(func(in *awstextract.StartDocumentTextDetectionInput) bool { + return true + }), + mock.Anything, + ). + Return(&awstextract.StartDocumentTextDetectionOutput{ + JobId: &jobId, + }, nil) + + pool.ExpectExec("name: AddDocumentTextTriggerJobId :exec").WithArgs(&jobId, triggerId). WillReturnResult(pgxmock.NewResult("", 1)) pool.ExpectCommit() - err = svc.extract(ctx, cleanId) + err = svc.Extract(ctx, docId) require.NoError(t, err) }) - t.Run("fail clean", func(t *testing.T) { + t.Run("invalid clean", func(t *testing.T) { id := uuid.New() - - cleanId := uuid.New() fail := repository.NullCleanfailtype{ Valid: true, Cleanfailtype: repository.CleanfailtypeInvalidMimetype, } - pool.ExpectQuery("name: GetCleanEntry :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(cleanId, id, nil, nil, int64(1), nil, fail), + + pool.ExpectQuery("name: IsDocumentTextExtracted :one").WithArgs(id).WillReturnRows( + pgxmock.NewRows([]string{"isextracted"}).AddRow(false), + ) + pool.ExpectQuery("name: GetCleanEntryByDocId :one").WithArgs(id).WillReturnRows( + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "mimetype", "fail", "externalClientId"}). + AddRow(id, uuid.New(), nil, nil, int64(1), nil, nil, fail, "AAA"), ) - err = svc.extract(ctx, id) - assert.Error(t, err) - }) -} - -func TestExecuteExtraction(t *testing.T) { - pool, err := pgxmock.NewPool() - require.NoError(t, err) - - cfg := &DocTextConfig{} - cfg.DBPool = pool - cfg.DBQueries = repository.New(pool) - - svc := Service{ - cfg: cfg, - } - - ctx := context.Background() - id := uuid.New() - location := document.Location{ - Bucket: "buck", - Key: "key", - } - extract := extraction{ - TextLocation: location, - Hash: "example", - } - dbmimetype := repository.NullCleanmimetype{ - Valid: true, - Cleanmimetype: repository.CleanmimetypeApplicationPdf, - } - - pool.ExpectQuery("name: GetCleanEntry :one").WithArgs(id).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "mimetype", "fail"}). - AddRow(uuid.New(), id, &location.Bucket, &location.Key, int32(1), dbmimetype, repository.NullCleanfailtype{}), - ) - - outloc, err := svc.executeExtraction(ctx, id) - require.NoError(t, err) - assert.EqualExportedValues(t, extract, *outloc) -} - -func TestStoreExtraction(t *testing.T) { - pool, err := pgxmock.NewPool() - require.NoError(t, err) - - cfg := &DocTextConfig{} - cfg.DBPool = pool - cfg.DBQueries = repository.New(pool) - - svc := Service{ - cfg: cfg, - } - - ctx := context.Background() - - t.Run("not existing", func(t *testing.T) { - cleanId := uuid.New() - dbCleanId := cleanId - textId := uuid.New() - extract := extraction{ - TextLocation: document.Location{ - Bucket: "buck", - Key: "key", - }, - Hash: "example", - } - - pool.ExpectBegin() - pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(dbCleanId, extract.Hash).WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "cleanEntryId"}), - ) - pool.ExpectQuery("name: AddDocumentText :one").WithArgs(extract.TextLocation.Bucket, extract.TextLocation.Key, dbCleanId, "example"). - WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(textId), - ) - pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, pgxmock.AnyArg()). - WillReturnResult(pgxmock.NewResult("", 1)) - pool.ExpectCommit() - - err = svc.storeExtraction(ctx, cleanId, &extract) + err = svc.Extract(ctx, id) require.NoError(t, err) }) } + +func TestInformClean(t *testing.T) { + ctx := context.Background() + mockSQS := queuemock.NewMockSQSClient(t) + + cfg := &DocTextConfig{} + cfg.QueueClient = mockSQS + cfg.QuerySyncURL = "/i/am/here" + svc := Service{ + cfg: cfg, + } + id := uuid.New() + + mockSQS.EXPECT(). + SendMessage( + mock.Anything, + mock.MatchedBy(func(in *sqs.SendMessageInput) bool { + return *in.QueueUrl == cfg.QuerySyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", id) + }), + mock.Anything, + ). + Return(&sqs.SendMessageOutput{}, nil) + + err := svc.informExtraction(ctx, id) + require.NoError(t, err) +} diff --git a/internal/document/text/processExtract.go b/internal/document/text/processExtract.go new file mode 100644 index 00000000..a35441b2 --- /dev/null +++ b/internal/document/text/processExtract.go @@ -0,0 +1,173 @@ +package documenttext + +import ( + "bytes" + "context" + "database/sql" + "errors" + "fmt" + "io" + "strings" + + "queryorchestration/internal/database/repository" + "queryorchestration/internal/serviceconfig/build" + + "github.com/aws/aws-sdk-go-v2/service/s3" + "github.com/google/uuid" +) + +type ProcessParams struct { + Bucket string + Key string + Hash string + ClientID string +} + +type Page string + +func (s *Service) getPages(baseTextract io.Reader) ([]*Page, error) { + // For each page + // Look for table, form, signature + // If one/many found - run appropriate tier and merge in + // tiers?? - analyze (for tables?) + + // cleanPages + // linkPages + + return []*Page{}, nil +} + +func (s *Service) mergePages(pages []*Page) (io.Reader, error) { + // merge document - pages to text + // e.g. common tables + return strings.NewReader("hello"), nil +} + +func (s *Service) processTrigger(ctx context.Context, trigger *repository.GetDocumentTextTriggerRow, params *ProcessParams) error { + response, err := s.cfg.GetStoreClient().GetObject(ctx, &s3.GetObjectInput{ + Bucket: ¶ms.Bucket, + Key: ¶ms.Key, + IfMatch: ¶ms.Hash, + }) + if err != nil { + return err + } + + pages, err := s.getPages(response.Body) + if err != nil { + return err + } + + text, err := s.mergePages(pages) + if err != nil { + return err + } + + err = s.storeProcess(ctx, text, trigger, params) + if err != nil { + return err + } + + return nil +} + +func (s *Service) createTextKey(clientId string, textId uuid.UUID) string { + return fmt.Sprintf("%s/text/out/%s", clientId, textId) +} + +func (s *Service) storeProcess(ctx context.Context, text io.Reader, trigger *repository.GetDocumentTextTriggerRow, params *ProcessParams) error { + version := build.GetVersionUnixTimestamp() + + hashReader, storeReader, err := duplicateReader(text) + if err != nil { + return err + } + + hash, err := s.cfg.CalculateETag(ctx, hashReader) + if err != nil { + return err + } + + return s.cfg.ExecuteDBTransaction(ctx, func(ctx context.Context, q *repository.Queries) error { + existingId, err := q.GetDocumentTextExtractionByHash(ctx, &repository.GetDocumentTextExtractionByHashParams{ + Cleanentryid: trigger.Cleanid, + Hash: hash, + }) + if err != nil && !errors.Is(err, sql.ErrNoRows) { + return err + } + + var textId uuid.UUID + if existingId == uuid.Nil || errors.Is(err, sql.ErrNoRows) { + key := s.createTextKey(params.ClientID, trigger.ID) + + textId, err = q.AddDocumentText(ctx, &repository.AddDocumentTextParams{ + Bucket: params.Bucket, + Key: key, + Hash: hash, + }) + if err != nil { + return err + } + + _, err = s.cfg.GetStoreClient().PutObject(ctx, &s3.PutObjectInput{ + Bucket: ¶ms.Bucket, + Key: &key, + Body: storeReader, + }) + if err != nil { + return err + } + + } else { + textId = existingId + } + + err = q.AddDocumentTextEntry(ctx, &repository.AddDocumentTextEntryParams{ + Textid: textId, + Triggerid: trigger.ID, + Version: version, + }) + if err != nil { + return err + } + + return nil + }) +} + +func (s *Service) Process(ctx context.Context, params *ProcessParams) error { + triggerId, err := s.getTriggerIdFromKey(params.Key) + if err != nil { + return err + } + + trigger, err := s.cfg.GetDBQueries().GetDocumentTextTrigger(ctx, triggerId) + if err != nil { + return err + } + + err = s.processTrigger(ctx, trigger, params) + if err != nil { + return err + } + + err = s.informExtraction(ctx, trigger.Documentid) + if err != nil { + return err + } + + return nil +} + +func duplicateReader(reader io.Reader) (io.Reader, io.Reader, error) { + content, err := io.ReadAll(reader) + if err != nil { + return nil, nil, err + } + + reader1 := bytes.NewReader(content) + reader2 := bytes.NewReader(content) + + return reader1, reader2, nil +} diff --git a/internal/document/text/processExtract_test.go b/internal/document/text/processExtract_test.go new file mode 100644 index 00000000..d05a052c --- /dev/null +++ b/internal/document/text/processExtract_test.go @@ -0,0 +1,263 @@ +package documenttext + +import ( + "context" + "database/sql" + "fmt" + "io" + "strings" + "testing" + + "queryorchestration/internal/database/repository" + objectstoremock "queryorchestration/mocks/objectstore" + queuemock "queryorchestration/mocks/queue" + + "github.com/aws/aws-sdk-go-v2/service/s3" + "github.com/aws/aws-sdk-go-v2/service/sqs" + "github.com/google/uuid" + "github.com/pashagolub/pgxmock/v3" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" +) + +func TestProcess(t *testing.T) { + ctx := context.Background() + pool, err := pgxmock.NewPool() + require.NoError(t, err) + + cfg := &DocTextConfig{} + cfg.DBPool = pool + cfg.DBQueries = repository.New(pool) + cfg.QuerySyncURL = "querysync" + mockSQS := queuemock.NewMockSQSClient(t) + cfg.QueueClient = mockSQS + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + + svc := Service{ + cfg: cfg, + } + + triggerId := uuid.MustParse("6ac21b2b-f36c-4ae7-a815-307d4a9bfe4d") + docId := uuid.MustParse("6ac21b2b-f36c-4ae7-a815-307d4a9bfe4a") + textractId := "hello" + textId := uuid.New() + cleanId := uuid.New() + hash := `"5d41402abc4b2a76b9719d911017c592"` + + pool.ExpectQuery("name: GetDocumentTextTrigger :one").WithArgs(triggerId).WillReturnRows( + pgxmock.NewRows([]string{"id", "cleanId", "version", "textractJobId", "documentId"}). + AddRow(triggerId, cleanId, int64(123), &textractId, docId), + ) + pool.ExpectBegin() + pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(cleanId, hash).WillReturnRows( + pgxmock.NewRows([]string{"id"}). + AddRow(textId), + ) + pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, triggerId, pgxmock.AnyArg()). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() + + body := io.NopCloser(strings.NewReader("hello")) + mockS3.EXPECT(). + GetObject( + mock.Anything, + mock.MatchedBy(func(in *s3.GetObjectInput) bool { + return *in.IfMatch == "hash" + }), + mock.Anything, + ). + Return(&s3.GetObjectOutput{ + Body: body, + }, nil) + + mockSQS.EXPECT(). + SendMessage( + mock.Anything, + mock.MatchedBy(func(in *sqs.SendMessageInput) bool { + return *in.QueueUrl == cfg.QuerySyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", docId.String()) + }), + mock.Anything, + ). + Return(&sqs.SendMessageOutput{}, nil) + + err = svc.Process(ctx, &ProcessParams{ + Bucket: "bucket", + Key: "6ece4a77-702c-4cc9-8654-43c557e21658/text/textract/6ac21b2b-f36c-4ae7-a815-307d4a9bfe4d", + Hash: "hash", + }) + assert.NoError(t, err) +} + +func TestStoreTrigger(t *testing.T) { + ctx := context.Background() + pool, err := pgxmock.NewPool() + require.NoError(t, err) + + cfg := &DocTextConfig{} + cfg.DBPool = pool + cfg.DBQueries = repository.New(pool) + cfg.QuerySyncURL = "querysync" + mockSQS := queuemock.NewMockSQSClient(t) + cfg.QueueClient = mockSQS + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + + svc := Service{ + cfg: cfg, + } + + cleanId := uuid.New() + textId := uuid.New() + triggerId := uuid.New() + clientId := "hello" + bucket := "bucket" + + t.Run("exists", func(t *testing.T) { + hash := `"5d41402abc4b2a76b9719d911017c592"` + pool.ExpectBegin() + pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(cleanId, hash).WillReturnRows( + pgxmock.NewRows([]string{"id"}). + AddRow(textId), + ) + pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, triggerId, pgxmock.AnyArg()). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() + + text := strings.NewReader("hello") + err = svc.storeProcess(ctx, text, &repository.GetDocumentTextTriggerRow{ + ID: triggerId, + Cleanid: cleanId, + }, &ProcessParams{ + Bucket: bucket, + }) + require.NoError(t, err) + }) + t.Run("not exists", func(t *testing.T) { + key := fmt.Sprintf("%s/text/out/%s", clientId, triggerId) + hash := `"09644372e99020106946045c6fd2d70b"` + pool.ExpectBegin() + pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(cleanId, hash). + WillReturnError(sql.ErrNoRows) + pool.ExpectQuery("name: AddDocumentText :one").WithArgs(bucket, key, hash). + WillReturnRows( + pgxmock.NewRows([]string{"id"}). + AddRow(textId), + ) + + mockS3.EXPECT(). + PutObject( + mock.Anything, + mock.MatchedBy(func(in *s3.PutObjectInput) bool { + bod, err := io.ReadAll(in.Body) + require.NoError(t, err) + return string(bod) == "byebye" && *in.Key == key && *in.Bucket == bucket + }), + mock.Anything, + ). + Return(&s3.PutObjectOutput{}, nil) + + pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, triggerId, pgxmock.AnyArg()). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() + + text := strings.NewReader("byebye") + err = svc.storeProcess(ctx, text, &repository.GetDocumentTextTriggerRow{ + ID: triggerId, + Cleanid: cleanId, + }, &ProcessParams{ + Bucket: bucket, + ClientID: clientId, + }) + require.NoError(t, err) + }) +} + +func TestDuplicateReader(t *testing.T) { + original := strings.NewReader("hello") + readerOne, readerTwo, err := duplicateReader(original) + require.NoError(t, err) + contentOne, err := io.ReadAll(readerOne) + require.NoError(t, err) + assert.Equal(t, []byte("hello"), contentOne) + contentTwo, err := io.ReadAll(readerTwo) + require.NoError(t, err) + assert.Equal(t, []byte("hello"), contentTwo) +} + +func TestProcessTrigger(t *testing.T) { + ctx := context.Background() + pool, err := pgxmock.NewPool() + require.NoError(t, err) + + cfg := &DocTextConfig{} + cfg.DBPool = pool + cfg.DBQueries = repository.New(pool) + cfg.QuerySyncURL = "querysync" + mockSQS := queuemock.NewMockSQSClient(t) + cfg.QueueClient = mockSQS + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + + svc := Service{ + cfg: cfg, + } + + cleanId := uuid.New() + textId := uuid.New() + triggerId := uuid.New() + clientId := "hello" + bucket := "bucket" + key := fmt.Sprintf("%s/text/out/%s", clientId, triggerId) + hash := `"5d41402abc4b2a76b9719d911017c592"` + + pool.ExpectBegin() + pool.ExpectQuery("name: GetDocumentTextExtractionByHash :one").WithArgs(cleanId, hash). + WillReturnError(sql.ErrNoRows) + pool.ExpectQuery("name: AddDocumentText :one").WithArgs(bucket, key, hash). + WillReturnRows( + pgxmock.NewRows([]string{"id"}). + AddRow(textId), + ) + + body := io.NopCloser(strings.NewReader("hello")) + mockS3.EXPECT(). + GetObject( + mock.Anything, + mock.MatchedBy(func(in *s3.GetObjectInput) bool { + return *in.Key == key && *in.Bucket == bucket && *in.IfMatch == hash + }), + mock.Anything, + ). + Return(&s3.GetObjectOutput{ + Body: body, + }, nil) + + mockS3.EXPECT(). + PutObject( + mock.Anything, + mock.MatchedBy(func(in *s3.PutObjectInput) bool { + bod, err := io.ReadAll(in.Body) + require.NoError(t, err) + return string(bod) == "hello" && *in.Key == key && *in.Bucket == bucket + }), + mock.Anything, + ). + Return(&s3.PutObjectOutput{}, nil) + + pool.ExpectExec("name: AddDocumentTextEntry :exec").WithArgs(textId, triggerId, pgxmock.AnyArg()). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() + + err = svc.processTrigger(ctx, &repository.GetDocumentTextTriggerRow{ + ID: triggerId, + Cleanid: cleanId, + }, &ProcessParams{ + ClientID: clientId, + Bucket: bucket, + Key: key, + Hash: hash, + }) + require.NoError(t, err) +} diff --git a/internal/document/text/service.go b/internal/document/text/service.go index fb5be95d..7db2a393 100644 --- a/internal/document/text/service.go +++ b/internal/document/text/service.go @@ -2,14 +2,16 @@ package documenttext import ( "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/serviceconfig/queue/querysync" "queryorchestration/internal/serviceconfig/textract" ) type ConfigProvider interface { serviceconfig.ConfigProvider - querysync.ConfigProvider textract.ConfigProvider + querysync.ConfigProvider + objectstore.ConfigProvider } type Service struct { diff --git a/internal/document/text/service_test.go b/internal/document/text/service_test.go index 3deddb45..cdcf461e 100644 --- a/internal/document/text/service_test.go +++ b/internal/document/text/service_test.go @@ -5,6 +5,8 @@ import ( documenttext "queryorchestration/internal/document/text" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/aws" + "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/serviceconfig/queue/querysync" "queryorchestration/internal/serviceconfig/textract" @@ -12,9 +14,11 @@ import ( ) type DocTextConfig struct { + aws.AWSConfig serviceconfig.BaseConfig querysync.QuerySyncConfig textract.TextractConfig + objectstore.ObjectStoreConfig } func TestService(t *testing.T) { diff --git a/internal/document/text/triggerExtract.go b/internal/document/text/triggerExtract.go new file mode 100644 index 00000000..9c405ff3 --- /dev/null +++ b/internal/document/text/triggerExtract.go @@ -0,0 +1,92 @@ +package documenttext + +import ( + "context" + "errors" + "fmt" + "regexp" + + "queryorchestration/internal/client" + "queryorchestration/internal/database/repository" + "queryorchestration/internal/serviceconfig/build" + + "github.com/aws/aws-sdk-go-v2/service/textract" + "github.com/aws/aws-sdk-go-v2/service/textract/types" + "github.com/google/uuid" +) + +func (s *Service) triggerExtract(ctx context.Context, clean *repository.Currentcleanentry) error { + version := build.GetVersionUnixTimestamp() + + return s.cfg.ExecuteDBTransaction(ctx, func(ctx context.Context, q *repository.Queries) error { + triggerId, err := s.cfg.GetDBQueries().AddDocumentTextTrigger(ctx, &repository.AddDocumentTextTriggerParams{ + Cleanid: clean.ID, + Version: version, + }) + if err != nil { + return err + } + + jobTag := triggerId.String() + + key, err := s.getOutputLocation(clean.Clientid, triggerId) + if err != nil { + return err + } + + res, err := s.cfg.GetTextractClient().StartDocumentTextDetection(ctx, &textract.StartDocumentTextDetectionInput{ + DocumentLocation: &types.DocumentLocation{ + S3Object: &types.S3Object{ + Bucket: clean.Bucket, + Name: clean.Key, + }, + }, + JobTag: &jobTag, + OutputConfig: &types.OutputConfig{ + S3Bucket: clean.Bucket, + S3Prefix: &key, + }, + }) + if err != nil { + return err + } else if res.JobId == nil { + return errors.New("No job id returned from textract") + } + + err = s.cfg.GetDBQueries().AddDocumentTextTriggerJobId(ctx, &repository.AddDocumentTextTriggerJobIdParams{ + ID: triggerId, + Textractjobid: res.JobId, + }) + if err != nil { + return err + } + + return nil + }) +} + +func (s *Service) getOutputLocation(clientId string, triggerId uuid.UUID) (string, error) { + if clientId == "" { + return "", errors.New("client id required") + } else if triggerId == uuid.Nil { + return "", errors.New("trigger id required") + } + + return fmt.Sprintf("%s/text/textract/%s", clientId, triggerId), nil +} + +func (s *Service) getTriggerIdFromKey(key string) (uuid.UUID, error) { + regexPattern := fmt.Sprintf(`^%s/text/textract/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$`, client.CLIENT_ID_REGEX) + re := regexp.MustCompile(regexPattern) + match := re.FindStringSubmatch(key) + if len(match) < 2 { + return uuid.Nil, errors.New("Trigger Id not found") + } + + triggerId, err := uuid.Parse(match[1]) + if err != nil { + return uuid.Nil, err + } + + return triggerId, nil +} diff --git a/internal/document/text/triggerExtract_test.go b/internal/document/text/triggerExtract_test.go new file mode 100644 index 00000000..fdfe0b40 --- /dev/null +++ b/internal/document/text/triggerExtract_test.go @@ -0,0 +1,121 @@ +package documenttext + +import ( + "context" + "fmt" + "testing" + + "queryorchestration/internal/database/repository" + "queryorchestration/internal/document" + objectstoremock "queryorchestration/mocks/objectstore" + textractmock "queryorchestration/mocks/textract" + + "github.com/aws/aws-sdk-go-v2/service/textract" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "github.com/google/uuid" + "github.com/pashagolub/pgxmock/v3" +) + +func TestTriggerExtract(t *testing.T) { + ctx := context.Background() + pool, err := pgxmock.NewPool() + require.NoError(t, err) + + cfg := &DocTextConfig{} + cfg.DBPool = pool + cfg.DBQueries = repository.New(pool) + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + mockTextract := textractmock.NewMockTextractClient(t) + cfg.TextractClient = mockTextract + + svc := Service{ + cfg: cfg, + } + + t.Run("successful clean", func(t *testing.T) { + cleanId := uuid.New() + inloc := document.Location{ + Bucket: "bucket_name", + Key: "/i/am/here", + } + hash := "hhasshhh" + + jobId := "hello" + triggerId := uuid.New() + pool.ExpectBegin() + pool.ExpectQuery("name: AddDocumentTextTrigger :one").WithArgs(cleanId, pgxmock.AnyArg()).WillReturnRows( + pgxmock.NewRows([]string{"id"}).AddRow(triggerId), + ) + + mockTextract.EXPECT(). + StartDocumentTextDetection( + mock.Anything, + mock.MatchedBy(func(in *textract.StartDocumentTextDetectionInput) bool { + return true + }), + mock.Anything, + ). + Return(&textract.StartDocumentTextDetectionOutput{ + JobId: &jobId, + }, nil) + + pool.ExpectExec("name: AddDocumentTextTriggerJobId :exec").WithArgs(&jobId, triggerId). + WillReturnResult(pgxmock.NewResult("", 1)) + pool.ExpectCommit() + + err = svc.triggerExtract(ctx, &repository.Currentcleanentry{ + ID: cleanId, + Clientid: "AA", + Key: &inloc.Key, + Bucket: &inloc.Bucket, + Hash: &hash, + Mimetype: repository.NullCleanmimetype{ + Valid: true, + Cleanmimetype: repository.CleanmimetypeApplicationPdf, + }, + }) + require.NoError(t, err) + }) +} + +func TestGetOutputLocation(t *testing.T) { + svc := Service{} + + _, err := svc.getOutputLocation("", uuid.Nil) + assert.EqualError(t, err, "client id required") + + _, err = svc.getOutputLocation("a", uuid.Nil) + assert.EqualError(t, err, "trigger id required") + + triggerId := uuid.New() + key, err := svc.getOutputLocation("a", triggerId) + assert.NoError(t, err) + assert.Equal(t, fmt.Sprintf("a/text/textract/%s", triggerId), key) +} + +func TestGetTriggerIdFromKey(t *testing.T) { + svc := Service{} + + _, err := svc.getTriggerIdFromKey("") + assert.EqualError(t, err, "Trigger Id not found") + + _, err = svc.getTriggerIdFromKey("aa") + assert.EqualError(t, err, "Trigger Id not found") + + _, err = svc.getTriggerIdFromKey("6ece4a77-702c-4cc9-8654-43c557e21658") + assert.EqualError(t, err, "Trigger Id not found") + + _, err = svc.getTriggerIdFromKey("6ece4a77-702c-4cc9-8654-43c557e21658/text/textract/") + assert.EqualError(t, err, "Trigger Id not found") + + _, err = svc.getTriggerIdFromKey("6ece4a77-702c-4cc9-8654-43c557e21658/text/textract/a") + assert.EqualError(t, err, "Trigger Id not found") + + triggerId, err := svc.getTriggerIdFromKey("6ece4a77-702c-4cc9-8654-43c557e21658/text/textract/6ac21b2b-f36c-4ae7-a815-307d4a9bfe4d") + assert.NoError(t, err) + assert.Equal(t, "6ac21b2b-f36c-4ae7-a815-307d4a9bfe4d", triggerId.String()) +} diff --git a/internal/document/types/contentType.go b/internal/document/types/contentType.go new file mode 100644 index 00000000..dcda420a --- /dev/null +++ b/internal/document/types/contentType.go @@ -0,0 +1,9 @@ +package documenttypes + +type MimeType string + +const ( + MimeTypePDF MimeType = "application/pdf" + MimeTypeBinaryOctetStream MimeType = "binary/octet-stream" + MimeTypeInvalid MimeType = "invalid" +) diff --git a/internal/document/types/invalid.go b/internal/document/types/invalid.go new file mode 100644 index 00000000..5f45e2a7 --- /dev/null +++ b/internal/document/types/invalid.go @@ -0,0 +1,16 @@ +package documenttypes + +type InvalidDocumentReason string + +const ( + InvalidDocumentMimeType InvalidDocumentReason = "invalid_mimetype" + InvalidDocumentRead InvalidDocumentReason = "invalid_read" + InvalidDocumentReadPages InvalidDocumentReason = "invalid_read_pages" + InvalidDocumentZeroPageCount InvalidDocumentReason = "zero_page_count" + InvalidDocumentLargePageCount InvalidDocumentReason = "large_page_count" + InvalidDocumentLargeFile InvalidDocumentReason = "large_file" + InvalidDocumentSmallDimensions InvalidDocumentReason = "small_dimensions" + InvalidDocumentLargeDimensions InvalidDocumentReason = "large_dimensions" + InvalidDocumentSmallDPI InvalidDocumentReason = "small_dpi" + InvalidDocumentLargeDPI InvalidDocumentReason = "large_dpi" +) diff --git a/internal/document/clean/parsetype.go b/internal/document/types/parsetype.go similarity index 99% rename from internal/document/clean/parsetype.go rename to internal/document/types/parsetype.go index 3d31bbb7..4946f83d 100644 --- a/internal/document/clean/parsetype.go +++ b/internal/document/types/parsetype.go @@ -1,4 +1,4 @@ -package documentclean +package documenttypes import "queryorchestration/internal/database/repository" diff --git a/internal/document/clean/parsetypes_test.go b/internal/document/types/parsetypes_test.go similarity index 50% rename from internal/document/clean/parsetypes_test.go rename to internal/document/types/parsetypes_test.go index 12715fd1..e0802c31 100644 --- a/internal/document/clean/parsetypes_test.go +++ b/internal/document/types/parsetypes_test.go @@ -1,62 +1,62 @@ -package documentclean_test +package documenttypes_test import ( "testing" "queryorchestration/internal/database/repository" - documentclean "queryorchestration/internal/document/clean" + documenttypes "queryorchestration/internal/document/types" "github.com/stretchr/testify/assert" ) func TestToDBMimeType(t *testing.T) { t.Run("application/pdf", func(t *testing.T) { - assert.Equal(t, repository.CleanmimetypeApplicationPdf, documentclean.ToDBMimeType(documentclean.MimeTypePDF)) + assert.Equal(t, repository.CleanmimetypeApplicationPdf, documenttypes.ToDBMimeType(documenttypes.MimeTypePDF)) }) t.Run("invalid", func(t *testing.T) { - assert.Equal(t, repository.Cleanmimetype(""), documentclean.ToDBMimeType(documentclean.MimeTypeInvalid)) + assert.Equal(t, repository.Cleanmimetype(""), documenttypes.ToDBMimeType(documenttypes.MimeTypeInvalid)) }) t.Run("binary octet", func(t *testing.T) { - assert.Equal(t, repository.Cleanmimetype(""), documentclean.ToDBMimeType(documentclean.MimeTypeBinaryOctetStream)) + assert.Equal(t, repository.Cleanmimetype(""), documenttypes.ToDBMimeType(documenttypes.MimeTypeBinaryOctetStream)) }) } func TestToDBNullMimeType(t *testing.T) { t.Run("application/pdf", func(t *testing.T) { - mimetype := documentclean.ToDBNullMimeType(documentclean.MimeTypePDF) + mimetype := documenttypes.ToDBNullMimeType(documenttypes.MimeTypePDF) assert.Equal(t, mimetype.Cleanmimetype, repository.CleanmimetypeApplicationPdf) assert.True(t, mimetype.Valid) }) t.Run("invalid", func(t *testing.T) { - mimetype := documentclean.ToDBNullMimeType(documentclean.MimeTypeInvalid) + mimetype := documenttypes.ToDBNullMimeType(documenttypes.MimeTypeInvalid) assert.False(t, mimetype.Valid) }) } func TestParseDBMimeType(t *testing.T) { t.Run("application/pdf", func(t *testing.T) { - assert.Equal(t, documentclean.MimeTypePDF, documentclean.ParseDBMimeType(repository.CleanmimetypeApplicationPdf)) + assert.Equal(t, documenttypes.MimeTypePDF, documenttypes.ParseDBMimeType(repository.CleanmimetypeApplicationPdf)) }) t.Run("unknown", func(t *testing.T) { - assert.Equal(t, documentclean.MimeTypeInvalid, documentclean.ParseDBMimeType(repository.Cleanmimetype(""))) + assert.Equal(t, documenttypes.MimeTypeInvalid, documenttypes.ParseDBMimeType(repository.Cleanmimetype(""))) }) } func TestParseDBNullMimeType(t *testing.T) { t.Run("application/pdf", func(t *testing.T) { - assert.Equal(t, documentclean.MimeTypePDF, documentclean.ParseDBNullMimeType(repository.NullCleanmimetype{ + assert.Equal(t, documenttypes.MimeTypePDF, documenttypes.ParseDBNullMimeType(repository.NullCleanmimetype{ Valid: true, Cleanmimetype: repository.CleanmimetypeApplicationPdf, })) }) t.Run("not valid", func(t *testing.T) { - assert.Equal(t, documentclean.MimeTypeInvalid, documentclean.ParseDBNullMimeType(repository.NullCleanmimetype{ + assert.Equal(t, documenttypes.MimeTypeInvalid, documenttypes.ParseDBNullMimeType(repository.NullCleanmimetype{ Valid: false, Cleanmimetype: repository.CleanmimetypeApplicationPdf, })) }) t.Run("empty", func(t *testing.T) { - assert.Equal(t, documentclean.MimeTypeInvalid, documentclean.ParseDBNullMimeType(repository.NullCleanmimetype{ + assert.Equal(t, documenttypes.MimeTypeInvalid, documenttypes.ParseDBNullMimeType(repository.NullCleanmimetype{ Valid: true, })) }) @@ -64,55 +64,55 @@ func TestParseDBNullMimeType(t *testing.T) { func TestParseDBFailType(t *testing.T) { t.Run("invalid mimetype", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeInvalidMimetype, documentclean.ToDBFailType(documentclean.InvalidDocumentMimeType)) + assert.Equal(t, repository.CleanfailtypeInvalidMimetype, documenttypes.ToDBFailType(documenttypes.InvalidDocumentMimeType)) }) t.Run("invalid read", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeInvalidRead, documentclean.ToDBFailType(documentclean.InvalidDocumentRead)) + assert.Equal(t, repository.CleanfailtypeInvalidRead, documenttypes.ToDBFailType(documenttypes.InvalidDocumentRead)) }) t.Run("invalid read pages", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeInvalidReadPages, documentclean.ToDBFailType(documentclean.InvalidDocumentReadPages)) + assert.Equal(t, repository.CleanfailtypeInvalidReadPages, documenttypes.ToDBFailType(documenttypes.InvalidDocumentReadPages)) }) t.Run("zero page count", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeZeroPageCount, documentclean.ToDBFailType(documentclean.InvalidDocumentZeroPageCount)) + assert.Equal(t, repository.CleanfailtypeZeroPageCount, documenttypes.ToDBFailType(documenttypes.InvalidDocumentZeroPageCount)) }) t.Run("large page count", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeLargePageCount, documentclean.ToDBFailType(documentclean.InvalidDocumentLargePageCount)) + assert.Equal(t, repository.CleanfailtypeLargePageCount, documenttypes.ToDBFailType(documenttypes.InvalidDocumentLargePageCount)) }) t.Run("large file", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeLargeFile, documentclean.ToDBFailType(documentclean.InvalidDocumentLargeFile)) + assert.Equal(t, repository.CleanfailtypeLargeFile, documenttypes.ToDBFailType(documenttypes.InvalidDocumentLargeFile)) }) t.Run("small dimensions", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeSmallDimensions, documentclean.ToDBFailType(documentclean.InvalidDocumentSmallDimensions)) + assert.Equal(t, repository.CleanfailtypeSmallDimensions, documenttypes.ToDBFailType(documenttypes.InvalidDocumentSmallDimensions)) }) t.Run("large dimensions", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeLargeDimensions, documentclean.ToDBFailType(documentclean.InvalidDocumentLargeDimensions)) + assert.Equal(t, repository.CleanfailtypeLargeDimensions, documenttypes.ToDBFailType(documenttypes.InvalidDocumentLargeDimensions)) }) t.Run("small dpi", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeSmallDpi, documentclean.ToDBFailType(documentclean.InvalidDocumentSmallDPI)) + assert.Equal(t, repository.CleanfailtypeSmallDpi, documenttypes.ToDBFailType(documenttypes.InvalidDocumentSmallDPI)) }) t.Run("large dpi", func(t *testing.T) { - assert.Equal(t, repository.CleanfailtypeLargeDpi, documentclean.ToDBFailType(documentclean.InvalidDocumentLargeDPI)) + assert.Equal(t, repository.CleanfailtypeLargeDpi, documenttypes.ToDBFailType(documenttypes.InvalidDocumentLargeDPI)) }) t.Run("unknown", func(t *testing.T) { - assert.Equal(t, repository.Cleanfailtype(""), documentclean.ToDBFailType(documentclean.InvalidDocumentReason(""))) + assert.Equal(t, repository.Cleanfailtype(""), documenttypes.ToDBFailType(documenttypes.InvalidDocumentReason(""))) }) } func TestParseDBNullFailType(t *testing.T) { t.Run("invalid mimetype", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentMimeType, documentclean.ParseDBNullFailType(repository.NullCleanfailtype{ + assert.Equal(t, documenttypes.InvalidDocumentMimeType, documenttypes.ParseDBNullFailType(repository.NullCleanfailtype{ Valid: true, Cleanfailtype: repository.CleanfailtypeInvalidMimetype, })) }) t.Run("not valid", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentReason(""), documentclean.ParseDBNullFailType(repository.NullCleanfailtype{ + assert.Equal(t, documenttypes.InvalidDocumentReason(""), documenttypes.ParseDBNullFailType(repository.NullCleanfailtype{ Valid: false, Cleanfailtype: repository.CleanfailtypeInvalidMimetype, })) }) t.Run("empty", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentReason(""), documentclean.ParseDBNullFailType(repository.NullCleanfailtype{ + assert.Equal(t, documenttypes.InvalidDocumentReason(""), documenttypes.ParseDBNullFailType(repository.NullCleanfailtype{ Valid: true, })) }) @@ -120,48 +120,48 @@ func TestParseDBNullFailType(t *testing.T) { func TestToDBFailType(t *testing.T) { t.Run("invalid mimetype", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentMimeType, documentclean.ParseDBFailType(repository.CleanfailtypeInvalidMimetype)) + assert.Equal(t, documenttypes.InvalidDocumentMimeType, documenttypes.ParseDBFailType(repository.CleanfailtypeInvalidMimetype)) }) t.Run("invalid read", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentRead, documentclean.ParseDBFailType(repository.CleanfailtypeInvalidRead)) + assert.Equal(t, documenttypes.InvalidDocumentRead, documenttypes.ParseDBFailType(repository.CleanfailtypeInvalidRead)) }) t.Run("invalid read pages", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentReadPages, documentclean.ParseDBFailType(repository.CleanfailtypeInvalidReadPages)) + assert.Equal(t, documenttypes.InvalidDocumentReadPages, documenttypes.ParseDBFailType(repository.CleanfailtypeInvalidReadPages)) }) t.Run("zero page count", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentZeroPageCount, documentclean.ParseDBFailType(repository.CleanfailtypeZeroPageCount)) + assert.Equal(t, documenttypes.InvalidDocumentZeroPageCount, documenttypes.ParseDBFailType(repository.CleanfailtypeZeroPageCount)) }) t.Run("large page count", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentLargePageCount, documentclean.ParseDBFailType(repository.CleanfailtypeLargePageCount)) + assert.Equal(t, documenttypes.InvalidDocumentLargePageCount, documenttypes.ParseDBFailType(repository.CleanfailtypeLargePageCount)) }) t.Run("large file", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentLargeFile, documentclean.ParseDBFailType(repository.CleanfailtypeLargeFile)) + assert.Equal(t, documenttypes.InvalidDocumentLargeFile, documenttypes.ParseDBFailType(repository.CleanfailtypeLargeFile)) }) t.Run("small dimensions", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentSmallDimensions, documentclean.ParseDBFailType(repository.CleanfailtypeSmallDimensions)) + assert.Equal(t, documenttypes.InvalidDocumentSmallDimensions, documenttypes.ParseDBFailType(repository.CleanfailtypeSmallDimensions)) }) t.Run("large dimensions", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentLargeDimensions, documentclean.ParseDBFailType(repository.CleanfailtypeLargeDimensions)) + assert.Equal(t, documenttypes.InvalidDocumentLargeDimensions, documenttypes.ParseDBFailType(repository.CleanfailtypeLargeDimensions)) }) t.Run("small dpi", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentSmallDPI, documentclean.ParseDBFailType(repository.CleanfailtypeSmallDpi)) + assert.Equal(t, documenttypes.InvalidDocumentSmallDPI, documenttypes.ParseDBFailType(repository.CleanfailtypeSmallDpi)) }) t.Run("large dpi", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentLargeDPI, documentclean.ParseDBFailType(repository.CleanfailtypeLargeDpi)) + assert.Equal(t, documenttypes.InvalidDocumentLargeDPI, documenttypes.ParseDBFailType(repository.CleanfailtypeLargeDpi)) }) t.Run("unknown", func(t *testing.T) { - assert.Equal(t, documentclean.InvalidDocumentReason(""), documentclean.ParseDBFailType(repository.Cleanfailtype(""))) + assert.Equal(t, documenttypes.InvalidDocumentReason(""), documenttypes.ParseDBFailType(repository.Cleanfailtype(""))) }) } func TestToDBNullFailType(t *testing.T) { t.Run("invalid mimetype", func(t *testing.T) { - failtype := documentclean.ToDBNullFailType(documentclean.InvalidDocumentMimeType) + failtype := documenttypes.ToDBNullFailType(documenttypes.InvalidDocumentMimeType) assert.Equal(t, repository.CleanfailtypeInvalidMimetype, failtype.Cleanfailtype) assert.True(t, failtype.Valid) }) t.Run("unknown", func(t *testing.T) { - failtype := documentclean.ToDBNullFailType(documentclean.InvalidDocumentReason("")) + failtype := documenttypes.ToDBNullFailType(documenttypes.InvalidDocumentReason("")) assert.False(t, failtype.Valid) }) } diff --git a/internal/document/clean/pdf.go b/internal/document/types/pdf.go similarity index 87% rename from internal/document/clean/pdf.go rename to internal/document/types/pdf.go index cd970c0c..0ea66efb 100644 --- a/internal/document/clean/pdf.go +++ b/internal/document/types/pdf.go @@ -1,6 +1,7 @@ -package documentclean +package documenttypes import ( + "bytes" "context" "io" @@ -29,6 +30,15 @@ const ( PDF_DEFAULT_DPI = 72 ) +func NewPDFFromReadCloser(buf io.ReadCloser) (*PDF, error) { + seek, err := ReaderToSeeker(buf) + if err != nil { + return nil, err + } + + return NewPDF(seek), nil +} + func NewPDF(buf io.ReadSeeker) *PDF { config := &model.Configuration{ ValidationMode: model.ValidationRelaxed, @@ -47,7 +57,7 @@ func NewPDF(buf io.ReadSeeker) *PDF { } } -func (s *PDF) isCorrupt(ctx context.Context) *InvalidDocumentReason { +func (s *PDF) IsCorrupt(ctx context.Context) *InvalidDocumentReason { pdfCtx, err := pdfcpu.ReadWithContext(ctx, s.pdf, s.config) if err != nil { reason := InvalidDocumentRead @@ -149,3 +159,14 @@ func (s *PDF) isValidDPI(mediaBox *types.Rectangle, dims types.Dim) *InvalidDocu return nil } + +func ReaderToSeeker(readCloser io.ReadCloser) (io.ReadSeeker, error) { + data, err := io.ReadAll(readCloser) + if err != nil { + return nil, err + } + + readCloser.Close() + + return bytes.NewReader(data), nil +} diff --git a/internal/document/clean/pdf_test.go b/internal/document/types/pdf_test.go similarity index 92% rename from internal/document/clean/pdf_test.go rename to internal/document/types/pdf_test.go index b45c214d..0620a156 100644 --- a/internal/document/clean/pdf_test.go +++ b/internal/document/types/pdf_test.go @@ -1,4 +1,4 @@ -package documentclean +package documenttypes import ( "context" @@ -13,8 +13,8 @@ import ( ) func TestIsValidDPI(t *testing.T) { + ctx := context.Background() t.Run("no imgs", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -34,7 +34,6 @@ func TestIsValidDPI(t *testing.T) { assert.Nil(t, reason) }) t.Run("with img", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfWithImg)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -54,7 +53,6 @@ func TestIsValidDPI(t *testing.T) { assert.Nil(t, reason) }) t.Run("with tiny dpi", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfWithImg)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -74,7 +72,6 @@ func TestIsValidDPI(t *testing.T) { assert.Equal(t, InvalidDocumentSmallDPI, *reason) }) t.Run("with tiny width dpi", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfWithImg)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -94,7 +91,6 @@ func TestIsValidDPI(t *testing.T) { assert.Equal(t, InvalidDocumentSmallDPI, *reason) }) t.Run("with tiny height dpi", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfWithImg)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -114,7 +110,6 @@ func TestIsValidDPI(t *testing.T) { assert.Equal(t, InvalidDocumentSmallDPI, *reason) }) t.Run("with huge dpi", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfWithImg)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -136,8 +131,8 @@ func TestIsValidDPI(t *testing.T) { } func TestIsValidDimensions(t *testing.T) { + ctx := context.Background() t.Run("valid", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -147,7 +142,6 @@ func TestIsValidDimensions(t *testing.T) { assert.Nil(t, reason) }) t.Run("large dimensions", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -159,7 +153,6 @@ func TestIsValidDimensions(t *testing.T) { assert.Equal(t, InvalidDocumentLargeDimensions, *reason) }) t.Run("small dimensions", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -173,8 +166,8 @@ func TestIsValidDimensions(t *testing.T) { } func TestIsValidPageCount(t *testing.T) { + ctx := context.Background() t.Run("valid", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -184,7 +177,6 @@ func TestIsValidPageCount(t *testing.T) { assert.Nil(t, reason) }) t.Run("large page count", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfTwoPages)) pdfCtx, err := pdfcpu.ReadWithContext(ctx, pdf.pdf, pdf.config) @@ -198,105 +190,92 @@ func TestIsValidPageCount(t *testing.T) { } func TestIsCorrupt(t *testing.T) { + ctx := context.Background() t.Run("valid", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("no content", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader("%PDF-1.4 %%EOF")) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Equal(t, InvalidDocumentRead, *reason) }) t.Run("large file size", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) pdf.maxBytes = 1 - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Equal(t, InvalidDocumentLargeFile, *reason) }) t.Run("large dimensions", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfHelloWorld)) pdf.maxDimension = 1 - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Equal(t, InvalidDocumentLargeDimensions, *reason) }) t.Run("large page count", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(pdfTwoPages)) pdf.maxPages = 1 - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Equal(t, InvalidDocumentLargePageCount, *reason) }) t.Run("version 1.0", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_0)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 1.1", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_1)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 1.2", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_2)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 1.3", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_3)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 1.4", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_4)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 1.5", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_5)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 1.6", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_6)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 1.7", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF1_7)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) t.Run("version 2.0", func(t *testing.T) { - ctx := context.Background() pdf := NewPDF(strings.NewReader(PDF2_0)) - reason := pdf.isCorrupt(ctx) + reason := pdf.IsCorrupt(ctx) assert.Nil(t, reason) }) } @@ -1055,3 +1034,65 @@ trailer startxref 887 %%EOF` + +const pdfHelloWorld = `%PDF-1.4 +%���� +1 0 obj +<< + /Type /Catalog + /Pages 2 0 R + /Version /1.4 +>> +endobj +2 0 obj +<< + /Type /Pages + /Kids [3 0 R] + /Count 1 +>> +endobj +3 0 obj +<< + /Type /Page + /Parent 2 0 R + /MediaBox [0 0 612 792] + /Resources << + /Font << + /F1 << + /Type /Font + /Subtype /Type1 + /BaseFont /Helvetica + >> + >> + >> + /Contents 4 0 R +>> +endobj +4 0 obj +<< + /Length + 44 +>> +stream +BT +/F1 24 Tf +100 700 Td +(Hello World!) Tj +ET +endstream +endobj +xref +0 5 +0000000000 65535 f +0000000015 00000 n +0000000086 00000 n +0000000151 00000 n +0000000376 00000 n +trailer +<< + /Size 5 + /Root 1 0 R +>> +startxref +472 +%%EOF` diff --git a/internal/query/result/processor/parse_test.go b/internal/query/result/processor/parse_test.go index 6eab29b6..87ac059c 100644 --- a/internal/query/result/processor/parse_test.go +++ b/internal/query/result/processor/parse_test.go @@ -13,7 +13,7 @@ import ( func TestParseDBCollectorQuery(t *testing.T) { dbResult := repository.Collectorquerydependencytree{ - Clientid: uuid.UUID{}, + Clientid: "hello", Queryid: &uuid.UUID{}, Requiredids: []uuid.UUID{}, Type: repository.QuerytypeJsonExtractor, diff --git a/internal/query/result/set/set_test.go b/internal/query/result/set/set_test.go index 873a4a4d..4eed7267 100644 --- a/internal/query/result/set/set_test.go +++ b/internal/query/result/set/set_test.go @@ -67,8 +67,8 @@ func TestSet(t *testing.T) { textEntryId := uuid.New() pool.ExpectQuery("name: GetTextEntryByDocId :one").WithArgs(params.DocumentID). WillReturnRows( - pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "version", "hash", "cleanEntryId"}). - AddRow(textEntryId, params.DocumentID, "buket", "/i/am/here", int32(1), "example", uuid.New()), + pgxmock.NewRows([]string{"id", "documentId", "bucket", "key", "hash", "cleanId", "triggerId", "textractJobId", "triggerVersion", "extractionVersion"}). + AddRow(textEntryId, params.DocumentID, "buket", "/i/am/here", "example", uuid.New(), uuid.New(), "jobId", int64(123), int64(543)), ) pool.ExpectQuery("name: GetQuery :one").WithArgs(query.ID).WillReturnRows( pgxmock.NewRows([]string{"id", "type", "activeVersion", "latestVersion", "config", "requiredIds"}). diff --git a/internal/query/sync/sync.go b/internal/query/sync/sync.go index 3b96242f..59929917 100644 --- a/internal/query/sync/sync.go +++ b/internal/query/sync/sync.go @@ -7,21 +7,21 @@ import ( "github.com/google/uuid" ) -func (s *Service) Sync(ctx context.Context, id uuid.UUID) error { - isextracted, err := s.cfg.GetDBQueries().IsDocumentTextExtracted(ctx, id) +func (s *Service) Sync(ctx context.Context, documentId uuid.UUID) error { + isextracted, err := s.cfg.GetDBQueries().IsDocumentTextExtracted(ctx, documentId) if err != nil { return err } else if !isextracted { - slog.Error("document has no extracted text", "id", id) + slog.Error("document has no extracted text", "id", documentId) return nil } - unsyncedQueries, err := s.cfg.GetDBQueries().ListUnsyncedNoDepsQueriesByDocId(ctx, &id) + unsyncedQueries, err := s.cfg.GetDBQueries().ListUnsyncedNoDepsQueriesByDocId(ctx, &documentId) if err != nil { return err } - slog.Debug("unsynced queries", "document_id", id.String(), "queries", unsyncedQueries) + slog.Debug("unsynced queries", "document_id", documentId.String(), "queries", unsyncedQueries) - return s.svc.ResultSync.TriggerMultiSync(ctx, id, unsyncedQueries) + return s.svc.ResultSync.TriggerMultiSync(ctx, documentId, unsyncedQueries) } diff --git a/internal/query/update/update.go b/internal/query/update/update.go index 1a0c47e9..90f949cb 100644 --- a/internal/query/update/update.go +++ b/internal/query/update/update.go @@ -50,7 +50,7 @@ func (s *Service) informUpdate(ctx context.Context, entity *resultprocessor.Upda return s.cfg.SendToQueue(ctx, &queue.SendParams{ QueueURL: s.cfg.GetQueryVersionSyncURL(), Body: queryversionsyncrunner.Body{ - ID: entity.ID, + QueryID: entity.ID, }, }) } diff --git a/internal/query/versionsync/sync.go b/internal/query/versionsync/sync.go index 0149c9d7..c072ed21 100644 --- a/internal/query/versionsync/sync.go +++ b/internal/query/versionsync/sync.go @@ -11,8 +11,8 @@ import ( "github.com/google/uuid" ) -func (s *Service) Sync(ctx context.Context, id uuid.UUID) error { - clientIds, err := s.cfg.GetDBQueries().ListQueryClientIDs(ctx, &id) +func (s *Service) Sync(ctx context.Context, queryId uuid.UUID) error { + clientIds, err := s.cfg.GetDBQueries().ListQueryClientIDs(ctx, &queryId) if err != nil && errors.Is(err, sql.ErrNoRows) { return nil } else if err != nil { @@ -23,7 +23,7 @@ func (s *Service) Sync(ctx context.Context, id uuid.UUID) error { err := s.cfg.SendToQueue(ctx, &queue.SendParams{ QueueURL: s.cfg.GetClientSyncURL(), Body: clientsyncrunner.Body{ - ID: id, + ClientID: id, }, }) if err != nil { diff --git a/internal/query/versionsync/sync_test.go b/internal/query/versionsync/sync_test.go index 19b1934c..407812af 100644 --- a/internal/query/versionsync/sync_test.go +++ b/internal/query/versionsync/sync_test.go @@ -38,9 +38,9 @@ func TestSync(t *testing.T) { svc := Service{cfg} queryId := uuid.New() - clientIds := []uuid.UUID{ - uuid.New(), - uuid.New(), + clientIds := []string{ + "hello", + "aarete", } pool.ExpectQuery("name: ListQueryClientIDs :many").WithArgs(&queryId). @@ -54,7 +54,7 @@ func TestSync(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[0].String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[0]) }), mock.Anything, ). @@ -63,7 +63,7 @@ func TestSync(t *testing.T) { SendMessage( mock.Anything, mock.MatchedBy(func(in *sqs.SendMessageInput) bool { - return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[1].String()) + return *in.QueueUrl == cfg.ClientSyncURL && *in.MessageBody == fmt.Sprintf("{\"id\":\"%s\"}", clientIds[1]) }), mock.Anything, ). diff --git a/internal/server/api/listener_test.go b/internal/server/api/listener_test.go index f604af7e..d5e99e1a 100644 --- a/internal/server/api/listener_test.go +++ b/internal/server/api/listener_test.go @@ -26,9 +26,7 @@ func TestNew(t *testing.T) { cfg := &BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, - }) + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{}) defer cleanup() registerHandlers := func() (*openapi3.T, error) { diff --git a/internal/server/runner/listener.go b/internal/server/runner/listener.go index 430a9996..f2cd6af8 100644 --- a/internal/server/runner/listener.go +++ b/internal/server/runner/listener.go @@ -4,35 +4,33 @@ import ( "context" "errors" - "github.com/aws/aws-sdk-go-v2/service/sqs/types" - "queryorchestration/internal/server" "queryorchestration/internal/serviceconfig/aws" "queryorchestration/internal/serviceconfig/observability" ) -type Controller interface { - Process(ctx context.Context, message *types.Message) bool +type Controller[B any] interface { + Process(ctx context.Context, body B) bool } -type ListenerConfig interface { +type ConfigProvider[B any] interface { server.Config aws.ConfigProvider observability.ConfigProvider RegisterController() error - GetController() Controller + GetController() Controller[B] GetQueueURL() string PingQueue(context.Context) error } -type BaseConfig struct { +type BaseConfig[B any] struct { server.BaseConfig - ControllerFunc func() Controller - Controller Controller + ControllerFunc func() Controller[B] + Controller Controller[B] QueueURL string `env:"QUEUE_URL,required,notEmpty"` } -func (c *BaseConfig) RegisterController() error { +func (c *BaseConfig[B]) RegisterController() error { if c.ControllerFunc == nil { return errors.New("controllerFunc required") } @@ -42,19 +40,19 @@ func (c *BaseConfig) RegisterController() error { return nil } -func (c *BaseConfig) GetQueueURL() string { +func (c *BaseConfig[B]) GetQueueURL() string { return c.QueueURL } -func (c *BaseConfig) GetController() Controller { +func (c *BaseConfig[B]) GetController() Controller[B] { return c.Controller } -func (c *BaseConfig) PingQueue(ctx context.Context) error { +func (c *BaseConfig[B]) PingQueue(ctx context.Context) error { return c.PingQueueByURL(ctx, c.QueueURL) } -func New(ctx context.Context, cfg ListenerConfig) (*Server, error) { +func New[B any](ctx context.Context, cfg ConfigProvider[B]) (*Server[B], error) { cleanup, err := server.New(ctx, cfg) if err != nil { return nil, err @@ -74,7 +72,7 @@ func New(ctx context.Context, cfg ListenerConfig) (*Server, error) { return nil, err } - return &Server{ + return &Server[B]{ cfg: cfg, cleanup: cleanup, }, nil diff --git a/internal/server/runner/listener_test.go b/internal/server/runner/listener_test.go index 7e0ff14e..464f250c 100644 --- a/internal/server/runner/listener_test.go +++ b/internal/server/runner/listener_test.go @@ -5,6 +5,7 @@ import ( "testing" "time" + "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/test" queuemock "queryorchestration/mocks/queue" runnermock "queryorchestration/mocks/runner" @@ -15,30 +16,31 @@ import ( "github.com/stretchr/testify/require" ) +type TestConfig struct { + BaseConfig[interface{}] + objectstore.ObjectStoreConfig +} + func TestNew(t *testing.T) { if testing.Short() { t.Skip("Skipping long test in short mode") } ctx := context.Background() - cfg := &BaseConfig{} + cfg := &TestConfig{} test.SetCfgProvider(t, cfg) - _, acleanup := test.CreateAWSContainer(t, ctx, &test.CreateAWSConfig{ - Cfg: cfg, - }) + _, acleanup := test.CreateAWSContainer(t, ctx, cfg, &test.CreateAWSConfig{}) defer acleanup() err := cfg.SetQueueClient(ctx) require.NoError(t, err) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, - }) + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{}) defer cleanup() ctx, cancel := context.WithTimeout(ctx, 10*time.Second) defer cancel() - cfg.ControllerFunc = func() Controller { - return runnermock.NewMockController(t) + cfg.ControllerFunc = func() Controller[interface{}] { + return runnermock.NewMockController[interface{}](t) } cfg.QueueURL = test.CreateQueue(t, ctx, cfg, "queueName") @@ -51,28 +53,28 @@ func TestNew(t *testing.T) { func TestListen(t *testing.T) { ctx := context.Background() - queue := Server{} + queue := Server[interface{}]{} assert.Panics(t, func() { queue.Listen(ctx) }) } func TestRegisterController(t *testing.T) { - c := BaseConfig{} + c := BaseConfig[interface{}]{} err := c.RegisterController() assert.Error(t, err) assert.Nil(t, c.Controller) - c.ControllerFunc = func() Controller { - return runnermock.NewMockController(t) + c.ControllerFunc = func() Controller[interface{}] { + return runnermock.NewMockController[interface{}](t) } err = c.RegisterController() require.NoError(t, err) - assert.Equal(t, runnermock.NewMockController(t), c.Controller) + assert.Equal(t, runnermock.NewMockController[interface{}](t), c.Controller) } func TestPingQueue(t *testing.T) { ctx := context.Background() - c := BaseConfig{} + c := BaseConfig[interface{}]{} c.QueueURL = "i/am/here" mockSQS := queuemock.NewMockSQSClient(t) c.QueueClient = mockSQS @@ -92,7 +94,7 @@ func TestPingQueue(t *testing.T) { } func TestGetQueueURL(t *testing.T) { - c := BaseConfig{} + c := BaseConfig[interface{}]{} assert.Empty(t, c.GetQueueURL()) c.QueueURL = "exampleurl" @@ -100,9 +102,9 @@ func TestGetQueueURL(t *testing.T) { } func TestGetController(t *testing.T) { - c := BaseConfig{} + c := BaseConfig[interface{}]{} assert.Empty(t, c.GetController()) - c.Controller = runnermock.NewMockController(t) - assert.Equal(t, runnermock.NewMockController(t), c.GetController()) + c.Controller = runnermock.NewMockController[interface{}](t) + assert.Equal(t, runnermock.NewMockController[interface{}](t), c.GetController()) } diff --git a/internal/server/runner/poll.go b/internal/server/runner/poll.go index 5983139d..9edebc4b 100644 --- a/internal/server/runner/poll.go +++ b/internal/server/runner/poll.go @@ -2,6 +2,7 @@ package runner import ( "context" + "encoding/json" "errors" "fmt" "log/slog" @@ -11,12 +12,12 @@ import ( "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) -type Server struct { +type Server[B any] struct { cleanup func() error - cfg ListenerConfig + cfg ConfigProvider[B] } -func (c *Server) Listen(ctx context.Context) { +func (c *Server[B]) Listen(ctx context.Context) { slog.Info("Listening to queue") defer func() { if err := c.cleanup(); err != nil { @@ -38,7 +39,7 @@ func (c *Server) Listen(ctx context.Context) { } -func (c *Server) pollMessage(ctx context.Context) error { +func (c *Server[B]) pollMessage(ctx context.Context) error { result, err := c.cfg.ReceiveFromQueue(ctx, &queue.ReceiveParams{ QueueURL: c.cfg.GetQueueURL(), }) @@ -56,10 +57,15 @@ func (c *Server) pollMessage(ctx context.Context) error { return nil } -func (c *Server) processMessage(ctx context.Context, message *types.Message) error { +func (c *Server[B]) processMessage(ctx context.Context, message *types.Message) error { + body := c.processBody(message) + if body == nil { + return nil + } + slog.Debug("processing message", "id", *message.MessageId, "body", *message.Body) - isProcessed := c.cfg.GetController().Process(ctx, message) + isProcessed := c.cfg.GetController().Process(ctx, *body) if !isProcessed { return errors.New("message process fail") } @@ -74,3 +80,31 @@ func (c *Server) processMessage(ctx context.Context, message *types.Message) err return nil } + +func (c *Server[B]) processBody(message *types.Message) *B { + if message == nil { + slog.Error("nil message") + return nil + } else if message.MessageId == nil { + slog.Error("nil message id") + return nil + } else if message.Body == nil { + slog.Error("nil body", "messageId", *message.MessageId) + return nil + } + + var body B + err := json.Unmarshal([]byte(*message.Body), &body) + if err != nil { + slog.Error("parsing body", "messageId", *message.MessageId, "body", *message.Body) + return nil + } + + err = c.cfg.GetValidator().Struct(body) + if err != nil { + slog.Error("invalid body", "messageId", *message.MessageId, "error", err) + return nil + } + + return &body +} diff --git a/internal/server/runner/poll_test.go b/internal/server/runner/poll_test.go index 932bb491..2b80dbec 100644 --- a/internal/server/runner/poll_test.go +++ b/internal/server/runner/poll_test.go @@ -10,19 +10,24 @@ import ( "github.com/aws/aws-sdk-go-v2/service/sqs" "github.com/aws/aws-sdk-go-v2/service/sqs/types" + "github.com/go-playground/validator/v10" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) +type MockStruct struct{} + func TestPollMessages(t *testing.T) { ctx := context.Background() - cfg := &BaseConfig{} + cfg := &BaseConfig[MockStruct]{} mockSQS := queuemock.NewMockSQSClient(t) cfg.QueueClient = mockSQS - mockController := runnermock.NewMockController(t) + mockController := runnermock.NewMockController[MockStruct](t) cfg.Controller = mockController cfg.QueueURL = "/i/am/here" + cfg.Validator = validator.New() res := sqs.ReceiveMessageOutput{Messages: []types.Message{}} @@ -39,7 +44,7 @@ func TestPollMessages(t *testing.T) { ctx, cancel := context.WithTimeout(ctx, time.Second) defer cancel() - scfg := &Server{ + scfg := &Server[MockStruct]{ cfg: cfg, cleanup: func() error { return nil }, } @@ -49,20 +54,21 @@ func TestPollMessages(t *testing.T) { func TestPollMessage(t *testing.T) { ctx := context.Background() - cfg := &BaseConfig{} + cfg := &BaseConfig[MockStruct]{} mockSQS := queuemock.NewMockSQSClient(t) cfg.QueueClient = mockSQS - mockController := runnermock.NewMockController(t) + mockController := runnermock.NewMockController[MockStruct](t) cfg.Controller = mockController cfg.QueueURL = "/i/am/here" + cfg.Validator = validator.New() - ser := &Server{ + ser := &Server[MockStruct]{ cfg: cfg, cleanup: func() error { return nil }, } id := "example_id" - body := "example_body" + body := "{}" receipt := "receipts" mockSQS.EXPECT(). @@ -86,8 +92,8 @@ func TestPollMessage(t *testing.T) { mockController.EXPECT(). Process( mock.Anything, - mock.MatchedBy(func(in *types.Message) bool { - return *in.MessageId == id && *in.Body == body + mock.MatchedBy(func(in MockStruct) bool { + return true }), ). Return(true) @@ -109,20 +115,21 @@ func TestPollMessage(t *testing.T) { func TestProcessMessage(t *testing.T) { ctx := context.Background() - cfg := &BaseConfig{} + cfg := &BaseConfig[MockStruct]{} mockSQS := queuemock.NewMockSQSClient(t) cfg.QueueClient = mockSQS - mockController := runnermock.NewMockController(t) + mockController := runnermock.NewMockController[MockStruct](t) cfg.Controller = mockController cfg.QueueURL = "/i/am/here" + cfg.Validator = validator.New() - ser := &Server{ + ser := &Server[MockStruct]{ cfg: cfg, cleanup: func() error { return nil }, } id := "example_id" - body := "example_body" + body := "{}" receipt := "receipts" msg := &types.Message{ MessageId: &id, @@ -133,8 +140,8 @@ func TestProcessMessage(t *testing.T) { mockController.EXPECT(). Process( mock.Anything, - mock.MatchedBy(func(in *types.Message) bool { - return *in.MessageId == id && *in.Body == body + mock.MatchedBy(func(in MockStruct) bool { + return true }), ). Return(true) @@ -152,3 +159,60 @@ func TestProcessMessage(t *testing.T) { err := ser.processMessage(ctx, msg) require.NoError(t, err) } + +func TestProcessBody(t *testing.T) { + type MockStruct struct { + Example string `json:"example" validate:"required"` + } + cfg := &BaseConfig[MockStruct]{} + cfg.Validator = validator.New() + + ser := &Server[MockStruct]{ + cfg: cfg, + cleanup: func() error { return nil }, + } + + t.Run("valid body", func(t *testing.T) { + id := "example_id" + body := `{"example":"hi"}` + msg := &types.Message{ + MessageId: &id, + Body: &body, + } + + assert.NotNil(t, ser.processBody(msg)) + }) + t.Run("no msg", func(t *testing.T) { + assert.Nil(t, ser.processBody(nil)) + }) + t.Run("no msg id", func(t *testing.T) { + assert.Nil(t, ser.processBody(&types.Message{})) + }) + t.Run("no body", func(t *testing.T) { + id := "id" + + assert.Nil(t, ser.processBody(&types.Message{ + MessageId: &id, + })) + }) + t.Run("empty body", func(t *testing.T) { + id := "example_id" + body := "" + msg := &types.Message{ + MessageId: &id, + Body: &body, + } + + assert.Nil(t, ser.processBody(msg)) + }) + t.Run("invalid body", func(t *testing.T) { + id := "example_id" + body := "{}" + msg := &types.Message{ + MessageId: &id, + Body: &body, + } + + assert.Nil(t, ser.processBody(msg)) + }) +} diff --git a/internal/server/server_test.go b/internal/server/server_test.go index d72e2081..cee6f69f 100644 --- a/internal/server/server_test.go +++ b/internal/server/server_test.go @@ -22,9 +22,7 @@ func TestNew(t *testing.T) { cfg := &server.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, - }) + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{}) defer cleanup() clean, err := server.New(ctx, cfg) diff --git a/internal/serviceconfig/aws/config.go b/internal/serviceconfig/aws/config.go index 2627a64f..bccbb530 100644 --- a/internal/serviceconfig/aws/config.go +++ b/internal/serviceconfig/aws/config.go @@ -1,18 +1,34 @@ package aws +import ( + "context" + "fmt" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/config" +) + +type Profile string + type AWSConfig struct { - AWSKeyID string `env:"AWS_ACCESS_KEY_ID,required,notEmpty"` - AWSSecretKey string `env:"AWS_SECRET_ACCESS_KEY,required,notEmpty"` - AWSRegion string `env:"AWS_REGION,required,notEmpty"` - AWSDefaultRegion string `env:"AWS_DEFAULT_REGION"` - AWSSessionToken string `env:"AWS_SESSION_TOKEN"` - AWSEndpointUrl string `env:"AWS_ENDPOINT_URL"` + AWSKeyID string `env:"AWS_ACCESS_KEY_ID,required,notEmpty"` + AWSSecretKey string `env:"AWS_SECRET_ACCESS_KEY,required,notEmpty"` + AWSRegion string `env:"AWS_REGION,required,notEmpty"` + AWSDefaultRegion string `env:"AWS_DEFAULT_REGION"` + AWSSessionToken string `env:"AWS_SESSION_TOKEN"` + AWSEndpointUrl string `env:"AWS_ENDPOINT_URL"` + AWSProfile Profile `env:"AWS_PROFILE"` } type ConfigProvider interface { GetAWSKeyID() string + SetAWSKeyID(string) GetAWSSecretKey() string + SetAWSSecretKey(string) GetAWSRegion() string + SetAWSRegion(string) + GetAWSProfile() Profile + SetAWSProfile(Profile) GetAWSSessionToken() string GetAWSEndpoint() string SetAWSEndpoint(string) @@ -30,14 +46,60 @@ func (c *AWSConfig) GetAWSKeyID() string { return c.AWSKeyID } +func (c *AWSConfig) SetAWSKeyID(val string) { + c.AWSKeyID = val +} + func (c *AWSConfig) GetAWSSecretKey() string { return c.AWSSecretKey } +func (c *AWSConfig) SetAWSSecretKey(val string) { + c.AWSSecretKey = val +} + func (c *AWSConfig) GetAWSSessionToken() string { return c.AWSSessionToken } +func (c *AWSConfig) SetAWSSessionToken(val string) { + c.AWSSessionToken = val +} + func (c *AWSConfig) GetAWSRegion() string { return c.AWSRegion } + +func (c *AWSConfig) SetAWSRegion(val string) { + c.AWSRegion = val +} + +func (c *AWSConfig) GetAWSProfile() Profile { + return c.AWSProfile +} + +func (c *AWSConfig) SetAWSProfile(val Profile) { + c.AWSProfile = val +} + +func GetAWSConfigWithOpts(ctx context.Context, opts ...func(*config.LoadOptions) error) (aws.Config, error) { + cfg, err := config.LoadDefaultConfig(ctx, opts...) + if err != nil { + return aws.Config{}, fmt.Errorf("unable to load SDK config: %v", err) + } + + return cfg, nil +} + +func GetAWSConfigWithProfile(ctx context.Context, profile Profile) (aws.Config, error) { + optFns := []func(*config.LoadOptions) error{} + if profile != "" { + optFns = append(optFns, config.WithSharedConfigProfile(string(profile))) + } + + return GetAWSConfigWithOpts(ctx, optFns...) +} + +func GetAWSConfig(ctx context.Context) (aws.Config, error) { + return GetAWSConfigWithOpts(ctx) +} diff --git a/internal/serviceconfig/aws/config_test.go b/internal/serviceconfig/aws/config_test.go index 8849e018..b084dc46 100644 --- a/internal/serviceconfig/aws/config_test.go +++ b/internal/serviceconfig/aws/config_test.go @@ -20,6 +20,15 @@ func TestGetAWSKeyID(t *testing.T) { assert.Equal(t, cfg.AWSKeyID, name) } +func TestSetAWSKeyID(t *testing.T) { + cfg := aws.AWSConfig{} + + assert.Equal(t, "", cfg.AWSKeyID) + newVal := "val" + cfg.SetAWSKeyID(newVal) + assert.Equal(t, "val", cfg.AWSKeyID) +} + func TestGetAWSSecretKey(t *testing.T) { cfg := aws.AWSConfig{} @@ -32,6 +41,15 @@ func TestGetAWSSecretKey(t *testing.T) { assert.Equal(t, cfg.AWSSecretKey, name) } +func TestSetAWSSecretKey(t *testing.T) { + cfg := aws.AWSConfig{} + + assert.Equal(t, "", cfg.AWSSecretKey) + newVal := "val" + cfg.SetAWSSecretKey(newVal) + assert.Equal(t, "val", cfg.AWSSecretKey) +} + func TestGetAWSRegion(t *testing.T) { cfg := aws.AWSConfig{} @@ -44,6 +62,15 @@ func TestGetAWSRegion(t *testing.T) { assert.Equal(t, cfg.AWSRegion, name) } +func TestSetAWSRegion(t *testing.T) { + cfg := aws.AWSConfig{} + + assert.Equal(t, "", cfg.AWSRegion) + newVal := "val" + cfg.SetAWSRegion(newVal) + assert.Equal(t, "val", cfg.AWSRegion) +} + func TestGetAWSSessionToken(t *testing.T) { cfg := aws.AWSConfig{} @@ -56,6 +83,15 @@ func TestGetAWSSessionToken(t *testing.T) { assert.Equal(t, cfg.AWSSessionToken, name) } +func TestSetAWSSessionToken(t *testing.T) { + cfg := aws.AWSConfig{} + + assert.Equal(t, "", cfg.AWSSessionToken) + newVal := "val" + cfg.SetAWSSessionToken(newVal) + assert.Equal(t, "val", cfg.AWSSessionToken) +} + func TestGetAWSEndpoint(t *testing.T) { cfg := aws.AWSConfig{} diff --git a/internal/serviceconfig/build/build_test.go b/internal/serviceconfig/build/build_test.go index 399293d0..08436609 100644 --- a/internal/serviceconfig/build/build_test.go +++ b/internal/serviceconfig/build/build_test.go @@ -53,7 +53,7 @@ func TestGetVersionTimestamp(t *testing.T) { func TestGetStartTime(t *testing.T) { t.Run("vcs time", func(t *testing.T) { var tt time.Time - expectedTime := time.Now() + expectedTime := time.Now().UTC() f := getStartTime(&tt, func() (info *debug.BuildInfo, ok bool) { return &debug.BuildInfo{ Settings: []debug.BuildSetting{ @@ -66,7 +66,7 @@ func TestGetStartTime(t *testing.T) { }) assert.NotNil(t, f) f() - assert.Equal(t, expectedTime.UTC().Truncate(time.Second), tt) + assert.Equal(t, expectedTime.Truncate(time.Second), tt) }) t.Run("vcs time - invalid format", func(t *testing.T) { var tt time.Time diff --git a/internal/serviceconfig/common.go b/internal/serviceconfig/common.go index a4702086..16d7d100 100644 --- a/internal/serviceconfig/common.go +++ b/internal/serviceconfig/common.go @@ -46,8 +46,6 @@ type ConfigProvider interface { logger.ConfigProvider aws.ConfigProvider queue.ConfigProvider - SetDBConfig(*database.DBConfig) - SetAWSConfig(*aws.AWSConfig) } // Configuration Methods @@ -156,14 +154,6 @@ func initializeConfigPrivate(cfg ConfigProvider) error { return initErr } -func (b *BaseConfig) SetDBConfig(cfg *database.DBConfig) { - b.DBConfig = *cfg -} - -func (b *BaseConfig) SetAWSConfig(cfg *aws.AWSConfig) { - b.AWSConfig = *cfg -} - func (b *BaseConfig) PrintConfig(prefixSecret string) { b.printConfigRecursive(reflect.ValueOf(b), "", prefixSecret, make(map[uintptr]bool)) } diff --git a/internal/serviceconfig/common_test.go b/internal/serviceconfig/common_test.go index 1527d0ae..be3f7c8d 100644 --- a/internal/serviceconfig/common_test.go +++ b/internal/serviceconfig/common_test.go @@ -5,9 +5,6 @@ import ( "strings" "testing" - "queryorchestration/internal/serviceconfig/aws" - "queryorchestration/internal/serviceconfig/database" - "github.com/stretchr/testify/assert" ) @@ -148,21 +145,3 @@ func TestGetBaseConfig(t *testing.T) { assert.NotNil(t, getBaseConfig(&initializeConfigTestStruct{})) os.Clearenv() } - -func TestSetDBConfig(t *testing.T) { - cfg := &BaseConfig{} - dbcfg := database.DBConfig{ - DBUser: "user", - } - cfg.SetDBConfig(&dbcfg) - assert.Equal(t, dbcfg, cfg.DBConfig) -} - -func TestSetAWSConfig(t *testing.T) { - cfg := &BaseConfig{} - acfg := aws.AWSConfig{ - AWSRegion: "user", - } - cfg.SetAWSConfig(&acfg) - assert.Equal(t, acfg, cfg.AWSConfig) -} diff --git a/internal/serviceconfig/database/config.go b/internal/serviceconfig/database/config.go index 563f1338..8849954f 100644 --- a/internal/serviceconfig/database/config.go +++ b/internal/serviceconfig/database/config.go @@ -28,11 +28,17 @@ type ConfigProvider interface { GetDBOpts() map[string]string GetDBOptsString() string GetDBHost() string + SetDBHost(string) GetDBPort() int + SetDBPort(int) GetDBUser() string + SetDBUser(string) GetDBSecret() string + SetDBSecret(string) IsDBNoSSL() bool + SetDBNoSSL(bool) GetDBName() string + SetDBName(string) GetDBDriver() string SetDBPoolConfig() error SetDBPool(ctx context.Context) error @@ -84,22 +90,46 @@ func (b *DBConfig) GetDBHost() string { return b.DBHost } +func (b *DBConfig) SetDBHost(val string) { + b.DBHost = val +} + func (b *DBConfig) GetDBPort() int { return b.DBPort } +func (b *DBConfig) SetDBPort(val int) { + b.DBPort = val +} + func (b *DBConfig) GetDBUser() string { return b.DBUser } +func (b *DBConfig) SetDBUser(val string) { + b.DBUser = val +} + func (b *DBConfig) GetDBSecret() string { return b.DBSecret } +func (b *DBConfig) SetDBSecret(val string) { + b.DBSecret = val +} + func (b *DBConfig) IsDBNoSSL() bool { return b.DBNoSSL } +func (b *DBConfig) SetDBNoSSL(val bool) { + b.DBNoSSL = val +} + func (b *DBConfig) GetDBName() string { return b.DBName } + +func (b *DBConfig) SetDBName(val string) { + b.DBName = val +} diff --git a/internal/serviceconfig/database/pool_test.go b/internal/serviceconfig/database/pool_test.go index 6c073d1d..369e5d86 100644 --- a/internal/serviceconfig/database/pool_test.go +++ b/internal/serviceconfig/database/pool_test.go @@ -22,8 +22,7 @@ func TestSetDBPool(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + _, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() diff --git a/internal/serviceconfig/database/transaction_test.go b/internal/serviceconfig/database/transaction_test.go index eae26936..2f683072 100644 --- a/internal/serviceconfig/database/transaction_test.go +++ b/internal/serviceconfig/database/transaction_test.go @@ -7,9 +7,7 @@ import ( "queryorchestration/internal/database/repository" "queryorchestration/internal/serviceconfig" - "github.com/google/uuid" "github.com/pashagolub/pgxmock/v3" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -22,25 +20,20 @@ func TestExecuteTransaction(t *testing.T) { cfg.DBPool = pool cfg.DBQueries = repository.New(pool) - clientID := uuid.New() + clientID := "ID" clientName := "example_client" - externalId := "example_id" pool.ExpectBegin() - pool.ExpectQuery("name: CreateClient :one").WithArgs(externalId, clientName). - WillReturnRows( - pgxmock.NewRows([]string{"id"}). - AddRow(clientID), - ) + pool.ExpectExec("name: CreateClient :exec").WithArgs(clientID, clientName). + WillReturnResult(pgxmock.NewResult("", 1)) pool.ExpectCommit() err = cfg.ExecuteDBTransaction(ctx, func(ctx context.Context, q *repository.Queries) error { - id, err := q.CreateClient(ctx, &repository.CreateClientParams{ - Name: clientName, - Externalid: externalId, + err := q.CreateClient(ctx, &repository.CreateClientParams{ + Name: clientName, + ID: clientID, }) require.NoError(t, err) - assert.Equal(t, clientID, id) return nil }) diff --git a/internal/serviceconfig/objectstore/config.go b/internal/serviceconfig/objectstore/config.go index ed274e38..6bb2c633 100644 --- a/internal/serviceconfig/objectstore/config.go +++ b/internal/serviceconfig/objectstore/config.go @@ -2,13 +2,15 @@ package objectstore import ( "context" + "crypto/md5" + "encoding/hex" "fmt" + "io" "log/slog" "time" awsc "queryorchestration/internal/serviceconfig/aws" - "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/s3" ) @@ -16,6 +18,7 @@ type ObjectStoreConfig struct { AWSEndpointUrlS3 string `env:"AWS_ENDPOINT_URL_S3"` AWSS3UsePathStyle bool `env:"AWS_S3_USE_PATH_STYLE" envDefault:"false"` StoreClient S3Client + ChunkSize int } type ConfigProvider interface { @@ -27,6 +30,7 @@ type ConfigProvider interface { SetS3Endpoint(string) GetS3Endpoint() string SetS3UsePathStyle(bool) + CalculateETag(context.Context, io.Reader) (string, error) } func (c *ObjectStoreConfig) SetStoreClientAndPingByName(ctx context.Context, name string) error { @@ -39,9 +43,9 @@ func (c *ObjectStoreConfig) SetStoreClientAndPingByName(ctx context.Context, nam } func (c *ObjectStoreConfig) SetStoreClient(ctx context.Context) error { - cfg, err := config.LoadDefaultConfig(ctx) + cfg, err := awsc.GetAWSConfig(ctx) if err != nil { - return fmt.Errorf("unable to load SDK config: %v", err) + return err } c.StoreClient = s3.NewFromConfig(cfg, func(o *s3.Options) { @@ -92,3 +96,47 @@ func (c *ObjectStoreConfig) SetS3Endpoint(e string) { func (c *ObjectStoreConfig) SetS3UsePathStyle(e bool) { c.AWSS3UsePathStyle = e } + +func (c *ObjectStoreConfig) CalculateETag(ctx context.Context, doc io.Reader) (string, error) { + c.ChunkSize = 5 * 1024 * 1024 + buffer := make([]byte, c.ChunkSize) + var partHashes [][]byte + var totalBytes int + + for { + bytesRead, err := doc.Read(buffer) + if bytesRead == 0 { + if err != nil && err != io.EOF { + return "", fmt.Errorf("error reading chunk: %w", err) + } + break + } + + hash := md5.Sum(buffer[:bytesRead]) + partHashes = append(partHashes, hash[:]) + totalBytes += bytesRead + if err == io.EOF { + break + } + + if err != nil { + return "", fmt.Errorf("error reading chunk: %w", err) + } + } + + if totalBytes == 0 { + emptyHash := md5.Sum([]byte{}) + return fmt.Sprintf(`"%s"`, hex.EncodeToString(emptyHash[:])), nil + } + + if len(partHashes) == 1 && totalBytes <= c.ChunkSize { + return fmt.Sprintf(`"%s"`, hex.EncodeToString(partHashes[0])), nil + } + + finalHash := md5.New() + for _, hash := range partHashes { + finalHash.Write(hash) + } + + return fmt.Sprintf(`"%s-%d"`, hex.EncodeToString(finalHash.Sum(nil)), len(partHashes)), nil +} diff --git a/internal/serviceconfig/objectstore/config_test.go b/internal/serviceconfig/objectstore/config_test.go index d1cbaec5..5385da39 100644 --- a/internal/serviceconfig/objectstore/config_test.go +++ b/internal/serviceconfig/objectstore/config_test.go @@ -4,13 +4,18 @@ import ( "context" "errors" "os" + "strings" "testing" "time" "queryorchestration/internal/serviceconfig" objectstore "queryorchestration/internal/serviceconfig/objectstore" + "queryorchestration/internal/test" objectstoremock "queryorchestration/mocks/objectstore" + awsc "queryorchestration/internal/serviceconfig/aws" + + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/s3" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -65,6 +70,7 @@ func TestGetS3Client(t *testing.T) { type StoreConfig struct { serviceconfig.BaseConfig objectstore.ObjectStoreConfig + awsc.AWSConfig } func TestSetStoreClientAndPingByName(t *testing.T) { @@ -79,3 +85,33 @@ func TestSetStoreClientAndPingByName(t *testing.T) { t.Errorf("Expected timeout error, got: %v", err) } } + +func TestCalculateETag(t *testing.T) { + if testing.Short() { + t.Skip("Skipping long test in short mode") + } + ctx := context.Background() + + cfg := &StoreConfig{} + test.SetCfgProvider(t, cfg) + acfg, clean := test.CreateAWSContainer(t, ctx, cfg, &test.CreateAWSConfig{}) + defer clean() + test.SetStoreClient(t, ctx, cfg, acfg.ExternalEndpoint) + test.CreateBucket(t, ctx, cfg, test.BucketName) + + testContent := "hi" + hashReader := strings.NewReader(testContent) + uploadReader := strings.NewReader(testContent) + + hash, err := cfg.CalculateETag(ctx, hashReader) + require.NoError(t, err) + + res, err := cfg.StoreClient.PutObject(ctx, &s3.PutObjectInput{ + Bucket: aws.String(test.BucketName), + Key: aws.String("example"), + Body: uploadReader, + }) + require.NoError(t, err) + + assert.Equal(t, *res.ETag, hash) +} diff --git a/internal/serviceconfig/queue/config.go b/internal/serviceconfig/queue/config.go index fbd4a113..45024bdb 100644 --- a/internal/serviceconfig/queue/config.go +++ b/internal/serviceconfig/queue/config.go @@ -9,7 +9,6 @@ import ( awsc "queryorchestration/internal/serviceconfig/aws" "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/sqs" "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) @@ -67,9 +66,9 @@ func (c *QueueConfig) PingQueueByURL(ctx context.Context, url string) error { } func (c *QueueConfig) SetQueueClient(ctx context.Context) error { - cfg, err := config.LoadDefaultConfig(ctx) + cfg, err := awsc.GetAWSConfig(ctx) if err != nil { - return fmt.Errorf("unable to load SDK config: %v", err) + return err } c.QueueClient = sqs.NewFromConfig(cfg) diff --git a/internal/serviceconfig/queue/documenttext/config.go b/internal/serviceconfig/queue/documenttext/config.go deleted file mode 100644 index cd12b180..00000000 --- a/internal/serviceconfig/queue/documenttext/config.go +++ /dev/null @@ -1,15 +0,0 @@ -package documenttext - -const EnvName = "DOCUMENT_TEXT_URL" - -type DocTextConfig struct { - DocumentTextURL string `env:"DOCUMENT_TEXT_URL,required,notEmpty"` -} - -func (c *DocTextConfig) GetDocumentTextURL() string { - return c.DocumentTextURL -} - -type ConfigProvider interface { - GetDocumentTextURL() string -} diff --git a/internal/serviceconfig/queue/documenttext/config_test.go b/internal/serviceconfig/queue/documenttext/config_test.go deleted file mode 100644 index c233e4eb..00000000 --- a/internal/serviceconfig/queue/documenttext/config_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package documenttext_test - -import ( - "testing" - - "queryorchestration/internal/serviceconfig/queue/documenttext" - - "github.com/stretchr/testify/assert" -) - -func TestGetDocumentTextURL(t *testing.T) { - cfg := documenttext.DocTextConfig{} - - name := cfg.GetDocumentTextURL() - assert.Equal(t, "", name) - - cfg.DocumentTextURL = "name" - name = cfg.GetDocumentTextURL() - assert.Equal(t, "name", name) - assert.Equal(t, cfg.DocumentTextURL, name) -} diff --git a/internal/serviceconfig/queue/documenttextprocess/config.go b/internal/serviceconfig/queue/documenttextprocess/config.go new file mode 100644 index 00000000..8eed9622 --- /dev/null +++ b/internal/serviceconfig/queue/documenttextprocess/config.go @@ -0,0 +1,15 @@ +package documenttextprocess + +const EnvName = "DOCUMENT_TEXT_PROCESS_URL" + +type DocTextProcessConfig struct { + DocumentTextProcessURL string `env:"DOCUMENT_TEXT_PROCESS_URL,required,notEmpty"` +} + +func (c *DocTextProcessConfig) GetDocumentTextProcessURL() string { + return c.DocumentTextProcessURL +} + +type ConfigProvider interface { + GetDocumentTextProcessURL() string +} diff --git a/internal/serviceconfig/queue/documenttextprocess/config_test.go b/internal/serviceconfig/queue/documenttextprocess/config_test.go new file mode 100644 index 00000000..b437843c --- /dev/null +++ b/internal/serviceconfig/queue/documenttextprocess/config_test.go @@ -0,0 +1,21 @@ +package documenttextprocess_test + +import ( + "testing" + + "queryorchestration/internal/serviceconfig/queue/documenttextprocess" + + "github.com/stretchr/testify/assert" +) + +func TestGetDocumentTextURL(t *testing.T) { + cfg := documenttextprocess.DocTextProcessConfig{} + + name := cfg.GetDocumentTextProcessURL() + assert.Equal(t, "", name) + + cfg.DocumentTextProcessURL = "name" + name = cfg.GetDocumentTextProcessURL() + assert.Equal(t, "name", name) + assert.Equal(t, cfg.DocumentTextProcessURL, name) +} diff --git a/internal/serviceconfig/queue/documenttexttrigger/config.go b/internal/serviceconfig/queue/documenttexttrigger/config.go new file mode 100644 index 00000000..d0ef76af --- /dev/null +++ b/internal/serviceconfig/queue/documenttexttrigger/config.go @@ -0,0 +1,15 @@ +package documenttexttrigger + +const EnvName = "DOCUMENT_TEXT_TRIGGER_URL" + +type DocTextTriggerConfig struct { + DocumentTextTriggerURL string `env:"DOCUMENT_TEXT_TRIGGER_URL,required,notEmpty"` +} + +func (c *DocTextTriggerConfig) GetDocumentTextTriggerURL() string { + return c.DocumentTextTriggerURL +} + +type ConfigProvider interface { + GetDocumentTextTriggerURL() string +} diff --git a/internal/serviceconfig/queue/documenttexttrigger/config_test.go b/internal/serviceconfig/queue/documenttexttrigger/config_test.go new file mode 100644 index 00000000..e4509650 --- /dev/null +++ b/internal/serviceconfig/queue/documenttexttrigger/config_test.go @@ -0,0 +1,21 @@ +package documenttexttrigger_test + +import ( + "testing" + + "queryorchestration/internal/serviceconfig/queue/documenttexttrigger" + + "github.com/stretchr/testify/assert" +) + +func TestGetDocumentTextURL(t *testing.T) { + cfg := documenttexttrigger.DocTextTriggerConfig{} + + name := cfg.GetDocumentTextTriggerURL() + assert.Equal(t, "", name) + + cfg.DocumentTextTriggerURL = "name" + name = cfg.GetDocumentTextTriggerURL() + assert.Equal(t, "name", name) + assert.Equal(t, cfg.DocumentTextTriggerURL, name) +} diff --git a/internal/serviceconfig/queue/storeevent/config.go b/internal/serviceconfig/queue/storeevent/config.go new file mode 100644 index 00000000..e8f83efc --- /dev/null +++ b/internal/serviceconfig/queue/storeevent/config.go @@ -0,0 +1,15 @@ +package storeevent + +const EnvName = "STORE_EVENT_URL" + +type StoreEventConfig struct { + StoreEventURL string `env:"STORE_EVENT_URL,required,notEmpty"` +} + +func (c *StoreEventConfig) GetStoreEventURL() string { + return c.StoreEventURL +} + +type ConfigProvider interface { + GetStoreEventURL() string +} diff --git a/internal/serviceconfig/queue/storeevent/config_test.go b/internal/serviceconfig/queue/storeevent/config_test.go new file mode 100644 index 00000000..837e32e1 --- /dev/null +++ b/internal/serviceconfig/queue/storeevent/config_test.go @@ -0,0 +1,21 @@ +package storeevent_test + +import ( + "testing" + + "queryorchestration/internal/serviceconfig/queue/storeevent" + + "github.com/stretchr/testify/assert" +) + +func TestGetStoreEventURL(t *testing.T) { + cfg := storeevent.StoreEventConfig{} + + name := cfg.GetStoreEventURL() + assert.Equal(t, "", name) + + cfg.StoreEventURL = "name" + name = cfg.GetStoreEventURL() + assert.Equal(t, "name", name) + assert.Equal(t, cfg.StoreEventURL, name) +} diff --git a/internal/serviceconfig/textract/client.go b/internal/serviceconfig/textract/client.go index 3472df8b..8de46d21 100644 --- a/internal/serviceconfig/textract/client.go +++ b/internal/serviceconfig/textract/client.go @@ -8,8 +8,8 @@ import ( type TextractClient interface { // Document Analysis Operations - AnalyzeDocument(ctx context.Context, params *textract.AnalyzeDocumentInput, opts ...func(*textract.Options)) (*textract.AnalyzeDocumentOutput, error) DetectDocumentText(ctx context.Context, params *textract.DetectDocumentTextInput, opts ...func(*textract.Options)) (*textract.DetectDocumentTextOutput, error) + AnalyzeDocument(ctx context.Context, params *textract.AnalyzeDocumentInput, opts ...func(*textract.Options)) (*textract.AnalyzeDocumentOutput, error) AnalyzeExpense(ctx context.Context, params *textract.AnalyzeExpenseInput, opts ...func(*textract.Options)) (*textract.AnalyzeExpenseOutput, error) AnalyzeID(ctx context.Context, params *textract.AnalyzeIDInput, opts ...func(*textract.Options)) (*textract.AnalyzeIDOutput, error) @@ -22,15 +22,4 @@ type TextractClient interface { GetDocumentAnalysis(ctx context.Context, params *textract.GetDocumentAnalysisInput, opts ...func(*textract.Options)) (*textract.GetDocumentAnalysisOutput, error) GetDocumentTextDetection(ctx context.Context, params *textract.GetDocumentTextDetectionInput, opts ...func(*textract.Options)) (*textract.GetDocumentTextDetectionOutput, error) GetExpenseAnalysis(ctx context.Context, params *textract.GetExpenseAnalysisInput, opts ...func(*textract.Options)) (*textract.GetExpenseAnalysisOutput, error) - - // Adapting Operations - CreateAdapterVersion(ctx context.Context, params *textract.CreateAdapterVersionInput, opts ...func(*textract.Options)) (*textract.CreateAdapterVersionOutput, error) - DeleteAdapter(ctx context.Context, params *textract.DeleteAdapterInput, opts ...func(*textract.Options)) (*textract.DeleteAdapterOutput, error) - GetAdapter(ctx context.Context, params *textract.GetAdapterInput, opts ...func(*textract.Options)) (*textract.GetAdapterOutput, error) - GetAdapterVersion(ctx context.Context, params *textract.GetAdapterVersionInput, opts ...func(*textract.Options)) (*textract.GetAdapterVersionOutput, error) - ListAdapters(ctx context.Context, params *textract.ListAdaptersInput, opts ...func(*textract.Options)) (*textract.ListAdaptersOutput, error) - UpdateAdapter(ctx context.Context, params *textract.UpdateAdapterInput, opts ...func(*textract.Options)) (*textract.UpdateAdapterOutput, error) - - // Query-based Analysis - CreateAdapter(ctx context.Context, params *textract.CreateAdapterInput, opts ...func(*textract.Options)) (*textract.CreateAdapterOutput, error) } diff --git a/internal/serviceconfig/textract/config.go b/internal/serviceconfig/textract/config.go index 2b9d1dc9..1bc88d8e 100644 --- a/internal/serviceconfig/textract/config.go +++ b/internal/serviceconfig/textract/config.go @@ -2,17 +2,18 @@ package textract import ( "context" - "fmt" awsc "queryorchestration/internal/serviceconfig/aws" - "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/textract" ) type ConfigProvider interface { awsc.ConfigProvider SetTextractClient(context.Context) error + SetTextractClientWithCfg(context.Context, aws.Config) + SetTextractClientWithProfile(context.Context, awsc.Profile) error GetTextractClient() TextractClient SetTextractEndpoint(string) GetTextractEndpoint() string @@ -23,13 +24,28 @@ type TextractConfig struct { TextractClient TextractClient } -func (c *TextractConfig) SetTextractClient(ctx context.Context) error { - cfg, err := config.LoadDefaultConfig(ctx) +func (c *TextractConfig) SetTextractClientWithCfg(ctx context.Context, cfg aws.Config) { + c.TextractClient = textract.NewFromConfig(cfg) +} + +func (c *TextractConfig) SetTextractClientWithProfile(ctx context.Context, profile awsc.Profile) error { + cfg, err := awsc.GetAWSConfigWithProfile(ctx, profile) if err != nil { - return fmt.Errorf("unable to load SDK config: %v", err) + return err } - c.TextractClient = textract.NewFromConfig(cfg) + c.SetTextractClientWithCfg(ctx, cfg) + + return nil +} + +func (c *TextractConfig) SetTextractClient(ctx context.Context) error { + cfg, err := awsc.GetAWSConfig(ctx) + if err != nil { + return err + } + + c.SetTextractClientWithCfg(ctx, cfg) return nil } diff --git a/internal/serviceconfig/textract/config_test.go b/internal/serviceconfig/textract/config_test.go index 2ec6c4e6..2b9acf10 100644 --- a/internal/serviceconfig/textract/config_test.go +++ b/internal/serviceconfig/textract/config_test.go @@ -28,6 +28,15 @@ func TestTextractClient(t *testing.T) { assert.NotNil(t, c.TextractClient) } +func TestTextractClientWithProfile(t *testing.T) { + os.Clearenv() + ctx := context.Background() + c := textract.TextractConfig{} + err := c.SetTextractClientWithProfile(ctx, "") + require.NoError(t, err) + assert.NotNil(t, c.TextractClient) +} + func TestGetTextractURL(t *testing.T) { c := textract.TextractConfig{} assert.Empty(t, c.GetTextractEndpoint()) diff --git a/internal/test/api.go b/internal/test/api.go index 9d91aa41..dba5e61a 100644 --- a/internal/test/api.go +++ b/internal/test/api.go @@ -13,7 +13,7 @@ import ( "github.com/testcontainers/testcontainers-go" ) -type APIName = string +type APIName string const ( QueryAPIName APIName = queryapi.Name @@ -25,20 +25,21 @@ type API struct { } type APIConfig struct { - API API - Cfg serviceconfig.ConfigProvider - Network *testcontainers.DockerNetwork + API API + Network *testcontainers.DockerNetwork + MockHTTP string } -func CreateAPI(t testing.TB, ctx context.Context, config *APIConfig) (*Container, func()) { +func CreateAPI(t testing.TB, ctx context.Context, cfg serviceconfig.ConfigProvider, config *APIConfig) (*Container, func()) { port, err := nat.NewPort("tcp", "8080") require.NoError(t, err) container, cleanup := createContainer(t, ctx, &containerConfig{ - Cfg: config.Cfg, - Name: config.API.Name, + Cfg: cfg, + Name: string(config.API.Name), DownstreamQueues: config.API.DownstreamQueues, Network: config.Network, + MockHTTP: config.MockHTTP, WaitForMsg: "⇨ http server started on [::]:8080", }) diff --git a/internal/test/api_test.go b/internal/test/api_test.go index 88cde72a..3b84bc3a 100644 --- a/internal/test/api_test.go +++ b/internal/test/api_test.go @@ -21,19 +21,17 @@ func TestCreateAPI(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - _, dbcleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ + _, dbcleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ Network: ncfg, - Cfg: cfg, }) defer dbcleanup() acfg := &test.APIConfig{ API: test.QueryAPI, - Cfg: cfg, Network: ncfg, } - conn, cleanup := test.CreateAPI(t, ctx, acfg) + conn, cleanup := test.CreateAPI(t, ctx, cfg, acfg) assert.NotNil(t, conn) assert.NotNil(t, cleanup) diff --git a/internal/test/aws.go b/internal/test/aws.go index 41689342..75e59415 100644 --- a/internal/test/aws.go +++ b/internal/test/aws.go @@ -9,6 +9,7 @@ import ( "time" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/objectstore" "github.com/docker/go-connections/nat" "github.com/stretchr/testify/require" @@ -24,10 +25,14 @@ type AWSContainerConfig struct { type CreateAWSConfig struct { Network *testcontainers.DockerNetwork - Cfg serviceconfig.ConfigProvider } -func CreateAWSContainer(t testing.TB, ctx context.Context, cfg *CreateAWSConfig) (*AWSContainerConfig, func()) { +type AWSConfigProvider interface { + serviceconfig.ConfigProvider + objectstore.ConfigProvider +} + +func CreateAWSContainer(t testing.TB, ctx context.Context, cfg AWSConfigProvider, acfg *CreateAWSConfig) (*AWSContainerConfig, func()) { alias := "localstack" port, err := nat.NewPort("tcp", "4566") @@ -36,10 +41,10 @@ func CreateAWSContainer(t testing.TB, ctx context.Context, cfg *CreateAWSConfig) req := testcontainers.ContainerRequest{ Image: "localstack/localstack:4.1.0", Env: map[string]string{ - "AWS_ACCESS_KEY_ID": cfg.Cfg.GetAWSKeyID(), - "AWS_SECRET_ACCESS_KEY": cfg.Cfg.GetAWSSecretKey(), - "AWS_SESSION_TOKEN": cfg.Cfg.GetAWSSessionToken(), - "AWS_REGION": cfg.Cfg.GetAWSRegion(), + "AWS_ACCESS_KEY_ID": cfg.GetAWSKeyID(), + "AWS_SECRET_ACCESS_KEY": cfg.GetAWSSecretKey(), + "AWS_SESSION_TOKEN": cfg.GetAWSSessionToken(), + "AWS_REGION": cfg.GetAWSRegion(), "SERVICES": "s3,sqs,cloudwatch,logs", "SKIP_SSL_CERT_DOWNLOAD": "1", "LOCALSTACK_HOST": alias, @@ -66,10 +71,10 @@ func CreateAWSContainer(t testing.TB, ctx context.Context, cfg *CreateAWSConfig) ), } - if cfg.Network != nil { - req.Networks = []string{cfg.Network.Name} + if acfg.Network != nil { + req.Networks = []string{acfg.Network.Name} req.NetworkAliases = map[string][]string{ - cfg.Network.Name: {alias}, + acfg.Network.Name: {alias}, } } @@ -86,14 +91,18 @@ func CreateAWSContainer(t testing.TB, ctx context.Context, cfg *CreateAWSConfig) extEndpoint := fmt.Sprintf("http://%s:%s", host, mappedPort.Port()) t.Setenv("AWS_ENDPOINT_URL", extEndpoint) + cfg.SetAWSEndpoint(extEndpoint) t.Setenv("AWS_ENDPOINT_URL_SQS", extEndpoint) + cfg.SetSQSEndpoint(extEndpoint) t.Setenv("AWS_ENDPOINT_URL_S3", extEndpoint) - cfg.Cfg.SetAWSEndpoint(extEndpoint) + cfg.SetS3Endpoint(extEndpoint) var endpoint string - if cfg.Network != nil { + if acfg.Network != nil { endpoint = fmt.Sprintf("http://%s:%s", alias, port.Port()) - cfg.Cfg.SetAWSEndpoint(endpoint) + cfg.SetAWSEndpoint(endpoint) + cfg.SetSQSEndpoint(endpoint) + cfg.SetS3Endpoint(endpoint) } return &AWSContainerConfig{ diff --git a/internal/test/aws_test.go b/internal/test/aws_test.go index 456d463b..80014850 100644 --- a/internal/test/aws_test.go +++ b/internal/test/aws_test.go @@ -5,21 +5,25 @@ import ( "testing" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/objectstore" "github.com/stretchr/testify/assert" ) +type TestAWSConfig struct { + serviceconfig.BaseConfig + objectstore.ObjectStoreConfig +} + func TestCreateQueueContainer(t *testing.T) { if testing.Short() { t.Skip("Skipping long test in short mode") } ctx := context.Background() - cfg := &serviceconfig.BaseConfig{} + cfg := &TestAWSConfig{} SetCfgProvider(t, cfg) - qcfg, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, - }) + qcfg, cleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{}) assert.NotNil(t, qcfg) assert.NotNil(t, cleanup) diff --git a/internal/test/container.go b/internal/test/container.go index 34ca30aa..6e5fa196 100644 --- a/internal/test/container.go +++ b/internal/test/container.go @@ -29,25 +29,27 @@ type containerConfig struct { Env map[string]string WaitForMsg string ExposedPorts []nat.Port + MockHTTP string } func createContainer(t testing.TB, ctx context.Context, cfg *containerConfig) (testcontainers.Container, func()) { env := map[string]string{ - "PGUSER": cfg.Cfg.GetDBUser(), - "PGPASSWORD": cfg.Cfg.GetDBSecret(), - "PGHOST": cfg.Cfg.GetDBHost(), - "PGDATABASE": cfg.Cfg.GetDBName(), - "PGPORT": strconv.Itoa(cfg.Cfg.GetDBPort()), - "DB_NOSSL": strconv.FormatBool(cfg.Cfg.IsDBNoSSL()), - "AWS_ACCESS_KEY_ID": cfg.Cfg.GetAWSKeyID(), - "AWS_SECRET_ACCESS_KEY": cfg.Cfg.GetAWSSecretKey(), - "AWS_REGION": cfg.Cfg.GetAWSRegion(), - "AWS_DEFAULT_REGION": cfg.Cfg.GetAWSRegion(), - "AWS_ENDPOINT_URL": cfg.Cfg.GetAWSEndpoint(), - "AWS_ENDPOINT_URL_SQS": cfg.Cfg.GetAWSEndpoint(), - "AWS_ENDPOINT_URL_S3": cfg.Cfg.GetAWSEndpoint(), - "AWS_S3_USE_PATH_STYLE": strconv.FormatBool(true), - "LOG_LEVEL": "DEBUG", + "PGUSER": cfg.Cfg.GetDBUser(), + "PGPASSWORD": cfg.Cfg.GetDBSecret(), + "PGHOST": cfg.Cfg.GetDBHost(), + "PGDATABASE": cfg.Cfg.GetDBName(), + "PGPORT": strconv.Itoa(cfg.Cfg.GetDBPort()), + "DB_NOSSL": strconv.FormatBool(cfg.Cfg.IsDBNoSSL()), + "AWS_ACCESS_KEY_ID": cfg.Cfg.GetAWSKeyID(), + "AWS_SECRET_ACCESS_KEY": cfg.Cfg.GetAWSSecretKey(), + "AWS_REGION": cfg.Cfg.GetAWSRegion(), + "AWS_DEFAULT_REGION": cfg.Cfg.GetAWSRegion(), + "AWS_ENDPOINT_URL": cfg.Cfg.GetAWSEndpoint(), + "AWS_ENDPOINT_URL_SQS": cfg.Cfg.GetAWSEndpoint(), + "AWS_ENDPOINT_URL_S3": cfg.Cfg.GetAWSEndpoint(), + "AWS_ENDPOINT_URL_TEXTRACT": cfg.MockHTTP, + "AWS_S3_USE_PATH_STYLE": strconv.FormatBool(true), + "LOG_LEVEL": "DEBUG", } if cfg.Env != nil { for k, v := range cfg.Env { @@ -56,7 +58,7 @@ func createContainer(t testing.TB, ctx context.Context, cfg *containerConfig) (t } for _, e := range cfg.DownstreamQueues { - env[GetRunnerEnvFromName(e)] = GetQueueURL(cfg.Cfg, e) + env[string(GetRunnerEnvFromName(e))] = GetQueueURL(cfg.Cfg, e) } req := testcontainers.ContainerRequest{ @@ -104,6 +106,6 @@ func PrintContainerLogs(t testing.TB, ctx context.Context, container testcontain scanner := bufio.NewScanner(logs) for scanner.Scan() { line := scanner.Text() - slog.Error(line) + slog.Info(line) } } diff --git a/internal/test/container_test.go b/internal/test/container_test.go index 5d756561..12c0800a 100644 --- a/internal/test/container_test.go +++ b/internal/test/container_test.go @@ -22,14 +22,13 @@ func TestCreateContainer(t *testing.T) { cfg := &serviceconfig.BaseConfig{} SetCfgProvider(t, cfg) - _, dbcleanup := CreateDB(t, ctx, &CreateDatabaseConfig{ + _, dbcleanup := CreateDB(t, ctx, cfg, &CreateDatabaseConfig{ Network: ncfg, - Cfg: cfg, }) defer dbcleanup() ccfg := &containerConfig{ - Name: QueryAPIName, + Name: string(QueryAPIName), DownstreamQueues: QueryAPI.DownstreamQueues, Cfg: cfg, Network: ncfg, diff --git a/internal/test/database.go b/internal/test/database.go index 835e085a..1ed1c4dc 100644 --- a/internal/test/database.go +++ b/internal/test/database.go @@ -18,11 +18,10 @@ import ( type CreateDatabaseConfig struct { Network *testcontainers.DockerNetwork - Cfg serviceconfig.ConfigProvider RunMigrations bool } -func CreateDB(t testing.TB, ctx context.Context, cfg *CreateDatabaseConfig) (testcontainers.Container, func()) { +func CreateDB(t testing.TB, ctx context.Context, cfg serviceconfig.ConfigProvider, dcfg *CreateDatabaseConfig) (testcontainers.Container, func()) { alias := "postgres" port, err := nat.NewPort("tcp", "5432") @@ -53,10 +52,10 @@ func CreateDB(t testing.TB, ctx context.Context, cfg *CreateDatabaseConfig) (tes ), } - if cfg.Network != nil { - req.Networks = []string{cfg.Network.Name} + if dcfg.Network != nil { + req.Networks = []string{dcfg.Network.Name} req.NetworkAliases = map[string][]string{ - cfg.Network.Name: {alias}, + dcfg.Network.Name: {alias}, } } @@ -87,24 +86,30 @@ func CreateDB(t testing.TB, ctx context.Context, cfg *CreateDatabaseConfig) (tes t.Setenv("PGHOST", dbcfg.DBHost) t.Setenv("PGPORT", fmt.Sprint(dbcfg.DBPort)) - if cfg.Cfg == nil { - SetCfgProvider(t, cfg.Cfg) - } + cfg.SetDBUser(dbcfg.DBUser) + cfg.SetDBSecret(dbcfg.DBSecret) + cfg.SetDBName(dbcfg.DBName) + cfg.SetDBNoSSL(dbcfg.DBNoSSL) + cfg.SetDBHost(dbcfg.DBHost) + cfg.SetDBPort(dbcfg.DBPort) - cfg.Cfg.SetDBConfig(dbcfg) - - if cfg.RunMigrations { - err := db.RunMigrations(ctx, cfg.Cfg) + if dcfg.RunMigrations { + err := db.RunMigrations(ctx, cfg) require.NoError(t, err) - err = cfg.Cfg.SetDBPool(ctx) + err = cfg.SetDBPool(ctx) require.NoError(t, err) } - if cfg.Network != nil { + if dcfg.Network != nil { dbcfg.DBHost = alias dbcfg.DBPort = port.Int() - cfg.Cfg.SetDBConfig(dbcfg) + cfg.SetDBUser(dbcfg.DBUser) + cfg.SetDBSecret(dbcfg.DBSecret) + cfg.SetDBName(dbcfg.DBName) + cfg.SetDBNoSSL(dbcfg.DBNoSSL) + cfg.SetDBHost(dbcfg.DBHost) + cfg.SetDBPort(dbcfg.DBPort) } return container, func() { diff --git a/internal/test/database_test.go b/internal/test/database_test.go index 8e362acf..753fec58 100644 --- a/internal/test/database_test.go +++ b/internal/test/database_test.go @@ -19,7 +19,7 @@ func TestCreateDB(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - dbcfg, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{Cfg: cfg}) + dbcfg, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{}) assert.NotNil(t, dbcfg) assert.Nil(t, cfg.GetDBPool()) assert.NotNil(t, cleanup) @@ -36,8 +36,7 @@ func TestCreateDBWithMigrations(t *testing.T) { cfg := &serviceconfig.BaseConfig{} test.SetCfgProvider(t, cfg) - dbcfg, cleanup := test.CreateDB(t, ctx, &test.CreateDatabaseConfig{ - Cfg: cfg, + dbcfg, cleanup := test.CreateDB(t, ctx, cfg, &test.CreateDatabaseConfig{ RunMigrations: true, }) defer cleanup() diff --git a/internal/test/ecosystem.go b/internal/test/ecosystem.go index f7a8c155..5b9b6198 100644 --- a/internal/test/ecosystem.go +++ b/internal/test/ecosystem.go @@ -1,36 +1,46 @@ package test import ( + "bufio" + "bytes" "context" + "encoding/json" + "errors" + "fmt" + "io" + "log/slog" + "net/http" + "regexp" "testing" + "time" "queryorchestration/internal/serviceconfig" - "queryorchestration/internal/serviceconfig/aws" - "queryorchestration/internal/serviceconfig/database" "queryorchestration/internal/serviceconfig/objectstore" queryapi "queryorchestration/pkg/queryAPI" + "github.com/docker/go-connections/nat" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" ) type Network struct { Dependencies Dependencies - APIs map[string]*Container - Runners map[string]*Container + APIs map[APIName]*Container + Runners map[RunnerName]*Container Client *queryapi.ClientWithResponses } func CreateFullNetwork(t testing.TB, ctx context.Context, cfg FullDependenciesConfig) (Network, func()) { deps, clean := CreateFullDependencies(t, ctx, cfg) - apiContainers := make(map[string]*Container, len(apis)) + apiContainers := make(map[APIName]*Container, len(apis)) apiClean := make([]func(), len(apis)) for i, s := range apis { - c, ccleanup := CreateAPI(t, ctx, &APIConfig{ - API: s, - Cfg: cfg, - Network: deps.Network, + c, ccleanup := CreateAPI(t, ctx, cfg, &APIConfig{ + API: s, + Network: deps.Network, + MockHTTP: string(deps.MockServer.Internal), }) apiContainers[s.Name] = c apiClean[i] = ccleanup @@ -39,13 +49,13 @@ func CreateFullNetwork(t testing.TB, ctx context.Context, cfg FullDependenciesCo qService, err := queryapi.NewClientWithResponses(apiContainers[QueryAPIName].URI) require.NoError(t, err) - runnerContainers := make(map[string]*Container, len(runners)) + runnerContainers := make(map[RunnerName]*Container, len(runners)) runnerClean := make([]func(), len(runners)) for i, r := range runners { - c, ccleanup := CreateRunner(t, ctx, &RunnerConfig{ - Runner: r, - Cfg: cfg, - Network: deps.Network, + c, ccleanup := CreateRunner(t, ctx, cfg, &RunnerConfig{ + Runner: r, + Network: deps.Network, + MockHTTP: string(deps.MockServer.Internal), }) runnerContainers[r.Name] = c @@ -75,32 +85,35 @@ type FullDependenciesConfig interface { type Dependencies struct { BucketName string - QueueURLs map[string]string + QueueURLs map[RunnerName]string Network *testcontainers.DockerNetwork AWSConfig *AWSContainerConfig DBConfig testcontainers.Container + MockServer MockServer } func CreateFullDependencies(t testing.TB, ctx context.Context, cfg FullDependenciesConfig) (Dependencies, func()) { network, ncleanup := CreateNetwork(t, ctx) - acfg, awsclean := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, + acfg, awsclean := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{ Network: network, }) - dbcfg, dbcleanup := CreateDB(t, ctx, &CreateDatabaseConfig{ + dbcfg, dbcleanup := CreateDB(t, ctx, cfg, &CreateDatabaseConfig{ Network: network, - Cfg: cfg, RunMigrations: true, }) + mockServer, cleanMock := CreateMockServer(t, ctx, MockServerConfig{ + Network: network.Name, + }) + SetQueueClient(t, ctx, cfg) SetStoreClient(t, ctx, cfg, acfg.ExternalEndpoint) - urls := map[string]string{} + urls := map[RunnerName]string{} for _, runner := range runners { - urls[runner.Name] = CreateQueue(t, ctx, cfg, runner.Name) + urls[runner.Name] = CreateQueue(t, ctx, cfg, string(runner.Name)) } CreateBucket(t, ctx, cfg, BucketName) @@ -112,69 +125,326 @@ func CreateFullDependencies(t testing.TB, ctx context.Context, cfg FullDependenc Network: network, AWSConfig: acfg, DBConfig: dbcfg, + MockServer: mockServer, }, func() { awsclean() dbcleanup() + cleanMock() ncleanup() } } func SetCfgProvider(t testing.TB, cfg serviceconfig.ConfigProvider) { - cfg.SetAWSConfig(&aws.AWSConfig{ - AWSKeyID: "test", - AWSSecretKey: "test", - AWSRegion: "us-east-1", - }) + cfg.SetAWSKeyID("test") + cfg.SetAWSSecretKey("test") + cfg.SetAWSRegion("us-east-1") + cfg.SetAWSProfile("") + t.Setenv("AWS_ACCESS_KEY_ID", cfg.GetAWSKeyID()) t.Setenv("AWS_SECRET_ACCESS_KEY", cfg.GetAWSSecretKey()) t.Setenv("AWS_SESSION_TOKEN", cfg.GetAWSSessionToken()) t.Setenv("AWS_REGION", cfg.GetAWSRegion()) t.Setenv("AWS_DEFAULT_REGION", cfg.GetAWSRegion()) + t.Setenv("AWS_PROFILE", string(cfg.GetAWSProfile())) - cfg.SetDBConfig(&database.DBConfig{ - DBUser: "invalid_user", - DBSecret: "invalid_pass", - DBHost: "invalid_host", - DBPort: 5432, - DBName: "invalid_name", - DBNoSSL: true, - }) + cfg.SetDBUser("invalid_user") + cfg.SetDBSecret("invalid_pass") + cfg.SetDBHost("invalid_host") + cfg.SetDBPort(5432) + cfg.SetDBName("invalid_name") + cfg.SetDBNoSSL(true) } type ServiceNetworkConfig struct { - Cfg serviceconfig.ConfigProvider Network *testcontainers.DockerNetwork API API } -func CreateAPINetwork(t testing.TB, ctx context.Context, scfg *ServiceNetworkConfig) (*Container, func()) { - if scfg.Cfg == nil { - scfg.Cfg = &serviceconfig.BaseConfig{} - SetCfgProvider(t, scfg.Cfg) - } +func CreateAPINetwork(t testing.TB, ctx context.Context, cfg FullDependenciesConfig, scfg *ServiceNetworkConfig) (*Container, func()) { + deps, depsclean := CreateFullDependencies(t, ctx, cfg) - network := scfg.Network - var ncleanup func() - if network == nil { - network, ncleanup = CreateNetwork(t, ctx) - } - - _, dbcleanup := CreateDB(t, ctx, &CreateDatabaseConfig{ - Network: network, - Cfg: scfg.Cfg, - }) - - c, ccleanup := CreateAPI(t, ctx, &APIConfig{ - API: scfg.API, - Cfg: scfg.Cfg, - Network: network, + c, ccleanup := CreateAPI(t, ctx, cfg, &APIConfig{ + API: scfg.API, + Network: deps.Network, + MockHTTP: string(deps.MockServer.Internal), }) return c, func() { - dbcleanup() + depsclean() ccleanup() - if ncleanup != nil { - ncleanup() + } +} + +type Address string + +type MockServer struct { + Internal Address + External Address + Container testcontainers.Container + Client *http.Client +} + +type MockBody any +type MockQueries map[string][]string +type MockHeaders map[string][]string + +type MockRequest struct { + Method string `json:"method"` + Path string `json:"path"` + Headers MockHeaders `json:"headers"` + Body MockBody `json:"body"` + Query MockQueries `json:"queryStringParameters"` +} + +type MockResponse struct { + Code int `json:"statusCode"` + Headers MockHeaders `json:"headers"` + Body MockBody `json:"body"` +} + +type MockExpectation struct { + Request MockRequest `json:"httpRequest"` + Response MockResponse `json:"httpResponse"` +} + +type MockServerConfig struct { + Network string +} + +func CreateMockServer(t testing.TB, ctx context.Context, cfg MockServerConfig) (MockServer, func()) { + name := "mockserver" + port, err := nat.NewPort("tcp", "1080") + require.NoError(t, err) + + req := testcontainers.ContainerRequest{ + Image: "mockserver/mockserver:latest", + ExposedPorts: []string{port.Port()}, + Networks: []string{cfg.Network}, + NetworkAliases: map[string][]string{ + cfg.Network: {name}, + }, + Env: map[string]string{ + "MOCKSERVER_LOG_LEVEL": "INFO", + }, + WaitingFor: wait.ForAll( + wait.ForExposedPort(), + wait.ForListeningPort(port), + ), + } + + container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: req, + Started: true, + }) + require.NoError(t, err) + + time.Sleep(2 * time.Second) + + host, err := container.Host(ctx) + require.NoError(t, err) + + externalPort, err := container.MappedPort(ctx, port) + require.NoError(t, err) + + server := MockServer{ + Client: &http.Client{}, + Internal: Address(fmt.Sprintf("http://%s:%d", name, port.Int())), + External: Address(fmt.Sprintf("http://%s:%d", host, externalPort.Int())), + Container: container, + } + + return server, func() { + err := container.Terminate(ctx) + require.NoError(t, err) + } +} + +func CreateMockExpectation(t testing.TB, server MockServer, expectation MockExpectation) { + jsonData, err := json.Marshal(expectation) + require.NoError(t, err) + + url := fmt.Sprintf("%s/mockserver/expectation", server.External) + req, err := http.NewRequest("PUT", url, bytes.NewBuffer(jsonData)) + require.NoError(t, err) + req.Header.Set("Content-Type", "application/json") + + resp, err := server.Client.Do(req) + require.NoError(t, err) + defer resp.Body.Close() + + if resp.StatusCode != http.StatusCreated && resp.StatusCode != http.StatusOK { + body, _ := io.ReadAll(resp.Body) + t.Fatalf("failed to configure MockServer, status: %d, response: %s", resp.StatusCode, body) + } +} + +type StartDocTextDetectionExpectationParams struct { + Bucket string + ClientID string + Filename string + JobID string +} + +func CreateStartDocTextDetectionExpectation(t testing.TB, mockServer MockServer, params StartDocTextDetectionExpectationParams) MockExpectation { + expectation := MockExpectation{ + Request: MockRequest{ + Method: "POST", + Path: "/", + Headers: MockHeaders{ + "X-Amz-Target": []string{"Textract.StartDocumentTextDetection"}, + }, + Body: map[string]map[string]any{ + "DocumentLocation": { + "S3Object": map[string]any{ + "Bucket": params.Bucket, + "Name": fmt.Sprintf("%s/import/%s", params.ClientID, params.Filename), + }, + }, + "OutputConfig": { + "S3Bucket": params.Bucket, + }, + }, + Query: MockQueries{}, + }, + Response: MockResponse{ + Code: 200, + Headers: MockHeaders{ + "Content-Type": {"application/json"}, + }, + Body: map[string]string{ + "JobId": params.JobID, + }, + }, + } + + CreateMockExpectation(t, mockServer, expectation) + + return expectation +} + +func WaitForMockEndpoint(t testing.TB, server MockServer, request MockRequest) MockRequest { + t.Helper() + + verificationRequest := map[string]any{ + "httpRequest": request, + "times": map[string]any{ + "atLeast": 1, + }, + } + + jsonData, err := json.Marshal(verificationRequest) + require.NoError(t, err) + + verifyURL := fmt.Sprintf("%s/mockserver/verify", server.External) + + client := &http.Client{ + Timeout: 5 * time.Second, + } + + timeout := time.After(60 * time.Second) + ticker := time.NewTicker(500 * time.Millisecond) + defer ticker.Stop() + + slog.Info("Attempting to process request", "body", jsonData) + + for { + select { + case <-timeout: + require.NoError(t, errors.New("Timeout waiting for mock http request to be fulfilled")) + case <-ticker.C: + req, err := http.NewRequest("PUT", verifyURL, bytes.NewBuffer(jsonData)) + require.NoError(t, err) + req.Header.Set("Content-Type", "application/json") + + resp, err := client.Do(req) + require.NoError(t, err) + + scanner := bufio.NewScanner(resp.Body) + for scanner.Scan() { + line := scanner.Text() + slog.Info(line) + } + + if resp.StatusCode == http.StatusAccepted { + slog.Info("request found") + resp.Body.Close() + return retrieveMatchingRequest(t, server, request) + } + + resp.Body.Close() + slog.Error("no request found") } } } + +func retrieveMatchingRequest(t testing.TB, server MockServer, request MockRequest) MockRequest { + retrieveURL := fmt.Sprintf("%s/mockserver/retrieve?type=REQUESTS", server.External) + + req, err := http.NewRequest("PUT", retrieveURL, nil) + require.NoError(t, err) + + client := &http.Client{} + resp, err := client.Do(req) + require.NoError(t, err) + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) + + var requests []MockRequest + err = json.Unmarshal(body, &requests) + require.NoError(t, err) + + for i := len(requests) - 1; i >= 0; i-- { + attemptRequest := requests[i] + + if attemptRequest.Method == request.Method && attemptRequest.Path == request.Path { + return attemptRequest + } + } + + require.Fail(t, "no request found") + return MockRequest{} +} + +type TextractOutputParams struct { + Request MockRequest + File io.Reader +} + +func WaitForMockTextractOutput(t testing.TB, ctx context.Context, cfg objectstore.ConfigProvider, mockServer MockServer, params TextractOutputParams) { + response := WaitForMockEndpoint(t, mockServer, params.Request) + + body, ok := response.Body.(map[string]any) + if !ok { + bodyStr, ok := response.Body.(string) + require.True(t, ok) + err := json.Unmarshal([]byte(bodyStr), &body) + require.NoError(t, err) + } + + json, ok := body["json"].(map[string]any) + if !ok { + json = body + } + + outputConfig, ok := json["OutputConfig"].(map[string]any) + require.True(t, ok) + + bucket, ok := outputConfig["S3Bucket"].(string) + require.True(t, ok) + + key, ok := outputConfig["S3Prefix"].(string) + require.True(t, ok) + + matches := regexp.MustCompile(`^(.+)/text/textract/(.+)$`). + FindStringSubmatch(key) + require.Len(t, matches, 3) + + PutTextractObject(t, ctx, cfg, PutObjectParams{ + ClientId: matches[1], + Bucket: bucket, + Filepath: matches[2], + File: params.File, + }) +} diff --git a/internal/test/ecosystem_test.go b/internal/test/ecosystem_test.go index cb4d233a..4d41108f 100644 --- a/internal/test/ecosystem_test.go +++ b/internal/test/ecosystem_test.go @@ -2,12 +2,19 @@ package test import ( "context" + "fmt" + "io" + "net/http" + "net/http/httptest" + "strings" "testing" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/aws" "queryorchestration/internal/serviceconfig/objectstore" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestCreateAPINetwork(t *testing.T) { @@ -16,7 +23,10 @@ func TestCreateAPINetwork(t *testing.T) { } ctx := context.Background() - conn, cleanup := CreateAPINetwork(t, ctx, &ServiceNetworkConfig{ + cfg := &FullDepsConfig{} + SetCfgProvider(t, cfg) + + conn, cleanup := CreateAPINetwork(t, ctx, cfg, &ServiceNetworkConfig{ API: QueryAPI, }) @@ -32,6 +42,7 @@ func TestCreateBaseConfig(t *testing.T) { assert.Equal(t, "test", cfg.AWSKeyID) assert.Equal(t, "test", cfg.AWSSecretKey) assert.Equal(t, "us-east-1", cfg.AWSRegion) + assert.Equal(t, aws.Profile(""), cfg.AWSProfile) assert.Equal(t, "invalid_user", cfg.DBUser) assert.Equal(t, "invalid_pass", cfg.DBSecret) assert.Equal(t, "invalid_host", cfg.DBHost) @@ -41,6 +52,7 @@ func TestCreateBaseConfig(t *testing.T) { } type FullDepsConfig struct { + aws.AWSConfig serviceconfig.BaseConfig objectstore.ObjectStoreConfig } @@ -76,3 +88,108 @@ func TestCreateNetwork(t *testing.T) { cleanup() } + +func TestCreateMockServer(t *testing.T) { + if testing.Short() { + t.Skip("Skipping long test in short mode") + } + ctx := context.Background() + + server, cleanup := CreateMockServer(t, ctx, MockServerConfig{ + Network: "hello", + }) + + assert.NotNil(t, server) + assert.NotNil(t, cleanup) + + cleanup() +} + +func TestCreateMockExpectation(t *testing.T) { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + })) + defer ts.Close() + + server := MockServer{ + Client: ts.Client(), + External: Address(ts.URL), + } + expectation := MockExpectation{} + CreateMockExpectation(t, server, expectation) +} + +func TestWaitForMockEndpoint(t *testing.T) { + if testing.Short() { + t.Skip("Skipping long test in short mode") + } + ctx := context.Background() + + server, cleanup := CreateMockServer(t, ctx, MockServerConfig{ + Network: "hello", + }) + defer cleanup() + + body := strings.NewReader(`{"team":"hello"}`) + req, err := http.NewRequest("GET", string(server.External), body) + require.NoError(t, err) + req.Header.Add("Hidden", "here") + + expectation := MockExpectation{ + Request: MockRequest{ + Method: "GET", + Path: "/", + Headers: MockHeaders{}, + Query: MockQueries{}, + Body: `{"team":"hello"}`, + }, + Response: MockResponse{ + Code: 200, + Headers: MockHeaders{}, + Body: "byebye", + }, + } + + CreateMockExpectation(t, server, expectation) + + resp, err := server.Client.Do(req) + require.NoError(t, err) + + respStr, err := io.ReadAll(resp.Body) + require.NoError(t, err) + assert.Equal(t, []byte("byebye"), respStr) + + request := WaitForMockEndpoint(t, server, expectation.Request) + assert.Equal(t, []string([]string{"here"}), request.Headers["Hidden"]) +} + +func TestWaitForTextractMockEndpoint(t *testing.T) { + if testing.Short() { + t.Skip("Skipping long test in short mode") + } + ctx := context.Background() + cfg := &FullDepsConfig{} + SetCfgProvider(t, cfg) + + deps, cleanup := CreateFullDependencies(t, ctx, cfg) + defer cleanup() + + e := CreateStartDocTextDetectionExpectation(t, deps.MockServer, StartDocTextDetectionExpectationParams{ + Bucket: deps.BucketName, + ClientID: "hi", + Filename: "hi", + JobID: "hi", + }) + + body := strings.NewReader(fmt.Sprintf(`{"DocumentLocation":{"S3Object":{"Bucket":"%s","Name":"hi/import/hi"}},"OutputConfig":{"S3Bucket":"%s","S3Prefix":"hi/text/textract/hi"}}`, deps.BucketName, deps.BucketName)) + req, err := http.NewRequest("POST", string(deps.MockServer.External), body) + require.NoError(t, err) + req.Header.Add("X-Amz-Target", "Textract.StartDocumentTextDetection") + _, err = deps.MockServer.Client.Do(req) + require.NoError(t, err) + + WaitForMockTextractOutput(t, ctx, cfg, deps.MockServer, TextractOutputParams{ + Request: e.Request, + File: strings.NewReader("hello"), + }) +} diff --git a/internal/test/objectstore.go b/internal/test/objectstore.go index 37564dde..c95d2bac 100644 --- a/internal/test/objectstore.go +++ b/internal/test/objectstore.go @@ -12,7 +12,6 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/s3" awstypes "github.com/aws/aws-sdk-go-v2/service/s3/types" - "github.com/oapi-codegen/runtime/types" "github.com/stretchr/testify/require" ) @@ -30,7 +29,7 @@ func CreateBucket(t testing.TB, ctx context.Context, cfg objectstore.ConfigProvi const BucketName = "documentbucket" func SetBucketNotifs(t testing.TB, ctx context.Context, cfg objectstore.ConfigProvider, name string) { - arn := GetQueueArn(cfg, DocInitRunnerName) + arn := GetQueueArn(cfg, StoreEventRunnerName) _, err := cfg.GetStoreClient().PutBucketNotificationConfiguration(ctx, &s3.PutBucketNotificationConfigurationInput{ Bucket: &name, NotificationConfiguration: &awstypes.NotificationConfiguration{ @@ -55,13 +54,30 @@ func SetStoreClient(t testing.TB, ctx context.Context, cfg objectstore.ConfigPro require.NoError(t, err) } -func PutObject(t testing.TB, ctx context.Context, cfg objectstore.ConfigProvider, clientId types.UUID, bucket string, filename string, file io.Reader) { - location := fmt.Sprintf("%s/%s", clientId, filename) +type PutObjectParams struct { + ClientId string + Bucket string + Filepath string + File io.Reader +} + +func PutObject(t testing.TB, ctx context.Context, cfg objectstore.ConfigProvider, params PutObjectParams) { + location := fmt.Sprintf("%s/%s", params.ClientId, params.Filepath) _, err := cfg.GetStoreClient().PutObject(ctx, &s3.PutObjectInput{ - Bucket: &bucket, + Bucket: ¶ms.Bucket, Key: &location, - Body: file, + Body: params.File, }) require.NoError(t, err) - slog.Info("put object", "bucket", bucket, "key", location) + slog.Info("put object", "bucket", params.Bucket, "key", location) +} + +func PutImportObject(t testing.TB, ctx context.Context, cfg objectstore.ConfigProvider, params PutObjectParams) { + params.Filepath = fmt.Sprintf("import/%s", params.Filepath) + PutObject(t, ctx, cfg, params) +} + +func PutTextractObject(t testing.TB, ctx context.Context, cfg objectstore.ConfigProvider, params PutObjectParams) { + params.Filepath = fmt.Sprintf("text/textract/%s", params.Filepath) + PutObject(t, ctx, cfg, params) } diff --git a/internal/test/objectstore_test.go b/internal/test/objectstore_test.go index 410fb709..2291bc1e 100644 --- a/internal/test/objectstore_test.go +++ b/internal/test/objectstore_test.go @@ -7,16 +7,17 @@ import ( "testing" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/aws" objectstore "queryorchestration/internal/serviceconfig/objectstore" objectstoremock "queryorchestration/mocks/objectstore" "github.com/aws/aws-sdk-go-v2/service/s3" - "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" ) type StoreConfig struct { + aws.AWSConfig serviceconfig.BaseConfig objectstore.ObjectStoreConfig } @@ -30,9 +31,7 @@ func TestCreateBucket(t *testing.T) { cfg := &StoreConfig{} SetCfgProvider(t, cfg) - acfg, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, - }) + acfg, cleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{}) defer cleanup() SetStoreClient(t, ctx, cfg, acfg.ExternalEndpoint) @@ -49,9 +48,7 @@ func TestCreateStoreClient(t *testing.T) { cfg := &StoreConfig{} SetCfgProvider(t, cfg) - acfg, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, - }) + acfg, cleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{}) defer cleanup() SetStoreClient(t, ctx, cfg, acfg.ExternalEndpoint) @@ -66,7 +63,7 @@ func TestPutObject(t *testing.T) { mockS3 := objectstoremock.NewMockS3Client(t) cfg.StoreClient = mockS3 - clientId := uuid.New() + clientId := "byebye" bucketName := "bucket" file := strings.NewReader("hello") filename := "hello" @@ -82,5 +79,74 @@ func TestPutObject(t *testing.T) { ). Return(&s3.PutObjectOutput{}, nil) - PutObject(t, ctx, cfg, clientId, bucketName, filename, file) + PutObject(t, ctx, cfg, PutObjectParams{ + ClientId: clientId, + Bucket: bucketName, + Filepath: filename, + File: file, + }) +} + +func TestPutImportObject(t *testing.T) { + ctx := context.Background() + + cfg := &StoreConfig{} + SetCfgProvider(t, cfg) + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + + clientId := "byebye" + bucketName := "bucket" + file := strings.NewReader("hello") + filename := "hello" + expectedLocation := fmt.Sprintf("%s/import/%s", clientId, filename) + + mockS3.EXPECT(). + PutObject( + mock.Anything, + mock.MatchedBy(func(in *s3.PutObjectInput) bool { + return *in.Bucket == bucketName && *in.Key == expectedLocation + }), + mock.Anything, + ). + Return(&s3.PutObjectOutput{}, nil) + + PutImportObject(t, ctx, cfg, PutObjectParams{ + ClientId: clientId, + Bucket: bucketName, + Filepath: filename, + File: file, + }) +} + +func TestPutTextractObject(t *testing.T) { + ctx := context.Background() + + cfg := &StoreConfig{} + SetCfgProvider(t, cfg) + mockS3 := objectstoremock.NewMockS3Client(t) + cfg.StoreClient = mockS3 + + clientId := "byebye" + bucketName := "bucket" + file := strings.NewReader("hello") + filename := "hello" + expectedLocation := fmt.Sprintf("%s/text/textract/%s", clientId, filename) + + mockS3.EXPECT(). + PutObject( + mock.Anything, + mock.MatchedBy(func(in *s3.PutObjectInput) bool { + return *in.Bucket == bucketName && *in.Key == expectedLocation + }), + mock.Anything, + ). + Return(&s3.PutObjectOutput{}, nil) + + PutTextractObject(t, ctx, cfg, PutObjectParams{ + ClientId: clientId, + Bucket: bucketName, + Filepath: filename, + File: file, + }) } diff --git a/internal/test/queue_test.go b/internal/test/queue_test.go index f528915d..ac335b46 100644 --- a/internal/test/queue_test.go +++ b/internal/test/queue_test.go @@ -6,6 +6,7 @@ import ( "testing" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/serviceconfig/queue" awsc "queryorchestration/internal/serviceconfig/aws" @@ -16,18 +17,21 @@ import ( "github.com/stretchr/testify/require" ) +type TestConfig struct { + serviceconfig.BaseConfig + objectstore.ObjectStoreConfig +} + func TestCreateQueue(t *testing.T) { if testing.Short() { t.Skip("Skipping long test in short mode") } ctx := context.Background() - cfg := &serviceconfig.BaseConfig{} + cfg := &TestConfig{} SetCfgProvider(t, cfg) - _, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, - }) + _, cleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{}) defer cleanup() err := cfg.SetQueueClient(ctx) @@ -43,12 +47,10 @@ func TestAssertMessageWait(t *testing.T) { } ctx := context.Background() - cfg := &serviceconfig.BaseConfig{} + cfg := &TestConfig{} SetCfgProvider(t, cfg) - _, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, - }) + _, cleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{}) defer cleanup() err := cfg.SetQueueClient(ctx) require.NoError(t, err) @@ -72,12 +74,10 @@ func TestAssertMessageBodyWait(t *testing.T) { } ctx := context.Background() - cfg := &serviceconfig.BaseConfig{} + cfg := &TestConfig{} SetCfgProvider(t, cfg) - _, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, - }) + _, cleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{}) defer cleanup() err := cfg.SetQueueClient(ctx) require.NoError(t, err) @@ -98,12 +98,10 @@ func TestAssertMessageAttrWait(t *testing.T) { } ctx := context.Background() - cfg := &serviceconfig.BaseConfig{} + cfg := &TestConfig{} SetCfgProvider(t, cfg) - _, cleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ - Cfg: cfg, - }) + _, cleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{}) defer cleanup() err := cfg.SetQueueClient(ctx) require.NoError(t, err) diff --git a/internal/test/runner.go b/internal/test/runner.go index b5a7e18d..93f55465 100644 --- a/internal/test/runner.go +++ b/internal/test/runner.go @@ -8,44 +8,52 @@ import ( doccleanrunner "queryorchestration/api/docCleanRunner" docinitrunner "queryorchestration/api/docInitRunner" docsyncrunner "queryorchestration/api/docSyncRunner" + doctextprocessrunner "queryorchestration/api/docTextProcessRunner" doctextrunner "queryorchestration/api/docTextRunner" queryrunner "queryorchestration/api/queryRunner" querysyncrunner "queryorchestration/api/querySyncRunner" queryversionsyncrunner "queryorchestration/api/queryVersionSyncRunner" + storeeventrunner "queryorchestration/api/storeEventRunner" "queryorchestration/internal/serviceconfig" "queryorchestration/internal/serviceconfig/queue/clientsync" "queryorchestration/internal/serviceconfig/queue/documentclean" "queryorchestration/internal/serviceconfig/queue/documentinit" "queryorchestration/internal/serviceconfig/queue/documentsync" - "queryorchestration/internal/serviceconfig/queue/documenttext" + "queryorchestration/internal/serviceconfig/queue/documenttextprocess" + "queryorchestration/internal/serviceconfig/queue/documenttexttrigger" "queryorchestration/internal/serviceconfig/queue/query" "queryorchestration/internal/serviceconfig/queue/querysync" "queryorchestration/internal/serviceconfig/queue/queryversionsync" + "queryorchestration/internal/serviceconfig/queue/storeevent" "github.com/testcontainers/testcontainers-go" ) -type RunnerName = string +type RunnerName string const ( + StoreEventRunnerName RunnerName = storeeventrunner.Name DocInitRunnerName RunnerName = docinitrunner.Name DocSyncRunnerName RunnerName = docsyncrunner.Name DocCleanRunnerName RunnerName = doccleanrunner.Name DocTextRunnerName RunnerName = doctextrunner.Name + DocTextProcessRunnerName RunnerName = doctextprocessrunner.Name QuerySyncRunnerName RunnerName = querysyncrunner.Name QueryRunnerName RunnerName = queryrunner.Name ClientSyncRunnerName RunnerName = clientsyncrunner.Name QueryVersionSyncRunnerName RunnerName = queryversionsyncrunner.Name ) -type RunnerEnv = string +type RunnerEnv string const ( + StoreEventRunnerEnv RunnerEnv = storeevent.EnvName DocInitRunnerEnv RunnerEnv = documentinit.EnvName DocSyncRunnerEnv RunnerEnv = documentsync.EnvName DocCleanRunnerEnv RunnerEnv = documentclean.EnvName - DocTextRunnerEnv RunnerEnv = documenttext.EnvName + DocTextRunnerEnv RunnerEnv = documenttexttrigger.EnvName + DocTextProcessRunnerEnv RunnerEnv = documenttextprocess.EnvName QuerySyncRunnerEnv RunnerEnv = querysync.EnvName QueryRunnerEnv RunnerEnv = query.EnvName ClientSyncRunnerEnv RunnerEnv = clientsync.EnvName @@ -59,12 +67,16 @@ type Runner struct { func GetRunnerEnvFromName(name RunnerName) RunnerEnv { switch name { + case StoreEventRunnerName: + return StoreEventRunnerEnv case DocSyncRunnerName: return DocSyncRunnerEnv case DocCleanRunnerName: return DocCleanRunnerEnv case DocTextRunnerName: return DocTextRunnerEnv + case DocTextProcessRunnerName: + return DocTextProcessRunnerEnv case QuerySyncRunnerName: return QuerySyncRunnerEnv case QueryRunnerName: @@ -78,22 +90,23 @@ func GetRunnerEnvFromName(name RunnerName) RunnerEnv { } type RunnerConfig struct { - Runner Runner - Cfg serviceconfig.ConfigProvider - Network *testcontainers.DockerNetwork + Runner Runner + Network *testcontainers.DockerNetwork + MockHTTP string } -func CreateRunner(t testing.TB, ctx context.Context, config *RunnerConfig) (*Container, func()) { +func CreateRunner(t testing.TB, ctx context.Context, cfg serviceconfig.ConfigProvider, config *RunnerConfig) (*Container, func()) { env := map[string]string{} - url := GetQueueURL(config.Cfg, config.Runner.Name) + url := GetQueueURL(cfg, config.Runner.Name) env["QUEUE_URL"] = url c, cleanup := createContainer(t, ctx, &containerConfig{ Network: config.Network, - Name: config.Runner.Name, + Name: string(config.Runner.Name), DownstreamQueues: config.Runner.DownstreamQueues, - Cfg: config.Cfg, + Cfg: cfg, Env: env, + MockHTTP: config.MockHTTP, WaitForMsg: "Listening to queue", }) @@ -103,6 +116,10 @@ func CreateRunner(t testing.TB, ctx context.Context, config *RunnerConfig) (*Con }, cleanup } +var StoreEventRunner = Runner{ + Name: StoreEventRunnerName, + DownstreamQueues: []RunnerName{DocInitRunnerName, DocTextProcessRunnerName}, +} var DocInitRunner = Runner{ Name: DocInitRunnerName, DownstreamQueues: []RunnerName{DocSyncRunnerName}, @@ -119,6 +136,10 @@ var DocTextRunner = Runner{ Name: DocTextRunnerName, DownstreamQueues: []RunnerName{QuerySyncRunnerName}, } +var DocTextProcessRunner = Runner{ + Name: DocTextProcessRunnerName, + DownstreamQueues: []RunnerName{QuerySyncRunnerName}, +} var QuerySyncRunner = Runner{ Name: QuerySyncRunnerName, DownstreamQueues: []RunnerName{QueryRunnerName}, @@ -137,10 +158,12 @@ var QueryVersionSyncRunner = Runner{ } var runners = []Runner{ + StoreEventRunner, DocInitRunner, DocSyncRunner, DocCleanRunner, DocTextRunner, + DocTextProcessRunner, QuerySyncRunner, QueryRunner, ClientSyncRunner, diff --git a/internal/test/runner_test.go b/internal/test/runner_test.go index 8badb446..8246a86b 100644 --- a/internal/test/runner_test.go +++ b/internal/test/runner_test.go @@ -4,8 +4,6 @@ import ( "context" "testing" - "queryorchestration/internal/serviceconfig" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -19,31 +17,28 @@ func TestCreateRunner(t *testing.T) { ncfg, ncleanup := CreateNetwork(t, ctx) defer ncleanup() - cfg := &serviceconfig.BaseConfig{} + cfg := &TestConfig{} SetCfgProvider(t, cfg) - _, qcleanup := CreateAWSContainer(t, ctx, &CreateAWSConfig{ + _, qcleanup := CreateAWSContainer(t, ctx, cfg, &CreateAWSConfig{ Network: ncfg, - Cfg: cfg, }) defer qcleanup() err := cfg.SetQueueClient(ctx) require.NoError(t, err) - _ = CreateQueue(t, ctx, cfg, QueryRunnerName) + _ = CreateQueue(t, ctx, cfg, string(QueryRunnerName)) - _, dbcleanup := CreateDB(t, ctx, &CreateDatabaseConfig{ + _, dbcleanup := CreateDB(t, ctx, cfg, &CreateDatabaseConfig{ Network: ncfg, - Cfg: cfg, }) defer dbcleanup() qccfg := &RunnerConfig{ Runner: QueryRunner, - Cfg: cfg, Network: ncfg, } - c, cleanup := CreateRunner(t, ctx, qccfg) + c, cleanup := CreateRunner(t, ctx, cfg, qccfg) assert.NotNil(t, cleanup) assert.NotNil(t, c) @@ -51,10 +46,12 @@ func TestCreateRunner(t *testing.T) { } func TestGetRunnerEnvFromName(t *testing.T) { + assert.Equal(t, StoreEventRunnerEnv, GetRunnerEnvFromName(StoreEventRunnerName)) assert.Equal(t, DocInitRunnerEnv, GetRunnerEnvFromName(DocInitRunnerName)) assert.Equal(t, DocSyncRunnerEnv, GetRunnerEnvFromName(DocSyncRunnerName)) assert.Equal(t, DocCleanRunnerEnv, GetRunnerEnvFromName(DocCleanRunnerName)) assert.Equal(t, DocTextRunnerEnv, GetRunnerEnvFromName(DocTextRunnerName)) + assert.Equal(t, DocTextProcessRunnerEnv, GetRunnerEnvFromName(DocTextProcessRunnerName)) assert.Equal(t, QuerySyncRunnerEnv, GetRunnerEnvFromName(QuerySyncRunnerName)) assert.Equal(t, QueryRunnerEnv, GetRunnerEnvFromName(QueryRunnerName)) assert.Equal(t, ClientSyncRunnerEnv, GetRunnerEnvFromName(ClientSyncRunnerName)) diff --git a/mocks/runner/mock_Controller.go b/mocks/runner/mock_Controller.go index fcb1915a..4915dd30 100644 --- a/mocks/runner/mock_Controller.go +++ b/mocks/runner/mock_Controller.go @@ -6,34 +6,32 @@ import ( context "context" mock "github.com/stretchr/testify/mock" - - types "github.com/aws/aws-sdk-go-v2/service/sqs/types" ) // MockController is an autogenerated mock type for the Controller type -type MockController struct { +type MockController[B interface{}] struct { mock.Mock } -type MockController_Expecter struct { +type MockController_Expecter[B interface{}] struct { mock *mock.Mock } -func (_m *MockController) EXPECT() *MockController_Expecter { - return &MockController_Expecter{mock: &_m.Mock} +func (_m *MockController[B]) EXPECT() *MockController_Expecter[B] { + return &MockController_Expecter[B]{mock: &_m.Mock} } -// Process provides a mock function with given fields: ctx, message -func (_m *MockController) Process(ctx context.Context, message *types.Message) bool { - ret := _m.Called(ctx, message) +// Process provides a mock function with given fields: ctx, body +func (_m *MockController[B]) Process(ctx context.Context, body B) bool { + ret := _m.Called(ctx, body) if len(ret) == 0 { panic("no return value specified for Process") } var r0 bool - if rf, ok := ret.Get(0).(func(context.Context, *types.Message) bool); ok { - r0 = rf(ctx, message) + if rf, ok := ret.Get(0).(func(context.Context, B) bool); ok { + r0 = rf(ctx, body) } else { r0 = ret.Get(0).(bool) } @@ -42,41 +40,41 @@ func (_m *MockController) Process(ctx context.Context, message *types.Message) b } // MockController_Process_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Process' -type MockController_Process_Call struct { +type MockController_Process_Call[B interface{}] struct { *mock.Call } // Process is a helper method to define mock.On call // - ctx context.Context -// - message *types.Message -func (_e *MockController_Expecter) Process(ctx interface{}, message interface{}) *MockController_Process_Call { - return &MockController_Process_Call{Call: _e.mock.On("Process", ctx, message)} +// - body B +func (_e *MockController_Expecter[B]) Process(ctx interface{}, body interface{}) *MockController_Process_Call[B] { + return &MockController_Process_Call[B]{Call: _e.mock.On("Process", ctx, body)} } -func (_c *MockController_Process_Call) Run(run func(ctx context.Context, message *types.Message)) *MockController_Process_Call { +func (_c *MockController_Process_Call[B]) Run(run func(ctx context.Context, body B)) *MockController_Process_Call[B] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(*types.Message)) + run(args[0].(context.Context), args[1].(B)) }) return _c } -func (_c *MockController_Process_Call) Return(_a0 bool) *MockController_Process_Call { +func (_c *MockController_Process_Call[B]) Return(_a0 bool) *MockController_Process_Call[B] { _c.Call.Return(_a0) return _c } -func (_c *MockController_Process_Call) RunAndReturn(run func(context.Context, *types.Message) bool) *MockController_Process_Call { +func (_c *MockController_Process_Call[B]) RunAndReturn(run func(context.Context, B) bool) *MockController_Process_Call[B] { _c.Call.Return(run) return _c } // NewMockController creates a new instance of MockController. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. -func NewMockController(t interface { +func NewMockController[B interface{}](t interface { mock.TestingT Cleanup(func()) -}) *MockController { - mock := &MockController{} +}) *MockController[B] { + mock := &MockController[B]{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/mocks/textract/mock_TextractClient.go b/mocks/textract/mock_TextractClient.go new file mode 100644 index 00000000..12baa577 --- /dev/null +++ b/mocks/textract/mock_TextractClient.go @@ -0,0 +1,778 @@ +// Code generated by mockery v2.52.3. DO NOT EDIT. + +package textractmock + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + textract "github.com/aws/aws-sdk-go-v2/service/textract" +) + +// MockTextractClient is an autogenerated mock type for the TextractClient type +type MockTextractClient struct { + mock.Mock +} + +type MockTextractClient_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTextractClient) EXPECT() *MockTextractClient_Expecter { + return &MockTextractClient_Expecter{mock: &_m.Mock} +} + +// AnalyzeDocument provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) AnalyzeDocument(ctx context.Context, params *textract.AnalyzeDocumentInput, opts ...func(*textract.Options)) (*textract.AnalyzeDocumentOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for AnalyzeDocument") + } + + var r0 *textract.AnalyzeDocumentOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.AnalyzeDocumentInput, ...func(*textract.Options)) (*textract.AnalyzeDocumentOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.AnalyzeDocumentInput, ...func(*textract.Options)) *textract.AnalyzeDocumentOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.AnalyzeDocumentOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.AnalyzeDocumentInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_AnalyzeDocument_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AnalyzeDocument' +type MockTextractClient_AnalyzeDocument_Call struct { + *mock.Call +} + +// AnalyzeDocument is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.AnalyzeDocumentInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) AnalyzeDocument(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_AnalyzeDocument_Call { + return &MockTextractClient_AnalyzeDocument_Call{Call: _e.mock.On("AnalyzeDocument", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_AnalyzeDocument_Call) Run(run func(ctx context.Context, params *textract.AnalyzeDocumentInput, opts ...func(*textract.Options))) *MockTextractClient_AnalyzeDocument_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.AnalyzeDocumentInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_AnalyzeDocument_Call) Return(_a0 *textract.AnalyzeDocumentOutput, _a1 error) *MockTextractClient_AnalyzeDocument_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_AnalyzeDocument_Call) RunAndReturn(run func(context.Context, *textract.AnalyzeDocumentInput, ...func(*textract.Options)) (*textract.AnalyzeDocumentOutput, error)) *MockTextractClient_AnalyzeDocument_Call { + _c.Call.Return(run) + return _c +} + +// AnalyzeExpense provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) AnalyzeExpense(ctx context.Context, params *textract.AnalyzeExpenseInput, opts ...func(*textract.Options)) (*textract.AnalyzeExpenseOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for AnalyzeExpense") + } + + var r0 *textract.AnalyzeExpenseOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.AnalyzeExpenseInput, ...func(*textract.Options)) (*textract.AnalyzeExpenseOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.AnalyzeExpenseInput, ...func(*textract.Options)) *textract.AnalyzeExpenseOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.AnalyzeExpenseOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.AnalyzeExpenseInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_AnalyzeExpense_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AnalyzeExpense' +type MockTextractClient_AnalyzeExpense_Call struct { + *mock.Call +} + +// AnalyzeExpense is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.AnalyzeExpenseInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) AnalyzeExpense(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_AnalyzeExpense_Call { + return &MockTextractClient_AnalyzeExpense_Call{Call: _e.mock.On("AnalyzeExpense", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_AnalyzeExpense_Call) Run(run func(ctx context.Context, params *textract.AnalyzeExpenseInput, opts ...func(*textract.Options))) *MockTextractClient_AnalyzeExpense_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.AnalyzeExpenseInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_AnalyzeExpense_Call) Return(_a0 *textract.AnalyzeExpenseOutput, _a1 error) *MockTextractClient_AnalyzeExpense_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_AnalyzeExpense_Call) RunAndReturn(run func(context.Context, *textract.AnalyzeExpenseInput, ...func(*textract.Options)) (*textract.AnalyzeExpenseOutput, error)) *MockTextractClient_AnalyzeExpense_Call { + _c.Call.Return(run) + return _c +} + +// AnalyzeID provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) AnalyzeID(ctx context.Context, params *textract.AnalyzeIDInput, opts ...func(*textract.Options)) (*textract.AnalyzeIDOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for AnalyzeID") + } + + var r0 *textract.AnalyzeIDOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.AnalyzeIDInput, ...func(*textract.Options)) (*textract.AnalyzeIDOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.AnalyzeIDInput, ...func(*textract.Options)) *textract.AnalyzeIDOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.AnalyzeIDOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.AnalyzeIDInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_AnalyzeID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AnalyzeID' +type MockTextractClient_AnalyzeID_Call struct { + *mock.Call +} + +// AnalyzeID is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.AnalyzeIDInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) AnalyzeID(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_AnalyzeID_Call { + return &MockTextractClient_AnalyzeID_Call{Call: _e.mock.On("AnalyzeID", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_AnalyzeID_Call) Run(run func(ctx context.Context, params *textract.AnalyzeIDInput, opts ...func(*textract.Options))) *MockTextractClient_AnalyzeID_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.AnalyzeIDInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_AnalyzeID_Call) Return(_a0 *textract.AnalyzeIDOutput, _a1 error) *MockTextractClient_AnalyzeID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_AnalyzeID_Call) RunAndReturn(run func(context.Context, *textract.AnalyzeIDInput, ...func(*textract.Options)) (*textract.AnalyzeIDOutput, error)) *MockTextractClient_AnalyzeID_Call { + _c.Call.Return(run) + return _c +} + +// DetectDocumentText provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) DetectDocumentText(ctx context.Context, params *textract.DetectDocumentTextInput, opts ...func(*textract.Options)) (*textract.DetectDocumentTextOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for DetectDocumentText") + } + + var r0 *textract.DetectDocumentTextOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.DetectDocumentTextInput, ...func(*textract.Options)) (*textract.DetectDocumentTextOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.DetectDocumentTextInput, ...func(*textract.Options)) *textract.DetectDocumentTextOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.DetectDocumentTextOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.DetectDocumentTextInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_DetectDocumentText_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetectDocumentText' +type MockTextractClient_DetectDocumentText_Call struct { + *mock.Call +} + +// DetectDocumentText is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.DetectDocumentTextInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) DetectDocumentText(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_DetectDocumentText_Call { + return &MockTextractClient_DetectDocumentText_Call{Call: _e.mock.On("DetectDocumentText", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_DetectDocumentText_Call) Run(run func(ctx context.Context, params *textract.DetectDocumentTextInput, opts ...func(*textract.Options))) *MockTextractClient_DetectDocumentText_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.DetectDocumentTextInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_DetectDocumentText_Call) Return(_a0 *textract.DetectDocumentTextOutput, _a1 error) *MockTextractClient_DetectDocumentText_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_DetectDocumentText_Call) RunAndReturn(run func(context.Context, *textract.DetectDocumentTextInput, ...func(*textract.Options)) (*textract.DetectDocumentTextOutput, error)) *MockTextractClient_DetectDocumentText_Call { + _c.Call.Return(run) + return _c +} + +// GetDocumentAnalysis provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) GetDocumentAnalysis(ctx context.Context, params *textract.GetDocumentAnalysisInput, opts ...func(*textract.Options)) (*textract.GetDocumentAnalysisOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetDocumentAnalysis") + } + + var r0 *textract.GetDocumentAnalysisOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.GetDocumentAnalysisInput, ...func(*textract.Options)) (*textract.GetDocumentAnalysisOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.GetDocumentAnalysisInput, ...func(*textract.Options)) *textract.GetDocumentAnalysisOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.GetDocumentAnalysisOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.GetDocumentAnalysisInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_GetDocumentAnalysis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDocumentAnalysis' +type MockTextractClient_GetDocumentAnalysis_Call struct { + *mock.Call +} + +// GetDocumentAnalysis is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.GetDocumentAnalysisInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) GetDocumentAnalysis(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_GetDocumentAnalysis_Call { + return &MockTextractClient_GetDocumentAnalysis_Call{Call: _e.mock.On("GetDocumentAnalysis", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_GetDocumentAnalysis_Call) Run(run func(ctx context.Context, params *textract.GetDocumentAnalysisInput, opts ...func(*textract.Options))) *MockTextractClient_GetDocumentAnalysis_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.GetDocumentAnalysisInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_GetDocumentAnalysis_Call) Return(_a0 *textract.GetDocumentAnalysisOutput, _a1 error) *MockTextractClient_GetDocumentAnalysis_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_GetDocumentAnalysis_Call) RunAndReturn(run func(context.Context, *textract.GetDocumentAnalysisInput, ...func(*textract.Options)) (*textract.GetDocumentAnalysisOutput, error)) *MockTextractClient_GetDocumentAnalysis_Call { + _c.Call.Return(run) + return _c +} + +// GetDocumentTextDetection provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) GetDocumentTextDetection(ctx context.Context, params *textract.GetDocumentTextDetectionInput, opts ...func(*textract.Options)) (*textract.GetDocumentTextDetectionOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetDocumentTextDetection") + } + + var r0 *textract.GetDocumentTextDetectionOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.GetDocumentTextDetectionInput, ...func(*textract.Options)) (*textract.GetDocumentTextDetectionOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.GetDocumentTextDetectionInput, ...func(*textract.Options)) *textract.GetDocumentTextDetectionOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.GetDocumentTextDetectionOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.GetDocumentTextDetectionInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_GetDocumentTextDetection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDocumentTextDetection' +type MockTextractClient_GetDocumentTextDetection_Call struct { + *mock.Call +} + +// GetDocumentTextDetection is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.GetDocumentTextDetectionInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) GetDocumentTextDetection(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_GetDocumentTextDetection_Call { + return &MockTextractClient_GetDocumentTextDetection_Call{Call: _e.mock.On("GetDocumentTextDetection", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_GetDocumentTextDetection_Call) Run(run func(ctx context.Context, params *textract.GetDocumentTextDetectionInput, opts ...func(*textract.Options))) *MockTextractClient_GetDocumentTextDetection_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.GetDocumentTextDetectionInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_GetDocumentTextDetection_Call) Return(_a0 *textract.GetDocumentTextDetectionOutput, _a1 error) *MockTextractClient_GetDocumentTextDetection_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_GetDocumentTextDetection_Call) RunAndReturn(run func(context.Context, *textract.GetDocumentTextDetectionInput, ...func(*textract.Options)) (*textract.GetDocumentTextDetectionOutput, error)) *MockTextractClient_GetDocumentTextDetection_Call { + _c.Call.Return(run) + return _c +} + +// GetExpenseAnalysis provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) GetExpenseAnalysis(ctx context.Context, params *textract.GetExpenseAnalysisInput, opts ...func(*textract.Options)) (*textract.GetExpenseAnalysisOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for GetExpenseAnalysis") + } + + var r0 *textract.GetExpenseAnalysisOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.GetExpenseAnalysisInput, ...func(*textract.Options)) (*textract.GetExpenseAnalysisOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.GetExpenseAnalysisInput, ...func(*textract.Options)) *textract.GetExpenseAnalysisOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.GetExpenseAnalysisOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.GetExpenseAnalysisInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_GetExpenseAnalysis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExpenseAnalysis' +type MockTextractClient_GetExpenseAnalysis_Call struct { + *mock.Call +} + +// GetExpenseAnalysis is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.GetExpenseAnalysisInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) GetExpenseAnalysis(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_GetExpenseAnalysis_Call { + return &MockTextractClient_GetExpenseAnalysis_Call{Call: _e.mock.On("GetExpenseAnalysis", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_GetExpenseAnalysis_Call) Run(run func(ctx context.Context, params *textract.GetExpenseAnalysisInput, opts ...func(*textract.Options))) *MockTextractClient_GetExpenseAnalysis_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.GetExpenseAnalysisInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_GetExpenseAnalysis_Call) Return(_a0 *textract.GetExpenseAnalysisOutput, _a1 error) *MockTextractClient_GetExpenseAnalysis_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_GetExpenseAnalysis_Call) RunAndReturn(run func(context.Context, *textract.GetExpenseAnalysisInput, ...func(*textract.Options)) (*textract.GetExpenseAnalysisOutput, error)) *MockTextractClient_GetExpenseAnalysis_Call { + _c.Call.Return(run) + return _c +} + +// StartDocumentAnalysis provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) StartDocumentAnalysis(ctx context.Context, params *textract.StartDocumentAnalysisInput, opts ...func(*textract.Options)) (*textract.StartDocumentAnalysisOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for StartDocumentAnalysis") + } + + var r0 *textract.StartDocumentAnalysisOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.StartDocumentAnalysisInput, ...func(*textract.Options)) (*textract.StartDocumentAnalysisOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.StartDocumentAnalysisInput, ...func(*textract.Options)) *textract.StartDocumentAnalysisOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.StartDocumentAnalysisOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.StartDocumentAnalysisInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_StartDocumentAnalysis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartDocumentAnalysis' +type MockTextractClient_StartDocumentAnalysis_Call struct { + *mock.Call +} + +// StartDocumentAnalysis is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.StartDocumentAnalysisInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) StartDocumentAnalysis(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_StartDocumentAnalysis_Call { + return &MockTextractClient_StartDocumentAnalysis_Call{Call: _e.mock.On("StartDocumentAnalysis", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_StartDocumentAnalysis_Call) Run(run func(ctx context.Context, params *textract.StartDocumentAnalysisInput, opts ...func(*textract.Options))) *MockTextractClient_StartDocumentAnalysis_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.StartDocumentAnalysisInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_StartDocumentAnalysis_Call) Return(_a0 *textract.StartDocumentAnalysisOutput, _a1 error) *MockTextractClient_StartDocumentAnalysis_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_StartDocumentAnalysis_Call) RunAndReturn(run func(context.Context, *textract.StartDocumentAnalysisInput, ...func(*textract.Options)) (*textract.StartDocumentAnalysisOutput, error)) *MockTextractClient_StartDocumentAnalysis_Call { + _c.Call.Return(run) + return _c +} + +// StartDocumentTextDetection provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) StartDocumentTextDetection(ctx context.Context, params *textract.StartDocumentTextDetectionInput, opts ...func(*textract.Options)) (*textract.StartDocumentTextDetectionOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for StartDocumentTextDetection") + } + + var r0 *textract.StartDocumentTextDetectionOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.StartDocumentTextDetectionInput, ...func(*textract.Options)) (*textract.StartDocumentTextDetectionOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.StartDocumentTextDetectionInput, ...func(*textract.Options)) *textract.StartDocumentTextDetectionOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.StartDocumentTextDetectionOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.StartDocumentTextDetectionInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_StartDocumentTextDetection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartDocumentTextDetection' +type MockTextractClient_StartDocumentTextDetection_Call struct { + *mock.Call +} + +// StartDocumentTextDetection is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.StartDocumentTextDetectionInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) StartDocumentTextDetection(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_StartDocumentTextDetection_Call { + return &MockTextractClient_StartDocumentTextDetection_Call{Call: _e.mock.On("StartDocumentTextDetection", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_StartDocumentTextDetection_Call) Run(run func(ctx context.Context, params *textract.StartDocumentTextDetectionInput, opts ...func(*textract.Options))) *MockTextractClient_StartDocumentTextDetection_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.StartDocumentTextDetectionInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_StartDocumentTextDetection_Call) Return(_a0 *textract.StartDocumentTextDetectionOutput, _a1 error) *MockTextractClient_StartDocumentTextDetection_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_StartDocumentTextDetection_Call) RunAndReturn(run func(context.Context, *textract.StartDocumentTextDetectionInput, ...func(*textract.Options)) (*textract.StartDocumentTextDetectionOutput, error)) *MockTextractClient_StartDocumentTextDetection_Call { + _c.Call.Return(run) + return _c +} + +// StartExpenseAnalysis provides a mock function with given fields: ctx, params, opts +func (_m *MockTextractClient) StartExpenseAnalysis(ctx context.Context, params *textract.StartExpenseAnalysisInput, opts ...func(*textract.Options)) (*textract.StartExpenseAnalysisOutput, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for StartExpenseAnalysis") + } + + var r0 *textract.StartExpenseAnalysisOutput + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *textract.StartExpenseAnalysisInput, ...func(*textract.Options)) (*textract.StartExpenseAnalysisOutput, error)); ok { + return rf(ctx, params, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *textract.StartExpenseAnalysisInput, ...func(*textract.Options)) *textract.StartExpenseAnalysisOutput); ok { + r0 = rf(ctx, params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*textract.StartExpenseAnalysisOutput) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *textract.StartExpenseAnalysisInput, ...func(*textract.Options)) error); ok { + r1 = rf(ctx, params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockTextractClient_StartExpenseAnalysis_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartExpenseAnalysis' +type MockTextractClient_StartExpenseAnalysis_Call struct { + *mock.Call +} + +// StartExpenseAnalysis is a helper method to define mock.On call +// - ctx context.Context +// - params *textract.StartExpenseAnalysisInput +// - opts ...func(*textract.Options) +func (_e *MockTextractClient_Expecter) StartExpenseAnalysis(ctx interface{}, params interface{}, opts ...interface{}) *MockTextractClient_StartExpenseAnalysis_Call { + return &MockTextractClient_StartExpenseAnalysis_Call{Call: _e.mock.On("StartExpenseAnalysis", + append([]interface{}{ctx, params}, opts...)...)} +} + +func (_c *MockTextractClient_StartExpenseAnalysis_Call) Run(run func(ctx context.Context, params *textract.StartExpenseAnalysisInput, opts ...func(*textract.Options))) *MockTextractClient_StartExpenseAnalysis_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]func(*textract.Options), len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(func(*textract.Options)) + } + } + run(args[0].(context.Context), args[1].(*textract.StartExpenseAnalysisInput), variadicArgs...) + }) + return _c +} + +func (_c *MockTextractClient_StartExpenseAnalysis_Call) Return(_a0 *textract.StartExpenseAnalysisOutput, _a1 error) *MockTextractClient_StartExpenseAnalysis_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockTextractClient_StartExpenseAnalysis_Call) RunAndReturn(run func(context.Context, *textract.StartExpenseAnalysisInput, ...func(*textract.Options)) (*textract.StartExpenseAnalysisOutput, error)) *MockTextractClient_StartExpenseAnalysis_Call { + _c.Call.Return(run) + return _c +} + +// NewMockTextractClient creates a new instance of MockTextractClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockTextractClient(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTextractClient { + mock := &MockTextractClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/queryAPI/api.gen.go b/pkg/queryAPI/api.gen.go index bf87e3b1..33eb75c9 100644 --- a/pkg/queryAPI/api.gen.go +++ b/pkg/queryAPI/api.gen.go @@ -87,9 +87,6 @@ type ClientStatusBody struct { Status ClientStatus `json:"status"` } -// ClientUID The client internal unique id -type ClientUID = openapi_types.UUID - // ClientUpdate The properties that may be updated. type ClientUpdate struct { // CanSync If the client is allowing active syncs @@ -163,9 +160,6 @@ type DocClient struct { // Name The client name Name ClientName `json:"name"` - - // Uid The client internal unique id - Uid ClientUID `json:"uid"` } // Document The document properties. diff --git a/scripts/Taskfile.yml b/scripts/Taskfile.yml index 6c04fc60..bc9eb048 100644 --- a/scripts/Taskfile.yml +++ b/scripts/Taskfile.yml @@ -83,3 +83,4 @@ tasks: run: once cmds: - gomarkdoc --template-file file=docs/templates/root.gotxt ./cmd/... + aws:login: aws sso login diff --git a/scripts/local-deployments.yml b/scripts/local-deployments.yml index b7452e81..50f46b13 100644 --- a/scripts/local-deployments.yml +++ b/scripts/local-deployments.yml @@ -57,10 +57,12 @@ tasks: init: cmds: - aws s3 mb s3://$BUCKET_IN + - aws sqs create-queue --queue-name $QNAME_STORE_EVENT - aws sqs create-queue --queue-name $QNAME_DOCUMENT_INIT - aws sqs create-queue --queue-name $QNAME_DOCUMENT_SYNC - aws sqs create-queue --queue-name $QNAME_DOCUMENT_CLEAN - - aws sqs create-queue --queue-name $QNAME_DOCUMENT_TEXT + - aws sqs create-queue --queue-name $QNAME_DOCUMENT_TEXT_TRIGGER + - aws sqs create-queue --queue-name $QNAME_DOCUMENT_TEXT_PROCESS - aws sqs create-queue --queue-name $QNAME_QUERY_SYNC - aws sqs create-queue --queue-name $QNAME_QUERY_RUNNER - aws sqs create-queue --queue-name $QNAME_CLIENT_SYNC @@ -70,7 +72,7 @@ tasks: --bucket $BUCKET_IN \ --notification-configuration '{ "QueueConfigurations": [{ - "QueueArn": "arn:aws:sqs:us-east-1:000000000000:document_init", + "QueueArn": "arn:aws:sqs:us-east-1:000000000000:store_event", "Events": ["s3:ObjectCreated:Put"] }] }' diff --git a/scripts/tests.yml b/scripts/tests.yml index 0a70b4d0..73201351 100644 --- a/scripts/tests.yml +++ b/scripts/tests.yml @@ -38,6 +38,11 @@ tasks: vars: CLI_ARGS: -short SKIP_GENERATE: true + unit:aws: + cmds: + - | + find ./internal -name "*.aws_test.go" -exec dirname {} \; | sort -u \ + | xargs go test -short -tags aws unit: vars: TMP_FILE: "{{.OUT_DIR}}/coverage.tmp" diff --git a/serviceAPIs/queryAPI.yaml b/serviceAPIs/queryAPI.yaml index 9b052b00..34ad2068 100644 --- a/serviceAPIs/queryAPI.yaml +++ b/serviceAPIs/queryAPI.yaml @@ -602,13 +602,6 @@ components: maxLength: 36 pattern: "^.+$" - ClientUID: - type: string - format: uuid - description: The client internal unique id - example: 0195853c-8fdd-77cd-b36c-255241bddd33 - maxLength: 36 - QueryID: type: string format: uuid @@ -748,8 +741,6 @@ components: description: The properties of a client. type: object properties: - uid: - $ref: "#/components/schemas/ClientUID" id: $ref: "#/components/schemas/ClientID" name: @@ -758,7 +749,6 @@ components: $ref: "#/components/schemas/ClientCanSync" required: - id - - uid - name - can_sync @@ -1023,9 +1013,9 @@ components: output_location: type: string description: The location in which the export zip file will be found. - example: s3://abc/AA/20250213/019587ac-073b-7098-8426-bad970f8c974.csv + example: s3://a/A/export/20250213/uuid.csv maxLength: 2048 - pattern: '^s3://.+/.+/[0-9]{8}/.+\.csv$' + pattern: '^s3://.+/.+/export/[0-9]{8}/.+\.csv$' description: Payload for export trigger response. required: - client_id diff --git a/test/process_test.go b/test/process_test.go index 14a84213..2ab86191 100644 --- a/test/process_test.go +++ b/test/process_test.go @@ -7,6 +7,7 @@ import ( "testing" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/aws" "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/test" queryapitest "queryorchestration/internal/test/queryAPI" @@ -17,15 +18,16 @@ import ( "github.com/stretchr/testify/require" ) -type ProcessConfig struct { +type Config struct { serviceconfig.BaseConfig + aws.AWSConfig objectstore.ObjectStoreConfig } func TestProcess(t *testing.T) { ctx := context.Background() - cfg := &ProcessConfig{} + cfg := &Config{} test.SetCfgProvider(t, cfg) net, clean := test.CreateFullNetwork(t, ctx, cfg) @@ -61,10 +63,29 @@ func TestProcess(t *testing.T) { queryapitest.WaitForClientStatus(t, ctx, net.Client, client.Id, queryapi.INSYNC) + filename := "objectname" + expectation := test.CreateStartDocTextDetectionExpectation(t, net.Dependencies.MockServer, test.StartDocTextDetectionExpectationParams{ + Bucket: net.Dependencies.BucketName, + ClientID: client.Id, + Filename: filename, + JobID: "textractId", + }) + body := strings.NewReader(pdfHelloWorld) - test.PutObject(t, ctx, cfg, client.Uid, net.Dependencies.BucketName, "objectname", body) + test.PutImportObject(t, ctx, cfg, test.PutObjectParams{ + ClientId: client.Id, + Bucket: net.Dependencies.BucketName, + Filepath: filename, + File: body, + }) queryapitest.WaitForClientStatus(t, ctx, net.Client, client.Id, queryapi.NOTSYNCED) + + test.WaitForMockTextractOutput(t, ctx, cfg, net.Dependencies.MockServer, test.TextractOutputParams{ + Request: expectation.Request, + File: body, + }) + queryapitest.WaitForClientStatus(t, ctx, net.Client, client.Id, queryapi.INSYNC) docs, err := net.Client.ListDocumentsByClientIdWithResponse(ctx, client.Id) @@ -76,7 +97,7 @@ func TestProcess(t *testing.T) { Id: doc.Id, Hash: doc.Hash, ClientId: client.Id, - Fields: map[string]interface{}{ + Fields: map[string]any{ "JSON_QUERY": "valueone", }, } @@ -95,7 +116,7 @@ func TestProcess(t *testing.T) { Config: &jcfg, }) require.NoError(t, err) - expectedDoc.Fields = map[string]interface{}{ + expectedDoc.Fields = map[string]any{ "JSON_QUERY": "valuetwo", } diff --git a/test/queryAPI/accessory_test.go b/test/queryAPI/accessory_test.go index 9312546e..abd01b03 100644 --- a/test/queryAPI/accessory_test.go +++ b/test/queryAPI/accessory_test.go @@ -16,7 +16,10 @@ import ( func TestQueryAPIAccessories(t *testing.T) { ctx := context.Background() - c, cleanup := test.CreateAPINetwork(t, ctx, &test.ServiceNetworkConfig{ + cfg := &Config{} + test.SetCfgProvider(t, cfg) + + c, cleanup := test.CreateAPINetwork(t, ctx, cfg, &test.ServiceNetworkConfig{ API: test.QueryAPI, }) defer cleanup() diff --git a/test/queryAPI/client_test.go b/test/queryAPI/client_test.go index 2ada2612..5a65e810 100644 --- a/test/queryAPI/client_test.go +++ b/test/queryAPI/client_test.go @@ -1,4 +1,4 @@ -package endtoend +package endtoend_test import ( "context" @@ -15,7 +15,10 @@ import ( func TestClient(t *testing.T) { ctx := context.Background() - c, cleanup := test.CreateAPINetwork(t, ctx, &test.ServiceNetworkConfig{ + cfg := &Config{} + test.SetCfgProvider(t, cfg) + + c, cleanup := test.CreateAPINetwork(t, ctx, cfg, &test.ServiceNetworkConfig{ API: test.QueryAPI, }) defer cleanup() diff --git a/test/queryAPI/collectorservice_test.go b/test/queryAPI/collectorservice_test.go index 9e6a229a..e1fc4319 100644 --- a/test/queryAPI/collectorservice_test.go +++ b/test/queryAPI/collectorservice_test.go @@ -1,4 +1,4 @@ -package endtoend +package endtoend_test import ( "context" @@ -6,6 +6,8 @@ import ( "testing" "queryorchestration/internal/serviceconfig" + "queryorchestration/internal/serviceconfig/aws" + "queryorchestration/internal/serviceconfig/objectstore" "queryorchestration/internal/serviceconfig/queue" "queryorchestration/internal/test" queryapi "queryorchestration/pkg/queryAPI" @@ -16,32 +18,24 @@ import ( "github.com/stretchr/testify/assert" ) -type CollectorConfig struct { +type Config struct { serviceconfig.BaseConfig + aws.AWSConfig queue.QueueConfig + objectstore.ObjectStoreConfig } func TestCollectorService(t *testing.T) { ctx := context.Background() - cfg := &CollectorConfig{} + cfg := &Config{} test.SetCfgProvider(t, cfg) - network, ncleanup := test.CreateNetwork(t, ctx) - defer ncleanup() - - _, clean := test.CreateAWSContainer(t, ctx, &test.CreateAWSConfig{ - Cfg: cfg, - Network: network, - }) + deps, clean := test.CreateFullDependencies(t, ctx, cfg) defer clean() - test.SetQueueClient(t, ctx, cfg) - clientsyncurl := test.CreateQueue(t, ctx, cfg, test.ClientSyncRunnerName) - - c, cleanup := test.CreateAPINetwork(t, ctx, &test.ServiceNetworkConfig{ - Cfg: cfg, - Network: network, + c, cleanup := test.CreateAPINetwork(t, ctx, cfg, &test.ServiceNetworkConfig{ + Network: deps.Network, API: test.QueryAPI, }) defer cleanup() @@ -107,5 +101,5 @@ func TestCollectorService(t *testing.T) { assert.Len(t, collRes.JSON200.Fields, 1) assert.ElementsMatch(t, fields, collRes.JSON200.Fields) - test.AssertMessageBody(t, ctx, cfg, clientsyncurl, regexp.MustCompile(`{"id":".+"}`)) + test.AssertMessageBody(t, ctx, cfg, deps.QueueURLs[test.ClientSyncRunnerName], regexp.MustCompile(`{"id":".+"}`)) } diff --git a/test/queryAPI/exportservice_test.go b/test/queryAPI/exportservice_test.go index f3746f09..4395df00 100644 --- a/test/queryAPI/exportservice_test.go +++ b/test/queryAPI/exportservice_test.go @@ -1,4 +1,4 @@ -package endtoend +package endtoend_test import ( "context" @@ -15,7 +15,10 @@ import ( func TestExportService(t *testing.T) { ctx := context.Background() - c, cleanup := test.CreateAPINetwork(t, ctx, &test.ServiceNetworkConfig{ + cfg := &Config{} + test.SetCfgProvider(t, cfg) + + c, cleanup := test.CreateAPINetwork(t, ctx, cfg, &test.ServiceNetworkConfig{ API: test.QueryAPI, }) defer cleanup() diff --git a/test/queryAPI/queryservice_test.go b/test/queryAPI/queryservice_test.go index 0efe6109..a0832372 100644 --- a/test/queryAPI/queryservice_test.go +++ b/test/queryAPI/queryservice_test.go @@ -5,8 +5,6 @@ import ( "regexp" "testing" - "queryorchestration/internal/serviceconfig" - "queryorchestration/internal/serviceconfig/queue" "queryorchestration/internal/test" queryapi "queryorchestration/pkg/queryAPI" @@ -16,33 +14,17 @@ import ( "github.com/stretchr/testify/assert" ) -type QueryConfig struct { - serviceconfig.BaseConfig - queue.QueueConfig -} - func TestQueryAPI(t *testing.T) { ctx := context.Background() - cfg := &QueryConfig{} + cfg := &Config{} test.SetCfgProvider(t, cfg) - network, ncleanup := test.CreateNetwork(t, ctx) - defer ncleanup() - - _, clean := test.CreateAWSContainer(t, ctx, &test.CreateAWSConfig{ - Cfg: cfg, - Network: network, - }) + deps, clean := test.CreateFullDependencies(t, ctx, cfg) defer clean() - err := cfg.SetQueueClient(ctx) - require.NoError(t, err) - queryversionsyncurl := test.CreateQueue(t, ctx, cfg, test.QueryVersionSyncRunnerName) - - c, cleanup := test.CreateAPINetwork(t, ctx, &test.ServiceNetworkConfig{ - Cfg: cfg, - Network: network, + c, cleanup := test.CreateAPINetwork(t, ctx, cfg, &test.ServiceNetworkConfig{ + Network: deps.Network, API: test.QueryAPI, }) defer cleanup() @@ -92,7 +74,7 @@ func TestQueryAPI(t *testing.T) { require.NoError(t, err) assert.NotNil(t, res) - test.AssertMessageBody(t, ctx, cfg, queryversionsyncurl, regexp.MustCompile(`{"id":".+"}`)) + test.AssertMessageBody(t, ctx, cfg, deps.QueueURLs[test.QueryVersionSyncRunnerName], regexp.MustCompile(`{"id":".+"}`)) queryRes, err = client.GetQueryWithResponse(ctx, jsonID) require.NoError(t, err)