{"id":19504721,"url":"https://github.com/tools4everbv/helloid-conn-prov-target-plancare","last_synced_at":"2025-08-11T00:07:35.633Z","repository":{"id":113210800,"uuid":"306114948","full_name":"Tools4everBV/HelloID-Conn-Prov-Target-PlanCare","owner":"Tools4everBV","description":"PlanCare SQL - Target","archived":false,"fork":false,"pushed_at":"2024-01-15T14:06:36.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-25T22:12:10.992Z","etag":null,"topics":["ehr","hms","provisioning","target"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tools4everBV.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-21T18:34:29.000Z","updated_at":"2023-05-10T14:51:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"3225f6da-7b07-44e8-a6e1-517913acb9da","html_url":"https://github.com/Tools4everBV/HelloID-Conn-Prov-Target-PlanCare","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tools4everBV/HelloID-Conn-Prov-Target-PlanCare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Conn-Prov-Target-PlanCare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Conn-Prov-Target-PlanCare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Conn-Prov-Target-PlanCare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Conn-Prov-Target-PlanCare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tools4everBV","download_url":"https://codeload.github.com/Tools4everBV/HelloID-Conn-Prov-Target-PlanCare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tools4everBV%2FHelloID-Conn-Prov-Target-PlanCare/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269809476,"owners_count":24478545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ehr","hms","provisioning","target"],"created_at":"2024-11-10T22:26:56.172Z","updated_at":"2025-08-11T00:07:35.603Z","avatar_url":"https://github.com/Tools4everBV.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HelloID-Conn-Prov-Target-PlanCare\n\n| :information_source: Information |\n|:---------------------------|\n| This repository contains the connector and configuration code only. The implementer is responsible to acquire the connection details such as username, password, certificate, etc. You might even need to sign a contract or agreement with the supplier before implementing this connector. Please contact the client's application manager to coordinate the connector requirements.       |\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://www.tools4ever.nl/connector-logos/plancare-logo.png\"\u003e\n\u003c/p\u003e\n\n## PlanCare SQL Dump connector\n\nThe powershell actions this script executes are resource intensive. Please make sure you configure the server accordingly.\n\n## Plancare\n\nThe Plancare connector is a full export connector to two database tables: \u0026#39;Implementation.HRM\\_Import\\_Medewerker\u0026#39; and \u0026#39;Implementation.HRM\\_Import\\_Dienstverband\u0026#39;. \n\nIt can also be used to export the data to the staging and test environments, which perform the same actions, but on different databases.\n\n## Getting started\n\n### Connector settings\n\nThe following custom connector settings are available and required:\n\n| Setting     | Description |\n| ------------ | ----------- |\n| SQL Server/Instance | The server / instance where the plancare database resides |\n| Database | The PlanCare database name |\n\n### Prerequisites\n\n- This connector requires an On-Premise HelloID Agent\n- Using the HelloID On-Premises agent, Windows PowerShell 5.1 must be installed.\n- Additional configuration is required in PlanCare. This is usually done by a PlanCare consultant.\n\n### Supported PowerShell versions\n\nThe connector is created for Windows PowerShell 5.1. This means that the connector can not be executed in the cloud and requires an On-Premises installation of the HelloID Agent.\n\n\u003e Older versions of Windows PowerShell are not supported.\n\n## Business Logic\nThe following business logic is configured in the default connector\n\n### HR Data\n- All persons with an employment contract that starts in 31 days are included in the report.\n- All persons with active employment are included.\n- All persons who have been inactive for a maximum of 30 days are included.\n- The functions and departments are linked to the employment contracts.\n\n### AD Data\n\n- Only the AD accounts with a entered email address are included.\n- Only the attributes sAMAccountName, mail and employeeId are retrieved.\n- This data is based on the value in the 'employeeId' linked to the HR data. Only the linked data (common) is used.\n\n### Database and export\n\n- The databases are exported before each export.\n- An addition or removal of a person or an employment will be audited.\n\n## Custom source fields used in this connector\n\n### Person.Custom.PlanCareAchternaam\n```javascript\nfunction getDisplayName() {\n \n    let initials = source.voorletters_P00303;\n    let firstName = source.roepnaam_P01003;\n    let middleName = source.voorvoegsels_P00302;\n    let lastName = source.geboortenaam_P00301;\n    let middleNamePartner = source.voorvoegsels_P00391;\n    let lastNamePartner = source.geboortenaam_P00390;\n\tlet nameFormatted = \"\";\n\t\n    switch(source.gebruikAchternaam_P00304) {\n        case \"E\":\n\t\t\tnameFormatted = lastName;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n\t\tcase \"P\":\n\t\t\tnameFormatted = lastNamePartner;\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + ' ' + middleNamePartner }\n\t\t\tbreak;\n        case \"C\":\n\t\t\tnameFormatted = lastName + '-';\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + middleNamePartner + ' ' }\n\t\t\tnameFormatted = nameFormatted + lastNamePartner;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n        case \"B\":\n\t\t\tnameFormatted = lastNamePartner + '-';\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + middleName + ' ' }\n\t\t\tnameFormatted = nameFormatted + lastName;\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + ' ' + middleNamePartner }\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnameFormatted = lastName;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n    }\n    const displayName = nameFormatted.trim();\n    \n\treturn displayName;\n}\n\ngetDisplayName();\n```\n### Person.Custom.PlanCareAchternaamInitVoorvoegselVoornaam\n```javascript\nfunction getDisplayName() {\n \n    let initials = source.voorletters_P00303;\n    let firstName = source.roepnaam_P01003;\n    let middleName = source.voorvoegsels_P00302;\n    let lastName = source.geboortenaam_P00301;\n    let middleNamePartner = source.voorvoegsels_P00391;\n    let lastNamePartner = source.geboortenaam_P00390;\n    let nameFormatted = \"\";\n\t\n    switch(source.gebruikAchternaam_P00304) {\n        case \"E\":\n\t\t\tnameFormatted = lastName;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n\t\tcase \"P\":\n\t\t\tnameFormatted = lastNamePartner;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + ' ' + middleNamePartner }\n\t\t\tbreak;\n        case \"C\":\n\t\t\tnameFormatted = lastName + '-';\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + middleNamePartner + ' ' }\n\t\t\tnameFormatted = nameFormatted + lastNamePartner;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n        case \"B\":\n\t\t\tnameFormatted = lastNamePartner + '-';\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + middleName + ' ' }\n\t\t\tnameFormatted = nameFormatted + lastName;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + ' ' + middleNamePartner }\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnameFormatted = lastName;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n    }\n    nameFormatted = nameFormatted + ' ' + firstName;\n    const displayName = nameFormatted.trim();\n    \n\treturn displayName;\n}\n\ngetDisplayName();\n```\n### Person.Custom.PlanCareGebruikNaam\n```javascript\nfunction getValue() {\n    if(source.gebruikAchternaam_P00304 == \"P\") {\n        return \"Geb. naam partner\";\n    }\n    if(source.gebruikAchternaam_P00304 == \"E\") {\n        return \"Geboortenaam\";\n    }\n    if(source.gebruikAchternaam_P00304 == \"B\") {\n        return \"Geb. naam partner + Geboortenaam\";\n    }\n    if(source.gebruikAchternaam_P00304 == \"C\") {\n        return \"Geboortenaam + Geb. naam partner\", \"Geboortenaam\";\n    }\n}\n\ngetValue();\n```\n\n### Person.Custom.PlanCareNaamVolledig\n```javascript\nfunction getDisplayName() {\n \n    let initials = source.voorletters_P00303;\n    let firstName = source.roepnaam_P01003;\n    let middleName = source.voorvoegsels_P00302;\n    let lastName = source.geboortenaam_P00301;\n    let middleNamePartner = source.voorvoegsels_P00391;\n    let lastNamePartner = source.geboortenaam_P00390;\n    let nameFormatted = \"\";\n\t\n    switch(source.gebruikAchternaam_P00304) {\n        case \"E\":\n\t\t\tnameFormatted = lastName;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n\t\tcase \"P\":\n\t\t\tnameFormatted = lastNamePartner;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + ' ' + middleNamePartner }\n\t\t\tbreak;\n        case \"C\":\n\t\t\tnameFormatted = lastName + '-';\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + middleNamePartner + ' ' }\n\t\t\tnameFormatted = nameFormatted + lastNamePartner;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n        case \"B\":\n\t\t\tnameFormatted = lastNamePartner + '-';\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + middleName + ' ' }\n\t\t\tnameFormatted = nameFormatted + lastName;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleNamePartner !== 'undefined' \u0026\u0026 middleNamePartner) { nameFormatted = nameFormatted + ' ' + middleNamePartner }\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnameFormatted = lastName;\n\t\t\tnameFormatted = nameFormatted + ' ' + initials;\n\t\t\tif (typeof middleName !== 'undefined' \u0026\u0026 middleName) { nameFormatted = nameFormatted + ' ' + middleName }\n\t\t\tbreak;\n    }\n    nameFormatted = nameFormatted;\n    const displayName = nameFormatted.trim();\n    \n\treturn displayName;\n}\n\ngetDisplayName();\n```\n### Contract.Custom.PlanCareContractStartDate\nUse the employement start date here (and not the position start date)\nTo parse a date use:\n```Powershell\n        Datum_in_dienst                         = [datetime]::parseexact($p.PrimaryContract.Custom.PlanCareContractStartDate, 'yyyy-MM-dd', $null)\n```\n\n### Contract.Custom.PlanCareContractEndDate\nUse the employment end date here (and not the position start date)\nTo parse a date use:\n```Powershell\n        Datum_uit_dienst                         = [datetime]::parseexact($p.PrimaryContract.Custom.PlanCareContractEndDate, 'yyyy-MM-dd', $null)\n```\n\n# HelloID Docs\nThe official HelloID documentation can be found at: https://docs.helloid.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftools4everbv%2Fhelloid-conn-prov-target-plancare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftools4everbv%2Fhelloid-conn-prov-target-plancare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftools4everbv%2Fhelloid-conn-prov-target-plancare/lists"}