diff --git a/bcda/service/config.go b/bcda/service/config.go index 2e687325f..2fb77860e 100644 --- a/bcda/service/config.go +++ b/bcda/service/config.go @@ -46,7 +46,7 @@ type Config struct { type RunoutConfig struct { CutoffDurationDays int `conf:"RUNOUT_CUTOFF_DATE_DAYS" conf_default:"180"` - ClaimThruDate string `conf:"RUNOUT_CLAIM_THRU_DATE" conf_default:"2020-12-31"` + ClaimThruDate string `conf:"RUNOUT_CLAIM_THRU_DATE" conf_default:"2024-12-31"` // Un-exported fields that are computed using the exported ones above cutoffDuration time.Duration claimThru time.Time diff --git a/test/postman_test/BCDA_PAC_Postman_Smoke_Tests.postman_collection.json b/test/postman_test/BCDA_PAC_Postman_Smoke_Tests.postman_collection.json index 5133eee52..7c0d8802b 100644 --- a/test/postman_test/BCDA_PAC_Postman_Smoke_Tests.postman_collection.json +++ b/test/postman_test/BCDA_PAC_Postman_Smoke_Tests.postman_collection.json @@ -1142,15 +1142,12 @@ "var maintenanceMode = pm.globals.get(\"maintenanceMode\");", "", "var maintenanceModeEOYTest = function () {", - " pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", - " });", - "", - " pm.test(\"Has Content-Location header\", function () {", - " pm.response.to.have.header(\"Content-Location\");", + " console.log(\"EOY mode is enabled - Expect 500 due to no file attributions found\");", + " pm.test(\"Status code is 500\", function () {", + " pm.response.to.have.status(500);", " });", "", - " pm.environment.set(\"smokeTestGroupRunoutEOBJobUrl\", pm.response.headers.get(\"Content-Location\"));", + " pm.environment.set(\"smokeTestGroupRunoutEOBJobUrl\", \"https://bcda.cms.gov\");", "};", "", "const maintenanceModeTest = function () {", @@ -1217,38 +1214,45 @@ "listen": "prerequest", "script": { "exec": [ - "const retryDelay = 5000;", - "const maxRetries = 20;", + "var maintenanceMode = pm.globals.get(\"maintenanceMode\");", "", - "var eobJobReq = {", - " url: pm.environment.get(\"smokeTestGroupRunoutEOBJobUrl\"),", - " method: \"GET\",", - " header: \"Authorization: Bearer \" + pm.environment.get(\"token\")", - "};", + "if (maintenanceMode === \"eoy\") {", + " console.log(\"EOY mode is enabled - Skipping due to previous 500, see above test.\");", + " return;", + "} else {", + " const retryDelay = 5000;", + " const maxRetries = 20;", "", - "function awaitExportJob(retryCount) {", - " pm.sendRequest(eobJobReq, function (err, response) {", - " if (err) {", - " console.error(err);", - " } else if (response.code == 202) {", - " pm.test(\"X-Progress header is Pending or In Progress\", function() {", - " pm.expect(/^(Pending|In Progress \\(\\d{1,3}%\\))$/.test(response.headers.get(\"X-Progress\"))).to.be.true;", - " });", - " if (retryCount < maxRetries) {", - " console.log(\"Group/runout export still in progress. Retrying...\");", - " setTimeout(function() {", - " awaitExportJob(++retryCount);", - " }, retryDelay);", + " var eobJobReq = {", + " url: pm.environment.get(\"smokeTestGroupRunoutEOBJobUrl\"),", + " method: \"GET\",", + " header: \"Authorization: Bearer \" + pm.environment.get(\"token\")", + " };", + "", + " function awaitExportJob(retryCount) {", + " pm.sendRequest(eobJobReq, function (err, response) {", + " if (err) {", + " console.error(err);", + " } else if (response.code == 202) {", + " pm.test(\"X-Progress header is Pending or In Progress\", function() {", + " pm.expect(/^(Pending|In Progress \\(\\d{1,3}%\\))$/.test(response.headers.get(\"X-Progress\"))).to.be.true;", + " });", + " if (retryCount < maxRetries) {", + " console.log(\"Group/runout export still in progress. Retrying...\");", + " setTimeout(function() {", + " awaitExportJob(++retryCount);", + " }, retryDelay);", + " } else {", + " console.log(\"Retry limit reached for Group/runout job status.\");", + " postman.setNextRequest(null);", + " }", + " } else if (response.code == 200) {", + " console.log(\"Group/runout export job complete.\");", " } else {", - " console.log(\"Retry limit reached for Group/runout job status.\");", - " postman.setNextRequest(null);", + " console.error(\"Unexpected response from Group/runout export job: \" + response.status);", " }", - " } else if (response.code == 200) {", - " console.log(\"Group/runout export job complete.\");", - " } else {", - " console.error(\"Unexpected response from Group/runout export job: \" + response.status);", - " }", - " });", + " });", + " }", "}", "", "awaitExportJob(1);" @@ -1267,53 +1271,7 @@ " pm.expect(pm.response.code).to.be.oneOf([202, 200]);", " });", "", - " if (pm.response.code === 202) {", - " pm.test(\"X-Progress header is Pending or In Progress\", function () {", - " pm.expect(/^(Pending|In Progress \\(\\d{1,3}%\\))$/.test(pm.response.headers.get(\"X-Progress\"))).to.be.true;", - " });", - " } else if (pm.response.code === 200) {", - " const schema = {", - " \"properties\": {", - " \"transactionTime\": {", - " \"type\": \"string\"", - " },", - " \"request\": {", - " \"type\": \"string\"", - " },", - " \"requiresAccessToken\": {", - " \"type\": \"boolean\"", - " },", - " \"output\": {", - " \"type\": \"array\"", - " },", - " \"error\": {", - " \"type\": \"array\"", - " }", - " }", - " };", - "", - " var respJson = pm.response.json();", - "", - " pm.test(\"Schema is valid\", function () {", - " pm.expect(tv4.validate(respJson, schema)).to.be.true;", - " });", - "", - " pm.test(\"Contains Required Resources\", () => {", - " const requiredResources = [\"ExplanationOfBenefit\"];", - " const otherResources = [\"Patient\", \"Coverage\", \"Claim\", \"ClaimResponse\"];", - " const returnedResources = respJson.output.map(r => r.type);", - "", - " for (const resource of requiredResources) {", - " pm.expect(returnedResources, resource + \" is required\").to.include(resource);", - " }", - "", - " for (const resource of otherResources) {", - " pm.expect(returnedResources, resource + \" resource type should not be returned\").to.not.include(resource);", - " }", - " });", - "", - " pm.environment.set(\"smokeTestGroupRunoutEOBDataUrl\", respJson.output[0].url);", - " }", + " pm.environment.set(\"smokeTestGroupRunoutEOBDataUrl\", \"https://bcda.cms.gov\");", "};", "", "const maintenanceModeTest = function () {", diff --git a/test/postman_test/BCDA_Postman_Smoke_Tests.postman_collection.json b/test/postman_test/BCDA_Postman_Smoke_Tests.postman_collection.json index cbfebbd84..8dd7a8fea 100644 --- a/test/postman_test/BCDA_Postman_Smoke_Tests.postman_collection.json +++ b/test/postman_test/BCDA_Postman_Smoke_Tests.postman_collection.json @@ -68,29 +68,20 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", + "pm.test(\"Status code is 401\", function() {", + " pm.response.to.have.status(401);", + "});", "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient/$export request\");\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 401\", function() {", - " pm.response.to.have.status(401);", - " });", + "var respJson = pm.response.json();", "", + "pm.test(\"Resource type is OperationOutcome\", function() {", " var respJson = pm.response.json();", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " var respJson = pm.response.json();", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", - "", - " pm.test(\"Diagnostics is Invalid Token\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", - " });", - "}" + "pm.test(\"Diagnostics is Invalid Token\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", + "});" ], "type": "text/javascript" } @@ -223,27 +214,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient/all endpoint request\");\t\t\t\t ", - " pm.environment.set(\"smokeTestPatientJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"smokeTestPatientJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"smokeTestPatientJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -515,27 +494,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Group/all endpoint request\");\t\t\t\t ", - " pm.environment.set(\"smokeTestGroupAllJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function () {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function () {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function () {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function () {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"smokeTestGroupAllJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"smokeTestGroupAllJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } diff --git a/test/postman_test/BCDA_Tests_Sequential.postman_collection.json b/test/postman_test/BCDA_Tests_Sequential.postman_collection.json index b699e4cae..6658e7143 100644 --- a/test/postman_test/BCDA_Tests_Sequential.postman_collection.json +++ b/test/postman_test/BCDA_Tests_Sequential.postman_collection.json @@ -204,28 +204,19 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient endpoint request\");\t\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 401\", function() {", - " pm.response.to.have.status(401);", - " });", + "pm.test(\"Status code is 401\", function() {", + " pm.response.to.have.status(401);", + "});", "", - " var respJson = pm.response.json();", + "var respJson = pm.response.json();", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", + "pm.test(\"Resource type is OperationOutcome\", function() {", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Issue details code is Invalid Token\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", - " });", - "}" + "pm.test(\"Issue details code is Invalid Token\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", + "});" ], "type": "text/javascript" } @@ -270,29 +261,20 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", + "pm.test(\"Status code is 401\", function() {", + " pm.response.to.have.status(401);", + "});", "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient EOB endpoint request\");\t\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 401\", function() {", - " pm.response.to.have.status(401);", - " });", + "var respJson = pm.response.json();", "", + "pm.test(\"Resource type is OperationOutcome\", function() {", " var respJson = pm.response.json();", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " var respJson = pm.response.json();", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", - "", - " pm.test(\"Issue details code is Invalid Token\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", - " });", - "}" + "pm.test(\"Issue details code is Invalid Token\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", + "});" ], "type": "text/javascript" } @@ -337,28 +319,19 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient Coverage endpoint request\");\t\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 401\", function() {", - " pm.response.to.have.status(401);", - " });", + "pm.test(\"Status code is 401\", function() {", + " pm.response.to.have.status(401);", + "});", "", - " var respJson = pm.response.json();", + "var respJson = pm.response.json();", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", + "pm.test(\"Resource type is OperationOutcome\", function() {", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Issue details code is Invalid Token\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", - " });", - "}" + "pm.test(\"Issue details code is Invalid Token\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", + "});" ], "type": "text/javascript" } @@ -535,29 +508,20 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", + "pm.test(\"Status code is 401\", function() {", + " pm.response.to.have.status(401);", + "});", "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient EOB endpoint request\");\t\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 401\", function() {", - " pm.response.to.have.status(401);", - " });", + "var respJson = pm.response.json();", "", + "pm.test(\"Resource type is OperationOutcome\", function() {", " var respJson = pm.response.json();", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " var respJson = pm.response.json();", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", - "", - " pm.test(\"Issue details code is Invalid Token\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", - " });", - "}" + "pm.test(\"Issue details code is Invalid Token\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", + "});" ], "type": "text/javascript" } @@ -602,28 +566,19 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient endpoint request\");\t\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 401\", function() {", - " pm.response.to.have.status(401);", - " });", + "pm.test(\"Status code is 401\", function() {", + " pm.response.to.have.status(401);", + "});", "", - " var respJson = pm.response.json();", + "var respJson = pm.response.json();", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", + "pm.test(\"Resource type is OperationOutcome\", function() {", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Issue details code is Invalid Token\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", - " });", - "}" + "pm.test(\"Issue details code is Invalid Token\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", + "});" ], "type": "text/javascript" } @@ -668,28 +623,19 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient Coverage endpoint request\");\t\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 401\", function() {", - " pm.response.to.have.status(401);", - " });", + "pm.test(\"Status code is 401\", function() {", + " pm.response.to.have.status(401);", + "});", "", - " var respJson = pm.response.json();", + "var respJson = pm.response.json();", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", + "pm.test(\"Resource type is OperationOutcome\", function() {", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Issue details code is Invalid Token\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", - " });", - "}" + "pm.test(\"Issue details code is Invalid Token\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.eql(\"Invalid Token\")", + "});" ], "type": "text/javascript" } @@ -1088,25 +1034,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient EOB endpoint request\");\t", - " pm.environment.set(\"eobJobUrl\", \"https://bcda.cms.gov\")\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"eobJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"eobJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -1213,25 +1149,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient EOB endpoint request\");\t", - " pm.environment.set(\"eobv2JobUrl\", \"https://bcda.cms.gov\")\t\t", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"eobv2JobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"eobv2JobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -1343,27 +1269,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient endpoint request\");\t\t\t\t ", - " pm.environment.set(\"patientJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"patientJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"patientJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -1415,26 +1329,14 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient coverage endpoint request\");\t\t\t\t ", - " pm.environment.set(\"coverageJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", - " pm.environment.set(\"coverageJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", + "pm.environment.set(\"coverageJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -1553,27 +1455,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient EOB endpoint request\");\t\t\t\t ", - " pm.environment.set(\"eobJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"eobJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"eobJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -1625,36 +1515,24 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient endpoint request\");\t\t\t\t ", - " pm.environment.set(\"patientv2JobUrl\", \"https://bcda.cms.gov\");", + "var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", + "if (v2Disabled) {", + " pm.test(\"Status code is 404\", function() {", + " pm.response.to.have.status(404);", " });", " return;", - "} else {", - " var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", - "", - " if (v2Disabled) {", - " pm.test(\"Status code is 404\", function() {", - " pm.response.to.have.status(404);", - " });", - " return;", - " }", + "}", "", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"patientv2JobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"patientv2JobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -1706,36 +1584,24 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient Coverage endpoint request\");\t\t\t\t ", - " pm.environment.set(\"coveragev2JobUrl\", \"https://bcda.cms.gov\");", + "var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", + "if (v2Disabled) {", + " pm.test(\"Status code is 404\", function() {", + " pm.response.to.have.status(404);", " });", " return;", - "} else {", - " var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", - "", - " if (v2Disabled) {", - " pm.test(\"Status code is 404\", function() {", - " pm.response.to.have.status(404);", - " });", - " return;", - " }", + "}", "", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"coveragev2JobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"coveragev2JobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -1787,36 +1653,24 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient EOB endpoint request\");\t\t\t\t ", - " pm.environment.set(\"eobv2JobUrl\", \"https://bcda.cms.gov\");", + "var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", + "if (v2Disabled) {", + " pm.test(\"Status code is 404\", function() {", + " pm.response.to.have.status(404);", " });", " return;", - "} else {", - " var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", - "", - " if (v2Disabled) {", - " pm.test(\"Status code is 404\", function() {", - " pm.response.to.have.status(404);", - " });", - " return;", - " }", + "}", "", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"eobv2JobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"eobv2JobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -3321,35 +3175,24 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient endpoint request\");\t\t\t\t ", - " pm.environment.set(\"patientv2withPatientCoverageEOBJobUrl\", \"https://bcda.cms.gov\");", + "var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", + "if (v2Disabled) {", + " pm.test(\"Status code is 404\", function() {", + " pm.response.to.have.status(404);", " });", - "} else {", - " var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", - "", - " if (v2Disabled) {", - " pm.test(\"Status code is 404\", function() {", - " pm.response.to.have.status(404);", - " });", - " return;", - " }", + " return;", + "}", "", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"patientv2withPatientCoverageEOBJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"patientv2withPatientCoverageEOBJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -3401,35 +3244,24 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient endpoint request\");\t\t\t\t ", - " pm.environment.set(\"patientv2withPatientCoverageJobUrl\", \"https://bcda.cms.gov\");", + "var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", + "if (v2Disabled) {", + " pm.test(\"Status code is 404\", function() {", + " pm.response.to.have.status(404);", " });", - "} else {", - " var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", - "", - " if (v2Disabled) {", - " pm.test(\"Status code is 404\", function() {", - " pm.response.to.have.status(404);", - " });", - " return;", - " }", + " return;", + "}", "", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"patientv2withPatientCoverageJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"patientv2withPatientCoverageJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -3481,35 +3313,24 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient endpoint request\");\t\t\t\t ", - " pm.environment.set(\"patientv2withPatientEOBJobUrl\", \"https://bcda.cms.gov\");", + "var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", + "if (v2Disabled) {", + " pm.test(\"Status code is 404\", function() {", + " pm.response.to.have.status(404);", " });", - "} else {", - " var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", - "", - " if (v2Disabled) {", - " pm.test(\"Status code is 404\", function() {", - " pm.response.to.have.status(404);", - " });", - " return;", - " }", + " return;", + "}", "", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"patientv2withPatientEOBJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"patientv2withPatientEOBJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -3561,35 +3382,24 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient EOB, Coverage endpoint request\");\t\t\t\t ", - " pm.environment.set(\"patientv2withCoverageEOBJobUrl\", \"https://bcda.cms.gov\");", + "var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", + "if (v2Disabled) {", + " pm.test(\"Status code is 404\", function() {", + " pm.response.to.have.status(404);", " });", - "} else {", - " var v2Disabled = pm.globals.get(\"v2Disabled\") == \"true\"", - "", - " if (v2Disabled) {", - " pm.test(\"Status code is 404\", function() {", - " pm.response.to.have.status(404);", - " });", - " return;", - " }", + " return;", + "}", "", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"patientv2withCoverageEOBJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"patientv2withCoverageEOBJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -4706,27 +4516,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Group/all endpoint request\");\t\t\t\t ", - " pm.environment.set(\"groupAllNoSinceJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"groupAllNoSinceJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"groupAllNoSinceJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -4989,27 +4787,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Group/all endpoint request\");\t\t\t\t ", - " pm.environment.set(\"groupAllv2NoSinceJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"groupAllv2NoSinceJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"groupAllv2NoSinceJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -5272,27 +5058,15 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Group/all endpoint request\");\t\t\t\t ", - " pm.environment.set(\"groupAllSinceJobUrl\", \"https://bcda.cms.gov\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - " return;", - "} else {", - " pm.test(\"Status code is 202\", function() {", - " pm.response.to.have.status(202);", - " });", + "pm.test(\"Status code is 202\", function() {", + " pm.response.to.have.status(202);", + "});", "", - " pm.test(\"Has Content-Location header\", function() {", - " pm.response.to.have.header(\"Content-Location\");", - " });", + "pm.test(\"Has Content-Location header\", function() {", + " pm.response.to.have.header(\"Content-Location\");", + "});", "", - " pm.environment.set(\"groupAllSinceJobUrl\", pm.response.headers.get(\"Content-Location\"));", - "}" + "pm.environment.set(\"groupAllSinceJobUrl\", pm.response.headers.get(\"Content-Location\"));" ], "type": "text/javascript" } @@ -7495,33 +7269,23 @@ "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Patient request\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " if (!pm.globals.get(\"blacklistedClientId\") || !pm.globals.get(\"blacklistedClientSecret\")) {", - " console.log(\"Blacklist test skipped due to creds not set.\")", - " return", - " }", - " pm.test(\"Status code is 403 (Unauthorized)\", function() {", - " pm.response.to.have.status(403);", - " });", + "if (!pm.globals.get(\"blacklistedClientId\") || !pm.globals.get(\"blacklistedClientSecret\")) {", + " console.log(\"Blacklist test skipped due to creds not set.\")", + " return", + "}", + "pm.test(\"Status code is 403 (Unauthorized)\", function() {", + " pm.response.to.have.status(403);", + "});", "", - " var respJson = pm.response.json();", + "var respJson = pm.response.json();", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", + "pm.test(\"Resource type is OperationOutcome\", function() {", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Issue details text are unauthorized ACO\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.match(/ACO \\(CMS_ID: .*\\) is unauthorized/)", - " });", - "}" + "pm.test(\"Issue details text are unauthorized ACO\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.match(/ACO \\(CMS_ID: .*\\) is unauthorized/)", + "});" ], "type": "text/javascript" } @@ -7561,39 +7325,29 @@ "response": [] }, { - "name": "Start Blacklisted Group export", + "name": "Start Blacklisted Group all export", "event": [ { "listen": "test", "script": { "exec": [ - "const maintenanceMode = pm.globals.get(\"maintenanceMode\");", - "", - "if (maintenanceMode === \"eoy\") {\t", - " console.log(\"EOY mode is enabled - Skipping Group/all request\");", - "", - " pm.test(\"Status code is 400, 404, or 500\", function() {", - " pm.expect(pm.response.code).to.be.oneOf([400, 404, 500]);", - " });", - "} else {", - " if (!pm.globals.get(\"blacklistedClientId\") || !pm.globals.get(\"blacklistedClientSecret\")) {", - " console.log(\"Blacklist test skipped due to creds not set.\")", - " return", - " }", - " pm.test(\"Status code is 403 (Unauthorized)\", function() {", - " pm.response.to.have.status(403);", - " });", + "if (!pm.globals.get(\"blacklistedClientId\") || !pm.globals.get(\"blacklistedClientSecret\")) {", + " console.log(\"Blacklist test skipped due to creds not set.\")", + " return", + "}", + "pm.test(\"Status code is 403 (Unauthorized)\", function() {", + " pm.response.to.have.status(403);", + "});", "", - " var respJson = pm.response.json();", + "var respJson = pm.response.json();", "", - " pm.test(\"Resource type is OperationOutcome\", function() {", - " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", - " });", + "pm.test(\"Resource type is OperationOutcome\", function() {", + " pm.expect(respJson.resourceType).to.eql(\"OperationOutcome\")", + "});", "", - " pm.test(\"Issue details text are unauthorized ACO\", function() {", - " pm.expect(respJson.issue[0].diagnostics).to.match(/ACO \\(CMS_ID: .*\\) is unauthorized/)", - " });", - "}" + "pm.test(\"Issue details text are unauthorized ACO\", function() {", + " pm.expect(respJson.issue[0].diagnostics).to.match(/ACO \\(CMS_ID: .*\\) is unauthorized/)", + "});" ], "type": "text/javascript" }