Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
Find the study ID from the table 'os_oc_studies'

//SQL to cleanup the visits mapping table, where 'N' is the study ID

SQL>delete from os_oc_visits where subject_id in (select identifier from os_oc_subjects where study_id = N);

//SQL to cleanup the participant mapping table, where 'N' is the study ID

SQL>delete from os_oc_subjects where study_id = N;

  • Error: Unknown column '<table name>' in 'field list'

  • Error: Column 'FORM_CTXT_ID' cannot be null

Expand
titleClick here to view the solution

When forms get corrupted due to any possible reason, this error occurs. In this case, you need to delete the existing form and resync the data for that form. Run below API to delete the form in OpenSpecimen.

  1. Invoke the REST API using either Postman or HTTP client.

    Image Added

    <app_url> : Server URL where the forms are available. 

    {FormId}: Form identifier for which you are getting an error. Get this from the #2 step.

    <username>: OpenSpecimen Username 

    <password>: OpenSpecimen Password

  2. Form ID can be retrieved from DB using below SQL

    Code Block
    select identifier, name from dyextn_containers where name = '<form_OID>';

form_OID: You will get the form OID from XML of CRF from OC.