Video Getting Saved Twice While saving from Formbuilder forms

When we are saving a video observation in form-builder form, video observation is getting saved twice in the database. Video file is saved only once when we are uploading, but while saving, two records are saved into database, where the first record is voided and the second record is having status as AMENDED.

We tried debugging the end to end process of saving an encounter with observations, we couldn’t find any clue/hint and the root cause.

Could you provide any inputs?

@pramidat @angshuonline @swathivarkala @binduak @darius @jinal @bhiravabhatla @vmalini @shivarachakonda @alekhyayalla

No idea. I guess we have to debug this to find out exactly whats happening. From the limited testing I did,

  • I can see only one POST is happening
  • Video is uploaded only once. Actually the API call is same as Forms1.0
  • this means when the EMRAPI endpoint is called, somehow the obs record entry is considered to be voided. Question is why?