Versions Compared

Key

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

...

Description

...

Table of Contents
minLevel1
maxLevel1
typeflat
separatorpipe
Page Properties

Summary

Shows changes made in Employee Portal to Medical docs.

Keywords

Medical document change, APP change

...

File / Script Link

...

Compatibility APM Version

...

Compatibility SQL Version

Description

“Changes to Medical Documents from APP” view is used to track all the changes applied to the Medical Documents from APP by the employees.

This view is essential for the admins to make sure that the uploaded data is accurate.

Selection

VIEWID should be substituted with the id of the crew list view that you are creating in your system e.g. PW001SRV20 etc.

Code Block
languagesql
CREATE VIEW dbo.PW001SRV220VIEWID 
AS 
select
p01.PIN,
p01.NAME as Name,
c24.TEXT as Document,
p07.code as DocumentCode,
p07.createtime as Created,
case when p07.createdby = 'app' then p01.name end as CreatedBy,
p07.changetime as Changed,
case when p07.changedby = 'APP' then p01.name end as ChangesMadeBy,
case when scanneddocno is NULL then 'Scan is missing' when p07.scanvalidity = 0 and scanneddocno is not NULL then 'Scan has not been approved' else 'Scan is valid' End as Status,
p01.EMPLOYMENTENDDATE,
p01.EMPLOYMENTSTARTDATE,
p01.CLIENT NUMORGID
from pw001p07 p07
join pw001c24 c24 on c24.code = p07.code
join pw001p01 p01 on p01.PIN = p07.PIN
where 
((p07.CREATEDBY = 'APP' and p07.changedby IS NULL) or p07.CHANGEDBY = 'APP' or (p07.CREATEDBY = 'APP' and p07.CHANGEDBY IS NULL))
--and
--p07.SCANVALIDITY = 0

...

View Sample

...

Start Page

Changed Medical