Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
including CRM-3511, CRM-3676, CRM-3840, CRM-3968, CRM-3984, CRM-3985, CRM-3989, CRM-3990, CRM-3991 works/fixes
  • Loading branch information
chastell committed Jan 14, 2009
1 parent 5433b29 commit aa0fb20
Show file tree
Hide file tree
Showing 51 changed files with 968 additions and 647 deletions.
33 changes: 33 additions & 0 deletions CRM/Case/Form/CaseView.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public function buildQuickForm( )
$this->add( 'checkbox', 'activity_deleted' , ts( 'Deleted Activities' ) );
}


//get case related relationships (Case Role)
$caseRelationships = CRM_Case_BAO_Case::getCaseRoles( $this->_contactID, $this->_caseID );
$this->assign('caseRelationships', $caseRelationships);
Expand All @@ -172,6 +173,38 @@ public function buildQuickForm( )

$this->add('select', 'reporter_id', ts( 'Reporter/Role' ), $reporters );

// Include other relationships
$relClient = CRM_Contact_BAO_Relationship::getRelationship($this->_contactID,
CRM_Contact_BAO_Relationship::CURRENT,
0, 0, 0, null, null, false);
$session =& CRM_Core_Session::singleton();
$relUser = CRM_Contact_BAO_Relationship::getRelationship($session->get('userID'),
CRM_Contact_BAO_Relationship::CURRENT,
0, 0, 0, null, null, false);

// Now remove ones that are also roles so they don't show up twice. Also remove the client itself.
// We conveniently already have the required list of cids in the reporters variable.
$clientRelationships = array();
$userRelationships = array();
foreach($relClient as $r)
{
$cid = $r['cid'];
if (($cid != $this->_contactID) && (! array_key_exists($cid, $reporters)))
{
$clientRelationships[] = $r;
}
}
foreach($relUser as $r)
{
$cid = $r['cid'];
if (($cid != $this->_contactID) && (! array_key_exists($cid, $reporters)))
{
$userRelationships[] = $r;
}
}
$this->assign('clientRelationships', $clientRelationships);
$this->assign('userRelationships', $userRelationships);

$this->addButtons(array(
array ( 'type' => 'cancel',
'name' => ts('Done'),
Expand Down
18 changes: 0 additions & 18 deletions CRM/Case/xml/physicianhealthbc/ReferralToCounselor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,12 @@
<name>Open Case</name>
<status>Closed</status>
</ActivityType>
<ActivityType>
<name>Notify service provider</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>2</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Facilitate first appointment</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>2</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Survey client satisfaction Referral to counselor</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>21</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>
Expand Down
13 changes: 5 additions & 8 deletions CRM/Case/xml/physicianhealthbc/ReferralToFamilyDoctor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<name>Notify selected referral target</name>
</ActivityType>
<ActivityType>
<name>Call client and deliver names</name>
<name>Facilitate first appointment</name>
</ActivityType>
<ActivityType>
<name>Survey client satisfaction Referral to family doctor</name>
Expand Down Expand Up @@ -43,16 +43,10 @@
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Call client and deliver names</name>
<name>Facilitate first appointment</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>
<ActivityType>
<name>Survey client satisfaction Referral to family doctor</name>
Expand All @@ -68,5 +62,8 @@
<name>Intake Physician</name>
<creator>1</creator>
</RelationshipType>
<RelationshipType>
<name>Family Doctor</name>
</RelationshipType>
</CaseRoles>
</CaseType>
6 changes: 0 additions & 6 deletions CRM/Case/xml/physicianhealthbc/ReferralToSpecialist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@
<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>
<ActivityType>
<name>Survey client satisfaction Referral to specialist</name>
Expand Down
27 changes: 18 additions & 9 deletions CRM/Case/xml/physicianhealthbc/ReturnToWork.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Beginning of earliest period totally absent from work</name>
<name>Record beginning of earliest total absence</name>
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Earliest return to any work activity</name>
<name>Record earliest return to work activity</name>
<max_instances>1</max_instances>
</ActivityType>
<ActivityType>
<name>Beginning of period of attempted full duties</name>
<name>Record beginning of period of attempted full duties</name>
</ActivityType>
<ActivityType>
<name>Beginning of period of restricted duties</name>
<name>Record beginning of period of restricted duties</name>
</ActivityType>
<ActivityType>
<name>Beginning of period totally absent from work</name>
<name>Record beginning of period total absence</name>
</ActivityType>
<ActivityType>
<name>Sign case coordination agreement</name>
</ActivityType>
<ActivityType>
<name>Change Case Type</name>
Expand Down Expand Up @@ -51,13 +54,19 @@
<status>Closed</status>
</ActivityType>
<ActivityType>
<name>Beginning of earliest period totally absent from work</name>
<name>Record beginning of earliest total absence</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>0</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Earliest return to any work activity</name>
<name>Sign case coordination agreement</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>7</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Record earliest return to work activity</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>30</reference_offset>
<reference_select>newest</reference_select>
Expand All @@ -69,13 +78,13 @@
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Beginning of period of restricted duties</name>
<name>Record beginning of period of restricted duties</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>30</reference_offset>
<reference_select>newest</reference_select>
</ActivityType>
<ActivityType>
<name>Beginning of period of attempted full duties</name>
<name>Record beginning of period of attempted full duties</name>
<reference_activity>Open Case</reference_activity>
<reference_offset>30</reference_offset>
<reference_select>newest</reference_select>
Expand Down
Loading

0 comments on commit aa0fb20

Please sign in to comment.