Skip to end of banner
Go to start of banner

Open Sick Activities

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Next »

Summary

overview of planned and current sick type activities for crew

Keywords

Category

Crew List View

Please remember to add labels to the article. Only the labels from the lit are allowed: /wiki/spaces/PnP/pages/4523197124

Description

Overview of planned and current sick type activities for crew.

View Sample

image-20231222-130339.png

Main Data Selection

Select only activities with activity type ‘Sick’ (General Codes > Activity Codes > Options > Activity Type = Sick).

Select all ongoing/active sick activities i.e. where Estimated End Date is greater than today's date . Ordered by latest activity on top.
Scenario: Possibility to view all sick activities registered for any person (any company).

This view is important for Sick Administrator/Nurse to be able to spot all ongoing sick activities.

SQL statement

Please remember to update the View ID in the view from dbo.PW001SRVXX to the correct one.

 sql select statement
CREATE VIEW dbo.PW001SRV46 AS
Select
p01.PIN,
p01.NAME,
p03.CODE as CODE_TEXT,
c12.TEXT,
p03.DATEFROM as DATE_FROM,
p03.DATETO as DATE_TO,
p03.TODATEESTIMATED as ESTIMATED_END_DATE,
p03.DAYS as NO_OF_DAYS,
p03.VESSELNAME,
c02.NAME as RANK,
p01.Client AS NUMORGID,
p01.EMPLOYMENTSTARTDATE,
p01.EMPLOYMENTENDDATE
From pw001p01 p01
JOIN pw001p03 p03
	on p01.PIN = p03.PIN
	and p03.CODE LIKE '%SICK%'
	--and (P03.DATETO IS NOT NULL AND PLANNED <> 'Y')
	and (P03.DATETO IS NULL OR P03.DATETO >= GETDATE())
	and P03.DATEFROM <= GETDATE()
and P03.TODATEESTIMATED >= GETDATE()
LEFT JOIN pw001c12 c12
	on p03.CODE = c12.CODE
LEFT JOIN pw001c02 c02
	on p01.RANK = c02.CODE

Columns Specification

Column

Description/ Location in APM

Start Page

N/A

  • No labels