Developers need to know how photos on a survey in Pruvan “works” and what happens if Users move photos around from one question to another using the gallery in Pruvan or upload photos to Pruvan from a hard drive.
Basically, You must use the survey Item data received to i) answer the questions in Order Source, and ii) locate, move and label photos based on the questionId and photo serial#.
Always use the latest survey Item received to allow for surveys to be edited by Users because they (Users) can change answers and move photos around and resubmit a survey.
- Pruvan sends each photo Item to the Order Source one at a time.
- Each photo Item in Pruvan has a globally unique serial number
- Pruvan sends photo serial number(s) as required in the survey Item answer set, not the actual photo
Understanding 1, 2, and 3 above will help explain the cause of two issues an Order Source developer may experience if you do not use the “Photo Serial Number” within the survey Item data to identify what photos belong on what questions.
User Story#1 : User submits a survey in Pruvan Online with five photos on question1 and five photos on question2 and publishes results to Order Source at 10am. Ten (10) photos and one (1) survey Item is sent to Order Source. Later in the day at noon, the User re-opens and edits the same survey in Pruvan Online and moves the five question1 photos to question2 and the five question2 photos to question1. The User republishes this edited survey in Pruvan Online. One (1) survey Item is sent to Order Source with related data about the photos previously sent at 10am that were moved at noon.
The problem: Photos in Order Source are not moved from question1 to question2. This is likely due to not using the survey Item data to label and move the photos received at 10am. This results in the photos not being relabeled and moved when the new survey Item is received that reflects the photo move sent in at noon by User.
User Story#2: User takes photos using a point/shoot camera and manually uploads photos to Order Source order within Pruvan Online. The User uses the Pruvan Gallery to manually associate five (5) photos to question1 and five (5) photos to question2 and submits the survey and publishes results. Ten (10) photo Items and one (1) survey Item are sent to Order Source.
The problem: Assuming photos are labeled “before” this may confuse your business logic if your code is looking for a questionID in the photo evidence type and finds “before”. Once again, always use the latest survey Item data to figure out how to label and move photos related to survey questions or to create PDF's or when redisplaying a previously answered survey.
Comment below if you have suggestions or comments.