...
This is the main process that we have been following:
Assigning an eMER to the correct applicant
Applicant merge
This is used for merging duplicate files. It is different from File Transfer
Merging duplicate applicant files
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
OverviewThe support team occasionally receives requests to fix data that was been incorrectly submitted to CAMIS via an eMER.
Pre-requisite:The person who requests the task needs to provide the information (such as file number and applicant name/initials) in order to proceed. For some requests, additional information may be needed. This will have to be determined on a case by case basis based on each individual request.
|
IMPORTANT: Backup PRODUCTION DATA before making any changes. |
---|
Queries to retrieve the record(s)
a) check which tables contain the column(s) with the value that needs to be changed).
Code Block |
---|
select distinct OWNER, TABLE_NAME, COLUMN_NAME from all_tab_columns where column_name = {'COLUMN_NAME'} --replace 'COLUMN_NAME' with actual column names and remember to remove the { and } order by TABLE_NAME asc; |
Example: |
---|
Obtain the MEDICAL_EXAMINATION_D from UA006_MEDICAL_EXAMINATION
Code Block |
---|
select MEDICAL_EXAMINATION_ID, MEDICAL_EXAMINATION_DTE, LICENCE_NUM, FIRST_NAME_NM, FAMILY_NAME_NM, STAMP_NUMBER_TXT, ESOPHORIA_NBR from UA006_MEDICAL_EXAMINATION where LICENCE_NUM in {replace with file numbers from requestor}; |
Example: the LICENCE_NUM values provided are samples only, not real values in a database, replace them with the “file numbers” from the requestor. |
---|
Since there were multiple records associated with each file number, it was best to work with the MEDICAL_EXAMINATION_ID for the record(s). |
---|
Code Block |
---|
select MEDICAL_EXAMINATION_ID, MEDICAL_EXAMINATION_DTE, LICENCE_NUM, FIRST_NAME_NM, FAMILY_NAME_NM, STAMP_NUMBER_TXT, ESOPHORIA_NBR from UA006_MEDICAL_EXAMINATION where LICENCE_NUM in ( 336002, 855969, 63424, 855523, 812436, 200546, 851754, 856404 ) and STAMP_NUMBER_TXT = {'STAMP_NUMBER'} and ESOPHORIA_NBR=1 -- 1 represents Esophoria = Yes. |
Example: |
---|
Query to obtain document ids:
Code Block |
---|
select UA006_MEDICAL_EXAMINATION.MEDICAL_EXAMINATION_ID, UA035_MEDICAL_EXAMINATION_DOC.MEDICAL_EXAMINATION_ID, UA006_MEDICAL_EXAMINATION.LICENCE_NUM, UA006_MEDICAL_EXAMINATION.FIRST_NAME_NM, UA006_MEDICAL_EXAMINATION. FAMILY_NAME_NM, UA006_MEDICAL_EXAMINATION.STAMP_NUMBER_TXT, UA035_MEDICAL_EXAMINATION_DOC.DOCUMENT_NBR, UA018_DOCUMENT.DOCUMENT_NBR, UA018_DOCUMENT.DOCUMENT_UPLOAD_DTE, UA018_DOCUMENT.FILENAME_TXT, UA018_DOCUMENT.FILE_CONTENT_TXT, UA018_DOCUMENT.RDIMS_NUM, UA018_DOCUMENT.DOCUMENT_TYPE_CD from UA006_MEDICAL_EXAMINATION, UA035_MEDICAL_EXAMINATION_DOC, UA018_DOCUMENT where UA006_MEDICAL_EXAMINATION.MEDICAL_EXAMINATION_ID in {(medical examination ids)} and UA006_MEDICAL_EXAMINATION.MEDICAL_EXAMINATION_ID = UA035_MEDICAL_EXAMINATION_DOC.MEDICAL_EXAMINATION_ID and UA035_MEDICAL_EXAMINATION_DOC.DOCUMENT_NBR = UA018_DOCUMENT.DOCUMENT_NBR and FILENAME_TXT like '%mer%'; |
Example (note: the numbers in the where clause are samples, not actual values in any db). UA018_DOCUMENT.DOCUMENT_NBR, UA018_DOCUMENT.DOCUMENT_UPLOAD_DTE, UA018_DOCUMENT.FILENAME_TXT, UA018_DOCUMENT.FILE_CONTENT_TXT, UA018_DOCUMENT.RDIMS_NUM, UA018_DOCUMENT.DOCUMENT_TYPE_CD from UA006_MEDICAL_EXAMINATION, UA035_MEDICAL_EXAMINATION_DOC, UA018_DOCUMENT where UA006_MEDICAL_EXAMINATION.MEDICAL_EXAMINATION_ID in (1234567, 2234567, 3234567) and UA006_MEDICAL_EXAMINATION.MEDICAL_EXAMINATION_ID = UA035_MEDICAL_EXAMINATION_DOC.MEDICAL_EXAMINATION_ID and UA035_MEDICAL_EXAMINATION_DOC.DOCUMENT_NBR = UA018_DOCUMENT.DOCUMENT_NBR and FILENAME_TXT like '%mer%'; |
---|
Backing up the tables:
see also Production - Backup the database data, HTML and PDF files related to the incorrect value entries
1) Query to back up affected record(s) in UA006_MEDICAL_EXAMINATION:
Code Block |
---|
select * from UA006_MEDICAL_EXAMINATION where MEDICAL_EXAMINATION_ID in {(medical examination id(s)}; |
2) Query to backup affected records in UA035_MEDICAL_EXAMINATION_DOC
Example (note: the numbers in the where clause are samples, not actual values in any db). |
---|
Code Block |
---|
select * from UA035_MEDICAL_EXAMINATION_DOC where MEDICAL_EXAMINATION_ID in {(medical examination id(s)} |
3) Query to backup affected records in UA018_DOCUMENT
Code Block | ||
---|---|---|
| ||
select * from UA018_DOCUMENT where DOCUMENT_NBR in (document number) |
Example: |
---|
Backup the original HTML and PDFs from the database:
create a subdirectory, with a name like “original” in your backup location.
Example:In UA018_DOCUMENT, double-click on "HUGEBLOB" in the FILENAME_CONTENT_TXT column.
for the records returned by the “Query to backup affected records in UA018_DOCUMENT”A pop-up will appear.
Select “Save to file”.Save the file with the original name from the FILENAME_TXT column (do this for all the relevant HTML Files.
Update the database data:
Update the appropriate column(s) in the database. Remember to commit the change (commit statement is not included in the queries)
Code Block |
---|
update UA006_MEDICAL_EXAMINATION set ESOPHORIA_NBR = NULL where MEDICAL_EXAMINATION_ID in {(1234567, 2234567, 3234567)} |
Check that the value you are changing a result for is consistent with the related section of the eMER. If you are unsure, check with the requestor. Update statements to set ESOPHORIA_NBR to NULL for the following three records. update UA006_MEDICAL_EXAMINATION Update ESPOPHORIA_NBR to 0 (NO) for these five records) |
---|
Update the HTML and PDF files
To update the HTML and PDF files in the database:
make a copy of the directory where you downloaded the HTML files and PDF files as described in the section “Backup the original HTML and PDFs from the database”. For example, call the directory “revised”.
Example:open the HTML file in a plain text editor such as notepad or notepad++
update the value.
save the HTML file to the same filename that is already in the database (UA018_DOCUMENT in the FILENAME_TXT column)
open the HTML file in a browser.
print to PDF.
save the PDF file to the same filename that is already in the database (UA018_DOCUMENT in the FILENAME_TXT column)
Replace the Files in the database
Once the HTML and PDF files are updated they will have to be uploaded to the database. The replacement of these files has to be done from the schema browser. It cannot be done in a result set that was retrieved by a query.
Navigate to “UA018_DOCUMENT
To ensure I was replacing the correct files, I found it easiest to filter on the DOCUMENT_NBR of the files I was updating. As a reminder, the DOCUMENT_NBR is available in the query used to backup UA018_DOCUMENT (see Query to backup affected records in UA018_DOCUMENT earlier in this article).
Double click the n UA018_DOCUMENT, double-click on "HUGEBLOB" in the FILENAME_CONTENT_TXT column.
This time click “Load a file”
Load both the HTML file and the PDF files. (you will need to click the “X” in the upper right corner of the pop-up, to close it, after you load each file.
Commit the change.
Repeat as necessary, for affected file numbers in the request.
Testing that the file was correctly loaded to the database:
In UA018_DOCUMENT, double-click on "HUGEBLOB" in the FILE_CONTENT_TXT column for the file you want to check.
Select “Save to file” in the pop-up.
Save the file to a temporary name. For example, I saved the html files I was testing to h.html, and pdf files to p.pdf in the folders for each “file” I had to update
Verify that the files open and contain the updates that were made.
In one case, the browser could not open the html and pdf files I updated. This was because the file name contained multiple spaces in one spot. For example, instead of the FILENAME_TXT column’s filename having Text-Text Text--mer.html it had Text-Text Text--mer.html. |
---|
Checking the record(s) in CAMIS
The final step, before asking the requestor to review the change is to login to CAMIS (prod).
Important: clear the browser cache before performing the checks.
Retrieve the file.
Under the Tests & Docs tab, view the HTML and PDF files that were replaced.
. Verify that they contain the correct updates.
Expand | ||
---|---|---|
| ||
R |
...