Submission failure. Differences between test bed and production API? "422 Unprocessable Entity"

77 views
Skip to first unread message

Jack @Duke

unread,
Mar 13, 2018, 9:37:15 AM3/13/18
to Developer Group for QPP APIs
Hello,

I am praying that someone can help me. I had everything working in the test bed API, but now that I have switched to the production space I am getting "HTTP/1.1 422 Unprocessable Entity" errors.

Originally I was posting to the test bed using the https://qpp-submissions-sandbox.navapbc.com/submissions URL, and my postings worked fine. That "submissions" URL was shut down in the production space, so I had to switch over to the https://qpp.cms.gov/api/submissions/measurement-sets URL. Now my submission fails.

My authentication seems to work, but I am getting unprocessable entity errors. I have included my curlout and curl text below if anyone can help me.
I am a bit suspicious of the " "measurementSets": [ " in the below curl commands. I wonder if that should be " "measurementSet": [ " in the production space?

Help, anyone? A huge thanks in advance.


Here is my CURLOUT file:

{
  "error": {
    "type": "ValidationError",
    "message": "invalid measurement-set object",
    "details": [
      {
        "message": "field 'category' in MeasurementSet is missing",
        "path": "$.category"
      },
      {
        "message": "field 'submissionMethod' in MeasurementSet is missing",
        "path": "$.submissionMethod"
      },
      {
        "message": "field 'performanceStart' in MeasurementSet is missing",
        "path": "$.performanceStart"
      },
      {
        "message": "field 'performanceEnd' in MeasurementSet is missing",
        "path": "$.performanceEnd"
      },
      {
        "message": "$.entityType is not a recognized field",
        "path": "$"
      },
      {
        "message": "$.taxpayerIdentificationNumber is not a recognized field",
        "path": "$"
      },
      {
        "message": "$.nationalProviderIdentifier is not a recognized field",
        "path": "$"
      },
      {
        "message": "$.performanceYear is not a recognized field",
        "path": "$"
      },
      {
        "message": "$.measurementSets is not a recognized field",
        "path": "$"
      }
    ]
  }
}

And here is my curl code that worked in the test bed URL but not in the production URL. I have blanked out the ID's with XXXXs:

{
   "entityType": "individual",
   "taxpayerIdentificationNumber": "XXXX",
   "nationalProviderIdentifier": "XXXX",
   "performanceYear": 2017,
   "measurementSets": [ 
     { 
       "category": "quality", 
       "submissionMethod": "registry", 
       "performanceStart": "2017-01-01", 
       "performanceEnd": "2017-12-31", 
       "measurements": [ 
         { 
           "measureId": "021",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 54,
               "performanceNotMet": 0,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 54,
               "performanceRate": 100,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "043",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 24,
               "performanceNotMet": 0,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 100,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "044",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 16,
               "performanceNotMet": 0,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 4,
               "eligiblePopulation": 20,
               "performanceRate": 100,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "164",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 1,
               "performanceNotMet": 23,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 4.17,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "165",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 0,
               "performanceNotMet": 24,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 0,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "166",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 0,
               "performanceNotMet": 24,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 0,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "167",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 0,
               "performanceNotMet": 24,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 0,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "168",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 0,
               "performanceNotMet": 24,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 0,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "226",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 48,
               "performanceNotMet": 3,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 51,
               "performanceRate": 94.12,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "445",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 0,
               "performanceNotMet": 24,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 0,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "STS1",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 1,
               "performanceNotMet": 23,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 3.7393,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "STS5",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 0,
               "performanceNotMet": 4,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 4,
               "performanceRate": 0,
               "reportingRate": 100
               }
         },
         { 
           "measureId": "STS7",
             "value": { 
               "isEndToEndReported": false,
               "performanceMet": 4,
               "performanceNotMet": 20,
               "eligiblePopulationExclusion": 0,
               "eligiblePopulationException": 0,
               "eligiblePopulation": 24,
               "performanceRate": 16.67,
               "reportingRate": 100
               }
         }
       ]
     }
   ]
}



Sarah White

unread,
Mar 13, 2018, 10:46:28 AM3/13/18
to Jack @Duke, Developer Group for QPP APIs
Hi Jack,

POSTing to /measurement-sets is different than POSTing to /submissions. And if you're posting as a registry through the API, you can't POST to /submissions, you need to POST to /measurement-sets. Your submission payload isn't formatted correctly for posting to that endpoint. When submitting a measurement set, you submit measures, but in your example, you're trying to submit a measurement set.


You can find examples of submissions there to that endpoint to follow. 

Sarah White
Business Analyst

--
You received this message because you are subscribed to the Google Groups "Developer Group for QPP APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qpp-apis+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/qpp-apis.
To view this discussion on the web visit https://groups.google.com/d/msgid/qpp-apis/bfb6d481-bae0-454c-9359-91098e536b61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jack Shostak

unread,
Mar 13, 2018, 12:26:26 PM3/13/18
to Sarah White, Developer Group for QPP APIs
Sarah,

Thanks so much for that. I made the JSON syntax change and it works now. Although what I was doing in the test bed worked fine, it doesn't work like that in the production environment. I have code that does resubmissions of submission-sets for the test bed, and when I switched over to that for my initial submissions in the production site, I can post just fine. Maybe having the /submissions POST and GET on the Swagger site at https://qpp-submissions-sandbox.navapbc.com/#!/Submissions/createSubmission isn't so good to have there anymore. That is what I had things based on in development.

Thanks again!

Jack

Sarah White

unread,
Mar 13, 2018, 12:59:26 PM3/13/18
to Jack Shostak, Developer Group for QPP APIs
Thanks for the feedback, Jack! In future years we're looking at ways to make the developer documentation better at showing which endpoints are accessible for which kinds of API users.

Sarah White
Business Analyst

Reply all
Reply to author
Forward
0 new messages