Features / Planning & tracking

Certification survey

A natural-farming certification survey for the farmer (assessment code APCNF_SURVEY_CERTIFICATION) built on the shared assessment library, including a signed self-declaration.

FactsheetPlanning & tracking
Who uses it
Cadre userHAN user (blocked)
How you get here
Farmer hub, Certification tile (shown only when enabled; category must not be C4/C5).
APIs
2 calls today, 6 App Service operations
Offline
Works offline using the downloaded assessment; the response and signatures are queued with retry.

Screens

ScreenWhat it doesSource
Certification listPast submissions (read-only) and "+" to start a new one.app/src/main/java/org/platformcommons/urvi/view/certification/CertificationListFragment.kt
Certification formAnswer the downloaded survey questions.app/src/main/java/org/platformcommons/urvi/view/certification/CertificationFragment.kt
Declaration dialogSignature pad for self-declaration.app/src/main/java/org/platformcommons/urvi/view/certification/DeclarationDialog.kt

What it captures

FieldTypeRequiredValidationOptions from
Survey questionsSubjective, Number, Date, Single choice/Scale, Multi-selectYes (all)Every question is mandatory.Downloaded assessment
Self declarationText + signature padYesNeeds both a signature and a text answer; signature stored as a Base64 PNG attachment.Downloaded assessment
Custom cropCrop picker + quantityYesEach crop needs a quantity greater than 0 (quintal/hectare).Select Crop sheet

Rules

Conditions from the code, rewritten as plain decision rules.

WhenThen
Any question is unansweredError "All survey questions are mandatory".
The farmer is not synced yetThe response is chained after the farmer create; signatures are uploaded after the response.
No submissions existThe list shows "Click on the '+' icon to add a new certification survey".

API contracts

Each call opens to its use case, headers, request and response bodies, and errors.

Today: callUseReplaced by
GET /gateway/assessment-service/api/v1/assessmentInstanceAssessesList assessments for an actor (activity history, certification).
POST /gateway/assessment-service/api/v1/aiadefaultresponses/attachment/uuidUpload an assessment (AIA) attachment.
App Service v2: operationUse
GET /configTyped config bundle (ETag)
GET /assessmentsAssessment definitions and past submissions
POST /sync/batchApply an ordered batch of offline mutations
POST /filesCreate a file upload (resumable or single-shot)
PATCH /files/{fileId}Append a chunk to a resumable upload
HEAD /files/{fileId}Current offset of a resumable upload

Behaviour notes

  • Assessor = logged-in user; assessee = the farmer (or the logged-in user for a non-IE record).
  • Possible bug · unverified if the survey definition is missing, the screen never re-fetches it because the fetch is never triggered.

Improve in the rewrite

  • Re-fetch the survey definition automatically when missing and show an empty-state message.