...
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 | ||||||||||||||||||
Expand | ||||||||||||||||||
| ||||||||||||||||||
Required info: First and last name of applicant and their new region. Within CAMISP.WORLD, in the table The region value list is available in
|
Expand | |||||
---|---|---|---|---|---|
| |||||
The following script is used to fix an ongoing issue with the document naming scheme. The issue is that eMER adds the date of submission in the file name, but CAMIS doesn’t expect it. eMER does: CAMIS expects: Script to run:
|
Expand | ||
---|---|---|
| ||
User must be added into 2FA database before they are able to give eMER access to CAMEs To log in to eMER, the user must have a valid cell-phone number in their CAMIS profile in order to receive the 2FA SMS code.
6. If we can not find any error in above steps, and even if the eMer status is changed from Inactive to active and CAM still does not get the 2FA SMS code: Email to a CAMIS administrator to keep a copy of original number, modify that phone number in CAMIS to the different one (fake ones), with the “active” eMER status, click update, then put back original phone number, click update. CAMIS administrator then will need to generate a new activation code. CAM will sign in eMER using the new activation code and he/she would receive 2FA SMS codes after that. |
Expand | ||
---|---|---|
| ||
Note: The assignor is able to delete any tasks they created. Tasks are saved in |
Expand | |||||
---|---|---|---|---|---|
| |||||
Example: Open CAMIS, enter the file no, get to the specific MER record and “View eMER record”, the “Submit MER Confirmation” will show the Applicant Details' name is different from Applicant (on top of the page). On the same page, go to the “Documents” section, you must see the wronglastname-wrongfirstname--mer.html and wronglastname-wrongfirstname--mer.pdf. How this issue can happen: CAME (doctor) creates a new applicant on EMER application with the right name of applicant He enters medical data, however at Applicant Details section, he enters the wrong given name and wrong last name. He has to view, click the check box before click “Submit MER”. However, he might forget to review the names here After summitting MER, the file has been submitted to CAM (CAMIS client) and there is a wronglastname-wrongfirstname--mer.html which contains all medical data is saved in the UA018_document table with a document_nbr On CAMIS application, CAM is now opening the file, checking the “incoming eMER' and assigning the file to a specific CAM . At this point, I do not know yet that specific CAM has done something on the file (he might confirm it), then there is wronglastname-wrongfirstname--mer.pdf saved in the UA018_document table with the next document_nbr Database Notes We can find licence_nbr and medical_examination_id in UA006_medical_examination WE can find html and pdf file under UA018_document Here is the SQL we can use to check if the person has the right names in the medical files. These info will be shown on the file names This below SQL is from PK_EMER_MEDICAL_EXAMINATION.SP_get_mer_step6
Fix: Using database within CAMISP.WORLD,
|
Expand | ||
---|---|---|
| ||
The clients cannot modify eMer on Camis because submitted date of the eMER is before the medical examination date. This happens when CAM chooses the examination date in the future Fix: Find the medical_examination_id from the client’s information, on UA006_MEDICAL_EXAMINATION, change the medical_examination_dte is before or equal date_emer_submitted_dte |
Expand | |||||||
---|---|---|---|---|---|---|---|
|
Code Block | ||
---|---|---|
| ||
SELECT * FROM UA045_STAMP UA045 WHERE stamp_number_txt in ('STAMP NUMBER'); |
*”The client” usually refers to the requestor noted on the bug.
Look at the
stamp_return_dte
for the stamp number that the CAME is having issues with and check whether this value is not null and in the past (before today’s date).If the date is in the past, send an email to the client and ask them to clear the value of the
stamp_return_dte
Error message: “An unexpected condition occurred while executing this request. To keep your account secure, you are unable to process further. Please exit your browser and try again. Please contact support to resume your access”. A doctor receives a new activation code, uses this activation code in eMer, then this error is shown up. Below is a temporary fix because we are in action to improve this bug in next releases
title | Steps for transferring / correcting eMERs and / or documents between existing applicants (bug 181510) |
---|
There were two problems:
1) the tombstone data (name, dob was incorrect in UA006_MEDICAL_EXAMINATION.
2) two documents for ROBERT GARTSHORE were accidentally attached to the eMER for GEOFFREY LAWRENCE and had to be transferred to the correct eMER for ROBERT GARTSHORE.
3. Ran the scripts in https://dev.azure.com/transport-canada/DSD-CIVAV%20Support/_boards/board/t/Team%20Skyblazers/Backlog%20items/?workitem=183846 to resolve this issue.
This is slightly different from other scenarios and have logged bug 184054 Team Skyblazers Backlog items Board - Boards (azure.com) to address this
Verify in the application if the changes were successful, you can search the correct file no. and look in the Tests & Docs. and MERs tabs to verify if the files are there.
In CAMIS (prod):
Select “Applicant search” from “Applicant” in the left hand menu:
Enter the file number in the resulting form:
To verify that the Documents are transferred correctly it is necessary to view the actual eMER and view the files listed in the documents section of the eMER.Set the task to “Committed” and ask the requester to review that the new file has the correct information
Example of a file transfer task:
181510 Request to transfer an eMER dated 2021-06-02 to correct file #.
Required info: The name of the applicant and stamp number of the examiner (or exam date).
Within CAMISP.WORLD, in the table CAMIS.UA006_MEDICAL_EXAMINATION
, locate the medical examination that needs to be deleted, usually by a combination of the applicant name and the stamp number of the examiner or the medical examination date. When located, set the DATE_DELETED_DTE
to today’s date.
Find the MEDICAL_EXAMINATION_ID of the files to be removed.
* Can also use license_num or first_name_nm instead of family_name_nm or any other identifying information to find the record (e.g. dob) *SELECT * FROM UA006_MEDICAL_EXAMINATION WHERE STAMP_NUMBER_TXT = '{stamp_no}' AND UPPER(FAMILY_NAME_NM) = UPPER('{applicant_last_name}');
Export the INSERT statements for the rows to be deleted and put into the the comments of the bug
Set the DATE_DELETED_DTE to today’s date
UPDATE UA006_MEDICAL_EXAMINATION SET DATE_DELETED_DTE = SYSDATE WHERE MEDICAL_EXAMINATION_ID IN ({list of IDs to be removed});
Required info: The license number of the first applicant and of the second.
Make sure to first check that both license numbers exist in CAMIS. If not, you will need to wait for it to get populated in DAPLS.
The following script merges an applicant into another one (MERs, related activities, assessments, docs, etc.).
View file | ||
---|---|---|
|
Create a related task and include the script you ran.
Verify in the application if the changes were successful, you can search the correct file no. and look in the Tests & Docs. and MERs tabs to verify if the files are there.
In CAMIS (prod):
Select “Applicant search” from “Applicant” in the left hand menu:
Enter the file number in the resulting form:
Expand | ||
---|---|---|
| ||
On CAMIS, entering a file number, at Tombstone tab, click on “Add/Update Indicators”, if there are missing indicators: Check YA003_APPLICANT of that applicant, at date_deleted_dte to see whether the field is empty or not. If that field can be empty, then the missing indicators will appear |
title | Emer system is requesting an activation code for a regular eMer user. For ex: bug #177788 |
---|
For a regular eMER user (doctors) or CAME Associates, if they have not activated their account for a long time, then they need to create a GC key again to continue . We think that is 24 months. This info is needed to verify with GCkey team
Fix:
For a regular eMER user, if he has activated his account before (i.e they could access eMer system) but now it is asking his activation code again, then we need to follow below steps
( see bug #177788 : eMER system requesting activation code from a regular eMER system user)
Ask the client (for ex Samia Dawi) to RESET eMER status
Ask the client to change eMER status from Inactive to Active on CAMIS if this person is having Inactive status. This status is shown on CAMIS page
Ask the client to generate a new activation code
Click Add/Update Status
CAMIS db: Make sure AA008_application_user.user_status_cd of that person is ‘1', (A CAME’s person ID can be obtained from MV005_CAMIS_EMER_ASSG_SCREEN.
example:
SELECT DISTINCT MEDICAL_EXAMINER_PERSON_ID, CAME_LAST_NAME_NM, CAME_FIRST_NAME_NM
FROM MV005_CAMIS_EMER_ASSG_SCREEN
WHERE STAMP_NUMBER_TXT='<stamp_number>'AA011_external_access.last_login_dte has to be changed to any date within last year from today (Note: EXTERNAL_APPLICATION_USER_ID = the CAME’s PERSON_ID) activation_key_status_cd is '20’, activation_key_expiry_date_dte is in future date or empty.
Note: there will not be any record in AA011_external_access for a CAME Associate.
See for example: bug 179216 CAME Associate unable to complete eMER account setupNow ask the client to contact the user to access eMER with the new generated activation code. It will ask him to enter ONE time of eMER activation code and then they can continue with eMer access code on their phone to get in eMER.
Expand | |||||
---|---|---|---|---|---|
| |||||
When we have a task to delete address associated with stamp number (see bug # 244024 Delete address associated with stamp number) Within CAMISP.WORLD, in the table In the table
|
title | eMER not listed under incoming eMERS in CAMIS |
---|
related DevOps Task: 201977 eMER found in applicant's Test & Docs tab not in MERs Tab
If an eMER is not listed under “Incoming eMERs” in CAMIS:
1. check if there the DATE_DELETED_DTE has a date set for the corresponding medical examination in the table UA006_MEDICAL_Examination.
If the DATE_DELETED_DTE also check the values of DATE_LAST_UPDATE_DTE and USER_LAST_UPDATE_ID to find out when the medical examination was deleted and who deleted it.
To find out who deleted the record, check YA096_PERSON and UA045_STAMP
2. If the eMER was deleted by the CAME (or business client) follow-up with the requestor to confirm if the record should be deleted.
If the requestor confirms the record should be undeleted, update the DATE_DELETED_DTE to NULL.
Make a backup for the record.
In CAMIS prod, verify that the record is listed under Incoming Records.
Ask the requestor to check the eMER.
CAMIS Report Generator
This program needs to be run weekly on Monday until the changes to CAMIS/eMER have been finalized.
...
title | Steps to perform the weekly auto-accept |
---|
Open the project in Visual Studio.
Open
frmSelectUtilFunction.vb
file and update line 1902 to the file path for your folder.Code Block language vbnet Dim directoryPath As String = "C:\Users\lemi\Desktop\CAMIS Auto-Generated Reports\" + DateTime.Now.ToString("yyyyMMdd")
Run the application.
If you are getting errors building the project, you may be missing some files that can be found here:
\tc4s0a\Groups\AARA\AARAD\CAMIS\CAMIS Report Generator
Select
Production User Database
. Click Next.Click Next.
Navigate to the folder specified in step 2 and into the folder for today’s date. Click Save.
Popup saying that the “Incoming eMER report and auto-accept script done!” should appear. Click OK,
Wait while the script runs again for the next region (total of 7 regions).
Repeat steps 6-8 until “done” popup appears.
You should now have 7 Excel files in the folder as well as 7 scripts that have opened up.
Run each script using CAMIS_DATA_ADMIN@CAMISP, making sure to commit the changes.
Send an encrypted email to the clients to let them know.
Attach all the Excel documents.
Send to
Walker, Akii Yah <AkiiYah.Walker@tc.gc.ca>
Kapetis, Gale <gale.kapetis@tc.gc.ca>
Lee, Brenda <brenda.lee@tc.gc.ca>
Santos, Maria <maria.santos@tc.gc.ca>
Carter, Terry <terry.carter@tc.gc.ca>
Wali Alami, Aouab <aouab.walialami@tc.gc.ca>
Ferrer, Mary <mary.ferrer@tc.gc.ca>
Michelle Tan <michelle.tan@tc.gc.ca>
CC: Baptiste, Daniel <Daniel.Baptiste@tc.gc.ca>
Subject: 20210908 Weekly Auto-Accept eMER completed
Message
Code Block language text Good afternoon, The weekly auto-accept for your region has been run and completed. With the following parameters: eMERs that are: • external and submitted • renewed by CAME • not in diabetes or SSRI • not deferred to RAMO • not initial applicant Please see attached for the report. Thank you, Michelle Le A/Team Lead, Application Development Solution Centre, Digital Services Directorate Transport Canada / Government of Canada michelle.le@tc.gc.ca Chef d'équipe p.i., Dévelopment des applications Centre des solutions, Direction générale des services numériques Transports Canada / Gouvernement du Canada michelle.le@tc.gc.ca
...
| ||||
Required info: The file no. that was incorrectly assigned and the correct file no., applicant id that the eMER should be assigned to.
Required info: The name of the applicant and stamp number of the examiner (or exam date). Within CAMISP.WORLD, in the table
Required info: The license number of the first applicant and of the second. Make sure to first check that both license numbers exist in CAMIS. If not, you will need to wait for it to get populated in DAPLS. The following script merges an applicant into another one (MERs, related activities, assessments, docs, etc.).
Create a related task and include the script you ran. Verify in the application if the changes were successful, you can search the correct file no. and look in the Tests & Docs. and MERs tabs to verify if the files are there. In CAMIS (prod): Enter the file number in the resulting form: |
Expand | ||
---|---|---|
| ||
On CAMIS, entering a file number, at Tombstone tab, click on “Add/Update Indicators”, if there are missing indicators: Check YA003_APPLICANT of that applicant, at date_deleted_dte to see whether the field is empty or not. If that field can be empty, then the missing indicators will appear |
Expand | |||||
---|---|---|---|---|---|
| |||||
When we have a task to delete address associated with stamp number (see bug # 244024 Delete address associated with stamp number) Within CAMISP.WORLD, in the table In the table
|
Expand | ||
---|---|---|
| ||
related DevOps Task: 201977 eMER found in applicant's Test & Docs tab not in MERs Tab If an eMER is not listed under “Incoming eMERs” in CAMIS:
2. If the eMER was deleted by the CAME (or business client) follow-up with the requestor to confirm if the record should be deleted. If the requestor confirms the record should be undeleted, update the DATE_DELETED_DTE to NULL.
|
CAMIS Report Generator
This program needs to be run weekly on Monday until the changes to CAMIS/eMER have been finalized.
CAMIS Report Generator: performing the weekly auto-accept
TFS Testing Plans, Suites and Test Cases imported:
...