Versions Compared

Key

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

...

You will get the new context ids and CP ids as shown in the below image.

...

You can notice that see the entry for three CP identifiers three entries of IDENTIFIER and CP_ID is done because which means the CPG contains these three CPs to which the form is attached.

5. Run the SQL for the count of records under each CPs. This is the count of record (data entry) in each CP. Once you run the update SQL from #6 you will get a count of affected rows. The count from #6 step should match with the count of #5 this step.

Expand
titleselect SQL for count of record across the CP

Code Block
select re.identifier from catissue_form_record_entry re 
inner join catissue_form_context fc on fc.identifier = re.form_ctxt_id
inner join catissue_specimen_coll_group cpg on cpg.identifier =re.object_id 
inner join catissue_coll_prot_reg cpr on cpr.identifier = cpg.Collection_protocol_reg_id 
where fc.identifier = <Old Context ID> and cpr.collection_protocol_id = <CP ID>;

...