First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<CaseType>
<name>Civil and Political</name>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Change Case Type</name>
</ActivityType>
<ActivityType>
<name>Change Case Status</name>
</ActivityType>
<ActivityType>
<name>Follow up</name>
</ActivityType>
<ActivityType>
<name>Source(incoming)</name>
</ActivityType>
<ActivityType>
<name>Incoming correspondence</name>
</ActivityType>
<ActivityType>
<name>Incoming Press Release</name>
</ActivityType>
<ActivityType>
<name>Complaint</name>
</ActivityType>
<ActivityType>
<name>Urgent Action(incoming)</name>
</ActivityType>
<ActivityType>
<name>Outgoing correspondence</name>
</ActivityType>
<ActivityType>
<name>Outgoing Press Release</name>
</ActivityType>
<ActivityType>
<name>FL Action(outgoing)</name>
</ActivityType>
<ActivityType>
<name>FL Urgent Action(outgoing)</name>
</ActivityType>
<ActivityType>
<name>Lobbying(outgoing)</name>
</ActivityType>
</ActivityTypes>
<ActivitySets>
<ActivitySet>
<name>standard_timeline</name>
<label>Standard Timeline</label>
<timeline>true</timeline>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<status>Closed</status>
</ActivityType>
<ActivityType>
<name>Source(incoming)</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>2</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Follow up</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>14</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
</ActivityTypes>
</ActivitySet>
</ActivitySets>
<CaseRoles>
<RelationshipType>
<name>Case Coordinator</name>
<creator>1</creator>
</RelationshipType>
<RelationshipType>
<name>Supervisor</name>
</RelationshipType>
</CaseRoles>
</CaseType>

View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<CaseType>
<name>Economic, Social and Cultural</name>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Change Case Type</name>
</ActivityType>
<ActivityType>
<name>Change Case Status</name>
</ActivityType>
<ActivityType>
<name>Follow up</name>
</ActivityType>
<ActivityType>
<name>Source(incoming)</name>
</ActivityType>
<ActivityType>
<name>Incoming correspondence</name>
</ActivityType>
<ActivityType>
<name>Incoming Press Release</name>
</ActivityType>
<ActivityType>
<name>Complaint</name>
</ActivityType>
<ActivityType>
<name>Urgent Action(incoming)</name>
</ActivityType>
<ActivityType>
<name>Outgoing correspondence</name>
</ActivityType>
<ActivityType>
<name>Outgoing Press Release</name>
</ActivityType>
<ActivityType>
<name>FL Action(outgoing)</name>
</ActivityType>
<ActivityType>
<name>FL Urgent Action(outgoing)</name>
</ActivityType>
<ActivityType>
<name>Lobbying(outgoing)</name>
</ActivityType>
</ActivityTypes>
<ActivitySets>
<ActivitySet>
<name>standard_timeline</name>
<label>Standard Timeline</label>
<timeline>true</timeline>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<status>Closed</status>
</ActivityType>
<ActivityType>
<name>Source(incoming)</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>2</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Follow up</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>14</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
</ActivityTypes>
</ActivitySet>
</ActivitySets>
<CaseRoles>
<RelationshipType>
<name>Case Coordinator</name>
<creator>1</creator>
</RelationshipType>
<RelationshipType>
<name>Supervisor</name>
</RelationshipType>
</CaseRoles>
</CaseType>

View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<CaseType>
<name>Gender Issues</name>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Change Case Type</name>
</ActivityType>
<ActivityType>
<name>Change Case Status</name>
</ActivityType>
<ActivityType>
<name>Follow up</name>
</ActivityType>
<ActivityType>
<name>Source(incoming)</name>
</ActivityType>
<ActivityType>
<name>Incoming correspondence</name>
</ActivityType>
<ActivityType>
<name>Incoming Press Release</name>
</ActivityType>
<ActivityType>
<name>Complaint</name>
</ActivityType>
<ActivityType>
<name>Urgent Action(incoming)</name>
</ActivityType>
<ActivityType>
<name>Outgoing correspondence</name>
</ActivityType>
<ActivityType>
<name>Outgoing Press Release</name>
</ActivityType>
<ActivityType>
<name>FL Action(outgoing)</name>
</ActivityType>
<ActivityType>
<name>FL Urgent Action(outgoing)</name>
</ActivityType>
<ActivityType>
<name>Lobbying(outgoing)</name>
</ActivityType>
</ActivityTypes>
<ActivitySets>
<ActivitySet>
<name>standard_timeline</name>
<label>Standard Timeline</label>
<timeline>true</timeline>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<status>Closed</status>
</ActivityType>
<ActivityType>
<name>Source(incoming)</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>2</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Follow up</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>14</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
</ActivityTypes>
</ActivitySet>
</ActivitySets>
<CaseRoles>
<RelationshipType>
<name>Case Coordinator</name>
<creator>1</creator>
</RelationshipType>
<RelationshipType>
<name>Supervisor</name>
</RelationshipType>
</CaseRoles>
</CaseType>

View file

@ -0,0 +1,44 @@
-- /*******************************************************
-- *
-- * Configuration Data for CiviCase Component
-- * For: HRD
-- *
-- *******************************************************/
-- /*******************************************************
-- *
-- * Case Types
-- *
-- *******************************************************/
SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase';
INSERT INTO
`civicrm_case_type` (`title`, `name`, `weight`, `is_reserved`, `is_active`)
VALUES
('Civil and Political' , 'Civil and Political' , 1, NULL, 1, 1),
('Economic, Social and Cultural', 'Economic, Social and Cultural', 2, NULL, 1, 1),
('Gender Issues' , 'Gender Issues' , 3, NULL, 1, 1);
-- /*******************************************************
-- *
-- * Additional Case Activity Types
-- *
-- *******************************************************/
SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
INSERT INTO
`civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
VALUES
(@option_group_id_activity_type, 'Source(incoming)', (SELECT @max_val := @max_val+1), 'Source(incoming)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'Incoming correspondence', (SELECT @max_val := @max_val+1), 'Incoming correspondence', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'Incoming Press Release', (SELECT @max_val := @max_val+1), 'Incoming Press Release', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'Complaint', (SELECT @max_val := @max_val+1), 'Complaint', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'Urgent Action(incoming)', (SELECT @max_val := @max_val+1), 'Urgent Action(incoming)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'Outgoing correspondence', (SELECT @max_val := @max_val+1), 'Outgoing correspondence', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'Outgoing Press Release', (SELECT @max_val := @max_val+1), 'Outgoing Press Release', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'FL Action(outgoing)', (SELECT @max_val := @max_val+1), 'FL Action(outgoing)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'FL Urgent Action(outgoing)', (SELECT @max_val := @max_val+1), 'FL Urgent Action(outgoing)', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId ),
(@option_group_id_activity_type, 'Lobbying(outgoing)', (SELECT @max_val := @max_val+1), '', NULL, 0, 0, (SELECT @max_val := @max_val+1), '', 0, 0, 1, @caseCompId );

View file

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<menu>
<item>
<path>civicrm/case</path>
<title>CiviCase Dashboard</title>
<page_callback>CRM_Case_Page_DashBoard</page_callback>
<page_type>1</page_type>
<weight>900</weight>
<component>CiviCase</component>
</item>
<item>
<path>civicrm/case/add</path>
<title>Open Case</title>
<page_callback>CRM_Case_Form_Case</page_callback>
<page_type>1</page_type>
<component>CiviCase</component>
</item>
<item>
<path>civicrm/case/search</path>
<title>Find Cases</title>
<page_callback>CRM_Case_Controller_Search</page_callback>
<page_type>1</page_type>
<weight>910</weight>
</item>
<item>
<path>civicrm/case/activity</path>
<title>Case Activity</title>
<page_callback>CRM_Case_Form_Activity</page_callback>
</item>
<item>
<path>civicrm/case/report</path>
<title>Case Activity Audit</title>
<page_callback>CRM_Case_Form_Report</page_callback>
<access_arguments>access all cases and activities</access_arguments>
</item>
<item>
<path>civicrm/case/cd/edit</path>
<title>Case Custom Set</title>
<page_callback>CRM_Case_Form_CustomData</page_callback>
</item>
<item>
<path>civicrm/contact/view/case</path>
<title>Case</title>
<page_callback>CRM_Case_Page_Tab</page_callback>
</item>
<item>
<path>civicrm/case/activity/view</path>
<title>Activity View</title>
<page_callback>CRM_Case_Form_ActivityView</page_callback>
</item>
<item>
<path>civicrm/contact/view/case/editClient</path>
<title>Assign to Another Client</title>
<page_callback>CRM_Case_Form_EditClient</page_callback>
</item>
<item>
<path>civicrm/case/addToCase</path>
<title>File on Case</title>
<page_callback>CRM_Case_Form_ActivityToCase</page_callback>
</item>
<item>
<path>civicrm/case/details</path>
<title>Case Details</title>
<page_callback>CRM_Case_Page_CaseDetails</page_callback>
</item>
<item>
<path>civicrm/admin/setting/case</path>
<title>CiviCase Settings</title>
<page_callback>CRM_Admin_Form_Setting_Case</page_callback>
<adminGroup>CiviCase</adminGroup>
<icon>admin/small/36.png</icon>
<weight>380</weight>
</item>
<item>
<path>civicrm/admin/options/case_type</path>
<title>Case Types</title>
<desc>List of types which can be assigned to Cases. (Enable the Cases tab from System Settings - Enable Components if you want to track cases.)</desc>
<access_arguments>administer CiviCase</access_arguments>
<page_callback>CRM_Core_Page_Redirect</page_callback>
<page_arguments>url=civicrm/a/#/caseType</page_arguments>
<adminGroup>CiviCase</adminGroup>
<icon>admin/small/case_type.png</icon>
<weight>390</weight>
</item>
<item>
<path>civicrm/admin/options/redaction_rule</path>
<title>Redaction Rules</title>
<desc>List of rules which can be applied to user input strings so that the redacted output can be recognized as repeated instances of the same string or can be identified as a "semantic type of the data element" within case data.</desc>
<page_callback>CRM_Admin_Page_Options</page_callback>
<access_arguments>administer CiviCase</access_arguments>
<adminGroup>CiviCase</adminGroup>
<icon>admin/small/redaction_type.png</icon>
<weight>400</weight>
</item>
<item>
<path>civicrm/admin/options/case_status</path>
<title>Case Statuses</title>
<desc>List of statuses that can be assigned to a case.</desc>
<page_callback>CRM_Admin_Page_Options</page_callback>
<access_arguments>administer CiviCase</access_arguments>
<adminGroup>CiviCase</adminGroup>
<icon>admin/small/case_type.png</icon>
<weight>400</weight>
</item>
<item>
<path>civicrm/admin/options/encounter_medium</path>
<title>Encounter Mediums</title>
<desc>List of encounter mediums.</desc>
<page_callback>CRM_Admin_Page_Options</page_callback>
<access_arguments>administer CiviCase</access_arguments>
<adminGroup>CiviCase</adminGroup>
<icon>admin/small/case_type.png</icon>
<weight>400</weight>
</item>
<item>
<path>civicrm/case/report/print</path>
<page_callback>CRM_Case_XMLProcessor_Report::printCaseReport</page_callback>
<access_arguments>access all cases and activities</access_arguments>
</item>
<item>
<path>civicrm/case/ajax/addclient</path>
<page_callback>CRM_Case_Page_AJAX::addClient</page_callback>
</item>
<item>
<path>civicrm/case/ajax/processtags</path>
<page_callback>CRM_Case_Page_AJAX::processCaseTags</page_callback>
<access_arguments>access CiviCRM</access_arguments>
<page_type>3</page_type>
</item>
<item>
<path>civicrm/case/ajax/details</path>
<page_callback>CRM_Case_Page_AJAX::CaseDetails</page_callback>
</item>
<item>
<path>civicrm/ajax/delcaserole</path>
<page_callback>CRM_Case_Page_AJAX::deleteCaseRoles</page_callback>
</item>
</menu>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<Settings>
<!--
DEPRECATED
The settings in this document should be migrated to the conventional settings framework, which allows
a greater variety of configuration-management practices (e.g. web-based config, API access, file overrides).
-->
<!-- List the group whose members should appear as contacts on all Manage Case screens.
Only one group name is supported for now.
It needs to match the name column in the civicrm_group table (not the title), so avoid using space characters. -->
<group name="Case_Resources" />
<!-- Set this to 1 if you want case activity emails to be redacted -->
<!-- SEE ALSO: Setting "civicaseRedactActivityEmail" -->
<RedactActivityEmail>0</RedactActivityEmail>
<!-- Set this to 1 if you want to allow multiple clients to be associated with a single case -->
<!-- SEE ALSO: Setting "civicaseAllowMultipleClients" -->
<AllowMultipleCaseClients>0</AllowMultipleCaseClients>
<!-- Set this to 1 if you want to have activity types on Manage Case
screen sorted in XML file order, default is alphabetical -->
<!-- SEE ALSO: Setting "civicaseNaturalActivityTypeSort" -->
<NaturalActivityTypeSort>0</NaturalActivityTypeSort>
<!-- Add activity types which should NOT be editable here with editable = 0 -->
<ActivityTypes>
<ActivityType>
<name>Change Case Status</name>
<editable>0</editable>
</ActivityType>
<ActivityType>
<name>Change Case Start Date</name>
<editable>0</editable>
</ActivityType>
</ActivityTypes>
</Settings>

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<CaseType>
<name>Adult Day Care Referral</name>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Medical evaluation</name>
</ActivityType>
<ActivityType>
<name>Mental health evaluation</name>
</ActivityType>
<ActivityType>
<name>ADC referral</name>
</ActivityType>
<ActivityType>
<name>Follow up</name>
</ActivityType>
<ActivityType>
<name>Change Case Type</name>
</ActivityType>
<ActivityType>
<name>Change Case Status</name>
</ActivityType>
<ActivityType>
<name>Change Case Start Date</name>
</ActivityType>
<ActivityType>
<name>Link Cases</name>
</ActivityType>
</ActivityTypes>
<ActivitySets>
<ActivitySet>
<name>standard_timeline</name>
<label>Standard Timeline</label>
<timeline>true</timeline>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<status>Completed</status>
</ActivityType>
<ActivityType>
<name>Medical evaluation</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>3</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Mental health evaluation</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>7</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>ADC referral</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>10</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Follow up</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>14</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
</ActivityTypes>
</ActivitySet>
</ActivitySets>
<CaseRoles>
<RelationshipType>
<name>Senior Services Coordinator</name>
<creator>1</creator>
<manager>1</manager>
</RelationshipType>
<RelationshipType>
<name>Health Services Coordinator</name>
</RelationshipType>
<RelationshipType>
<name>Benefits Specialist</name>
</RelationshipType>
</CaseRoles>
</CaseType>

View file

@ -0,0 +1,101 @@
-- /**********************************************************************
-- *
-- * Configuration Data for CiviCase Component
-- * For: Sample Case Types - Housing Support and Adult Day Care Referral
-- *
-- **********************************************************************/
SELECT @caseCompId := id FROM `civicrm_component` where `name` like 'CiviCase';
-- /*******************************************************
-- *
-- * Case Types
-- *
-- *******************************************************/
SELECT @max_wt := COALESCE( max(weight), 0 ) from civicrm_case_type;
INSERT IGNORE INTO `civicrm_case_type` ( {localize field='title'}`title`{/localize}, `name`, {localize field='description'}`description`{/localize}, `weight`, `is_reserved`, `is_active`) VALUES
({localize}'{ts escape="sql"}Housing Support{/ts}'{/localize}, 'housing_support', {localize}'{ts escape="sql"}Help homeless individuals obtain temporary and long-term housing{/ts}'{/localize}, @max_wt + 1, 0, 1),
({localize}'{ts escape="sql"}Adult Day Care Referral{/ts}'{/localize}, 'adult_day_care_referral', {localize}'{ts escape="sql"}Arranging adult day care for senior individuals{/ts}'{/localize}, @max_wt + 2, 0, 1);
-- CRM-15343 set the auto increment civicrm_case_type.id start point to max id to avoid conflict in future insertion
SELECT @max_case_type_id := max(id) from civicrm_case_type;
SET @query = CONCAT("ALTER TABLE civicrm_case_type AUTO_INCREMENT = ", IFNULL(@max_case_type_id,1));
PREPARE alter_case_type_auto_inc FROM @query;
EXECUTE alter_case_type_auto_inc;
DEALLOCATE PREPARE alter_case_type_auto_inc;
-- /*******************************************************
-- *
-- * Case Status - Set names for Open and Closed
-- *
-- *******************************************************/
SELECT @csgId := max(id) from civicrm_option_group where name = 'case_status';
{if $multilingual}
{foreach from=$locales item=locale}
UPDATE civicrm_option_value SET name = 'Open' where option_group_id = @csgId AND label_{$locale} = 'Ongoing';
UPDATE civicrm_option_value SET name = 'Closed' where option_group_id = @csgId AND label_{$locale} = 'Resolved';
{/foreach}
{else}
UPDATE civicrm_option_value SET name = 'Open' where option_group_id = @csgId AND label = 'Ongoing';
UPDATE civicrm_option_value SET name = 'Closed' where option_group_id = @csgId AND label = 'Resolved';
{/if}
-- /*******************************************************
-- *
-- * Activity Types
-- *
-- *******************************************************/
SELECT @option_group_id_activity_type := max(id) from civicrm_option_group where name = 'activity_type';
SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @option_group_id_activity_type;
INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Medical evaluation{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Medical evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Medical evaluation'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Mental health evaluation{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Mental health evaluation', NULL, 0, 0, (SELECT @max_val := @max_val+1), 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Mental health evaluation'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Secure temporary housing{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Secure temporary housing', NULL, 0, 0, (SELECT @max_val := @max_val+1), 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Secure temporary housing'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Income and benefits stabilization{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Income and benefits stabilization', NULL, 0, 0, (SELECT @max_val := @max_val+1), 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Income and benefits stabilization'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}Long-term housing plan{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'Long-term housing plan', NULL, 0, 0, (SELECT @max_val := @max_val+1), 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'Long-term housing plan'));
INSERT INTO `civicrm_option_value` ( `option_group_id`, {localize field='label'}`label`{/localize}, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `is_optgroup`, `is_reserved`, `is_active`, `component_id` )
(SELECT @option_group_id_activity_type, {localize}'{ts escape="sql"}ADC referral{/ts}'{/localize}, (SELECT @max_val := @max_val+1), 'ADC referral', NULL, 0, 0, (SELECT @max_val := @max_val+1), 0, 0, 1, @caseCompId
FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_option_value` WHERE `name` = 'ADC referral'));
-- /*******************************************************
-- *
-- * Relationship Types
-- *
-- *******************************************************/
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, {localize field='label_a_b'}`label_a_b`{/localize}, `name_b_a`, {localize field='label_b_a'}`label_b_a`{/localize}, {localize field='description'}`description`{/localize}, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (SELECT 'Homeless Services Coordinator is', {localize}'{ts escape="sql"}Homeless Services Coordinator is{/ts}'{/localize}, 'Homeless Services Coordinator', {localize}'{ts escape="sql"}Homeless Services Coordinator{/ts}'{/localize}, {localize}'{ts escape="sql"}Homeless Services Coordinator{/ts}'{/localize}, 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Homeless Services Coordinator is'));
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, {localize field='label_a_b'}`label_a_b`{/localize}, `name_b_a`, {localize field='label_b_a'}`label_b_a`{/localize}, {localize field='description'}`description`{/localize}, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (
SELECT 'Health Services Coordinator is', {localize}'{ts escape="sql"}Health Services Coordinator is{/ts}'{/localize}, 'Health Services Coordinator', {localize}'{ts escape="sql"}Health Services Coordinator{/ts}'{/localize}, {localize}'{ts escape="sql"}Health Services Coordinator{/ts}'{/localize}, 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Health Services Coordinator is'));
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, {localize field='label_a_b'}`label_a_b`{/localize}, `name_b_a`, {localize field='label_b_a'}`label_b_a`{/localize}, {localize field='description'}`description`{/localize}, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (
SELECT 'Senior Services Coordinator is', {localize}'{ts escape="sql"}Senior Services Coordinator is{/ts}'{/localize}, 'Senior Services Coordinator', {localize}'{ts escape="sql"}Senior Services Coordinator{/ts}'{/localize}, {localize}'{ts escape="sql"}Senior Services Coordinator{/ts}'{/localize}, 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Senior Services Coordinator is'));
INSERT INTO `civicrm_relationship_type` ( `name_a_b`, {localize field='label_a_b'}`label_a_b`{/localize}, `name_b_a`, {localize field='label_b_a'}`label_b_a`{/localize}, {localize field='description'}`description`{/localize}, `contact_type_a`, `contact_type_b`, `is_reserved`, `is_active` ) (
SELECT 'Benefits Specialist is', {localize}'{ts escape="sql"}Benefits Specialist is{/ts}'{/localize}, 'Benefits Specialist', {localize}'{ts escape="sql"}Benefits Specialist{/ts}'{/localize}, {localize}'{ts escape="sql"}Benefits Specialist{/ts}'{/localize}, 'Individual', 'Individual', 0, 1 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_relationship_type` WHERE `name_a_b` = 'Benefits Specialist is'));
-- /*******************************************************
-- *
-- * Case Resources Group
-- *
-- *******************************************************/
INSERT INTO `civicrm_group` ( `name`, {localize field='title'}`title`{/localize}, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `parents`, `children`, `is_hidden` ) (SELECT 'Case_Resources', {localize}'{ts escape="sql"}Case Resources{/ts}'{/localize}, 'Contacts in this group are listed with their phone number and email when viewing case. You also can send copies of case activities to these contacts.', NULL, NULL, 1, 'User and User Admin Only', ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', '{literal}a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";s:6:"gender";i:1;}{/literal}', '{literal}a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}{/literal}', '2', NULL, NULL, NULL, 0 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_group` WHERE `name` = 'Case_Resources'));

View file

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<CaseType>
<name>Housing Support</name>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Medical evaluation</name>
</ActivityType>
<ActivityType>
<name>Mental health evaluation</name>
</ActivityType>
<ActivityType>
<name>Secure temporary housing</name>
</ActivityType>
<ActivityType>
<name>Income and benefits stabilization</name>
</ActivityType>
<ActivityType>
<name>Long-term housing plan</name>
</ActivityType>
<ActivityType>
<name>Follow up</name>
</ActivityType>
<ActivityType>
<name>Change Case Type</name>
</ActivityType>
<ActivityType>
<name>Change Case Status</name>
</ActivityType>
<ActivityType>
<name>Change Case Start Date</name>
</ActivityType>
<ActivityType>
<name>Link Cases</name>
</ActivityType>
</ActivityTypes>
<ActivitySets>
<ActivitySet>
<name>standard_timeline</name>
<label>Standard Timeline</label>
<timeline>true</timeline>
<ActivityTypes>
<ActivityType>
<name>Open Case</name>
<status>Completed</status>
</ActivityType>
<ActivityType>
<name>Medical evaluation</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>1</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Mental health evaluation</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>1</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Secure temporary housing</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>2</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Follow up</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>3</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Income and benefits stabilization</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>7</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Long-term housing plan</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>14</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Follow up</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>21</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
</ActivityTypes>
</ActivitySet>
</ActivitySets>
<CaseRoles>
<RelationshipType>
<name>Homeless Services Coordinator</name>
<creator>1</creator>
<manager>1</manager>
</RelationshipType>
<RelationshipType>
<name>Health Services Coordinator</name>
</RelationshipType>
<RelationshipType>
<name>Benefits Specialist</name>
</RelationshipType>
</CaseRoles>
</CaseType>

View file

@ -0,0 +1,210 @@
<?xml version="1.0" encoding="UTF-8"?>
<Case>
<Client>Jack Smith, M.D.</Client>
<CaseType>Substance Abuse</CaseType>
<CaseSubject>Acute morphine addiction</CaseSubject>
<CaseStatus>Ongoing</CaseStatus>
<CaseOpen>2008-09-12</CaseOpen>
<CaseClose></CaseClose>
<ActivitySet>
<Label>15 Day Review</Label>
<IncludeActivities>All</IncludeActivities>
<Redact>false</Redact>
<Activity>
<EditURL>http://drupal.demo.civicrm.org/civicrm/activity?action=update&amp;id=13&amp;cid=201&amp;reset=1</EditURL>
<Fields>
<Field>
<Label>Activity Type</Label>
<Category>Case History</Category>
<Value>Open Case</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Created By</Label>
<Value>Ann Jones</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Reporter</Label>
<Value>Ann Jones</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Due Date</Label>
<Value>2008-09-12T11:00</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Activity Date</Label>
<Value>2008-09-12T11:00</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Subject</Label>
<Value>Opened the case during inbound phone call.</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Medium</Label>
<Value>Phone</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Duration</Label>
<Value>15</Value>
<Type>Int</Type>
</Field>
<Field>
<Label>Details</Label>
<Value>Client called very distressed and with suicidal thoughts.</Value>
<Type>Memo</Type>
</Field>
<Field>
<Label>Status</Label>
<Value>Completed</Value>
<Type>String</Type>
</Field>
</Fields>
</Activity>
<Activity>
<EditURL>http://drupal.demo.civicrm.org/civicrm/activity?action=update&amp;id=14&amp;cid=201&amp;reset=1</EditURL>
<Fields>
<Field>
<Label>Activity Type</Label>
<Category>Case History</Category>
<Value>Presenting Problem</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Created By</Label>
<Value>Ann Jones</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Reporter</Label>
<Value>Jack Smith, M.D.</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Due Date</Label>
<Value>2008-09-12</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Activity Date</Label>
<Value>2008-09-12T11:00</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Summary</Label>
<Value>Defined the problem as seen by the client.</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Medium</Label>
<Value>Phone</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Duration</Label>
<Value>30</Value>
<Type>Int</Type>
</Field>
<Field>
<Label>Details</Label>
<Value>Client admitted to heavy drug use and said he really needed help kicking the habit. Problem started after cycling accident in 2006.</Value>
<Type>Memo</Type>
</Field>
<Field>
<Label>Date First Noticed</Label>
<Value>2006-09-01</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Status</Label>
<Value>Completed</Value>
<Type>String</Type>
</Field>
</Fields>
</Activity>
<Activity>
<EditURL>http://drupal.demo.civicrm.org/civicrm/activity?action=update&amp;id=15&amp;cid=201&amp;reset=1</EditURL>
<Fields>
<Field>
<Label>Activity Type</Label>
<Category>Medications and Substance Use</Category>
<Value>Medication and Drug Use</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Created By</Label>
<Value>Ann Jones</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Reported By</Label>
<Value>Jack Smith, M.D.</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Due Date</Label>
<Value>2008-09-17</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Actual Date</Label>
<Value>2008-09-17T10:00</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Duration</Label>
<Value>50</Value>
<Type>Int</Type>
</Field>
<Field>
<Label>Details</Label>
<Value>Went through a list of all the client's prescribed and non-prescribed medication and drug usage, focusing on the last 2 years. Usage trends are significantly upward for the primary problem drug.</Value>
<Type>Memo</Type>
</Field>
<Field>
<Label>Medium</Label>
<Value>In-Person</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Prescribed Medication Listing</Label>
<Value>http://drupal.demo.civicrm.org/civicrm/file?reset=1&amp;id=1&amp;eid=102</Value>
<Type>File</Type>
</Field>
<CustomGroup>
<GroupName>Drug Usage</GroupName>
<Field>
<Label>Drug 1 - Drug Name</Label>
<Value>Morphine</Value>
<Type>String</Type>
</Field>
<Field>
<Label>Drug 1 - Preferred Drug</Label>
<Value>Yes</Value>
<Type>Boolean</Type>
</Field>
<Field>
<Label>Drug 1 - Date First Used</Label>
<Value>2006-09-01</Value>
<Type>Date</Type>
</Field>
<Field>
<Label>Drug 1 -Date Most Recently Used</Label>
<Value>2008-09-15</Value>
<Type>Date</Type>
</Field>
</CustomGroup>
<Field>
<Label>Status</Label>
<Value>Completed</Value>
<Type>String</Type>
</Field>
</Fields>
</Activity>
</ActivitySet>
</Case>