Methods/employees/getById
GET

pulse.employees.getById(id)

Returns full employee detail by UID. Includes identity, address, contact, emergency contact, employment info, demographics, and HR notes. Joins with ProviderOffice.

Added in 0.1.0

Parameters

NameTypeDescription
idnumberThe employee UID to look up

Response — EmployeeDetail | null

FieldTypeDescription
uidnumberUnique employee identifier
firstNamestring | nullFirst name
middleNamestring | nullMiddle name
lastNamestring | nullLast name
nickNamestring | nullPreferred name
dobstring | nullDate of birth (YYYY-MM-DD)
ssnstring | nullSocial Security number
photostring | nullPhoto reference
address1string | nullStreet address line 1
address2string | nullStreet address line 2
citystring | nullCity
statestring | nullState
zipstring | nullZIP code
countystring | nullCounty
workPhonestring | nullWork phone
homePhonestring | nullHome phone
cellPhonestring | nullCell phone
faxNumberstring | nullFax number
emailstring | nullEmail address
emergencyContactNamestring | nullEmergency contact full name
emergencyContactPhonestring | nullEmergency contact phone
emergencyContactEmailstring | nullEmergency contact email
currentPositionstring | nullCurrent job position
departmentstring | nullDepartment
hireDatestring | nullOriginal hire date (YYYY-MM-DD)
activeDatestring | nullActive date (YYYY-MM-DD)
inactiveDatestring | nullInactive date (YYYY-MM-DD)
fullPartTimestring | nullFull-time or part-time
statusstring | nullEmployment status
officeNamestring | nullProvider office name (from ProviderOffice join)
genderstring | nullGender
ethnicitystring | nullEthnicity
educationstring | nullEducation level
primaryLanguagestring | nullPrimary language
hrCommentsstring | nullHR comments
commentsstring | nullGeneral comments

Code Example

import { createPulseClient } from '@qsp-life/pulse';

const pulse = createPulseClient({
  server: process.env.PULSE_DB_SERVER!,
  database: process.env.PULSE_DB_DATABASE!,
  user: process.env.PULSE_DB_USER!,
  password: process.env.PULSE_DB_PASSWORD!,
});

const emp = await pulse.employees.getById(1234);

if (emp) {
  emp.firstName       // "Jane"
  emp.currentPosition // "Direct Support Professional"
  emp.hireDate        // "2022-03-15"
  emp.officeName      // "Main Office"
}

await pulse.disconnect();

Live Preview

{
  "uid": 5498,
  "firstName": "Admin",
  "middleName": null,
  "lastName": "Admin",
  "nickName": null,
  "dob": null,
  "ssn": null,
  "photo": null,
  "address1": null,
  "address2": null,
  "city": null,
  "state": null,
  "zip": null,
  "county": null,
  "workPhone": null,
  "homePhone": null,
  "cellPhone": null,
  "faxNumber": null,
  "email": "dev@quicksolveplus.com",
  "emergencyContactName": null,
  "emergencyContactPhone": null,
  "emergencyContactEmail": null,
  "currentPosition": null,
  "department": null,
  "hireDate": null,
  "activeDate": null,
  "inactiveDate": null,
  "fullPartTime": null,
  "status": "Active",
  "officeName": "Gotham",
  "gender": null,
  "ethnicity": null,
  "education": null,
  "primaryLanguage": null,
  "hrComments": null,
  "comments": null
}