† event_get () #API Version = 2.7.3

† event_get () #API Version = 2.7.3

event_get ( session, event_id )

API VersionChanges respect to previous version
2.7.3

Added support for multiple comments

XML structure changed (see change details)

0.0.0Initial version
IMPORTANT: Remember to call session_init() indicating the appropriate API Version


Retrieves all information about an event.

Input

parameters:

  • session: is the session token obtained in the session_init() call
  • event_id: an event reference

Output

parameters:

result: an XML representation of the object:

  • version: Version of the XML representation. Indicates the API Version in which this format was introduced
  • ref: Reference to the EVENT in Linkcare platform
  • type: is the type of event. See more in event_type() function
    • id: Identifier of the EVENT type
    • desc: description of the EVENT type
  • status: is the status of the EVENT. Possible values OPEN/CLOSED
  • date: date assigned to the EVENT
  • close_date: date when the EVENT was considered to be closed
  • read_mark: (true/false) Indicates whether this EVENT has been 'read' by the session user. This value can be modified by setting the read mark using event_set_read_mark () API function. This property was introduced in API version 2.6.18
  • multi_message: (true/false) If true, this EVENT is similar to a chat and can contain multiple comments. Otherwise it is considered an EVENT that is sent from one user to another, and when the second USER responds, the EVENT is considered closed. Multi message events must be closed manually. This property was introduced in API version 2.7.4
  • phone_poster: is the phone of the event poster.
  • priority: priority order (HIGH / MEDIUM / NULL)
  • event_code
  • comments: list of comments associated to this EVENT
    • can_add: true/false. Indicates if the session user can add new comments
    • comment: contains all the information of a single comment
      • order: ordinal position of the comment
      • editable: (true/false) indicates whether the comment is editable by the Session user (the one that invokes event_get() )
      • date: datetime when the comment was created
      • channel: communication channel by which the comment was sent
        • type:
      • user: Information about the user that created the comment
        • ref: internal reference to the USER
        • nickname: nickname of the user
        • name: complete name of the USER
      • assigned_to: information about the assigned ROLE/TEAM/USER (who should take care of this EVENT)
        • user: (may be empty) Information about the assigned USER (if any) 
          • ref: internal reference to the USER
          • nickname: nickname of the user
          • name: complete name of the USER
        • team: (may be empty) Information about the assigned TEAM (if any)
          • ref:
          • name: name of the TEAM
        • role: (may be empty) Information about the assigned ROLE (if any)
          • ref: internal reference of the ROLE
          • name: name of the ROLE (translated to the current SESSION language)
  • closed_by: Information about the USER that marked this EVENT as "closed"
    • ref: internal reference to the USER
    • nickname: nickname of the user
    • name: complete name of the USER
  • follow_report: (true/false) if the event must be show in the follow report
  • call_type: IN/OUT/VOID. Is the direction of the communication between phone and phone_poster
  • modified: Information about the last person that modified the event
    • date: modification datetime
    • user: Information about the last USER that modified the EVENT
      • ref: internal reference to the USER
      • nickname: nickname of the user
      • name: complete name of the USER
  • issued_by: is the origin person that reports the event
    • ref: Reference of the issuer USER. It may be empty when the issuer is a person not registered in the system, In that case only the name will be available
    • nickname: Nickname of the USER (only when the issuer is a person registered in the system)
    • name: name of the issuer
    • date: datetime of creation of the EVENT
    • type: Can be POSTER /CASE / OTHER
    • description:
    • phone: The phone number that create the event
  • admission: is the admission XML object that is related by the event. See more in admission_get() function
  • case: is the case XML object that is related by the event. See more in case_get() function
  • tasks: is a list of tasks related with the event. See more in event_task_list() function
  • forms: is a list of forms related with the event. See more in event_form_list() function
  • permissions: edit and delete event permissions
    • edit: flag that indicates if event can be edited by active USER (true/false)
    • delete: flag that indicates if event can be deleted by active USER (true/false)
    • allow_add_activiy: (true/false) Indicates whether the EVENT admits the possibility of inserting ACTIVITIES. This property only makes sense if the EVENT is assigned to an ADMISSION and there exist an specific definition of this EVENT TYPE in the PROGRAM (see WORKPLAN). When the EVENT is not assigned to an ADMISSION, the value is always 'true'. This property was introduced in API version 2.7.6

ErrorMsg: any fault in the call, either in the validation of input parameters, errors in the connection to the database or any other error, this parameter returns the error message produced

ErrorCode

Request

sample:

event_get( “LCAAAAAAAAAAAAAA”, “54234“);

Response

sample:

<result>
  <event>
    <version>2.7.3</version>
    <ref>10674</ref>
    <type>
      <id>#EVENT:SOCIAL</id>
      <desc>I need some help</desc>
    </type>
    <status>OPEN</status>
    <date>2017-11-21 00:00:00</date>
    <close_date>2017-11-22 00:00:00</close_date>
    <read_mark>true</read_mark>
    <multi_message>false</multi_message>
    <phone_poster/>
    <priority>NULL</priority>
    <event_code/>
    <comments>
      <can_add>true</can_add>
      <comment>
        <order>1</order>
        <text>This is the text of the first comment</text>
        <editable>true</editable>
        <date>2018-05-28 00:00:00</date>
        <channel>
            <type>email</type>
        </channel>
	    <user>
          <ref>123123</ref>
          <nickname>juanm</nickname>
          <name>Juan Martínez</name>
        </user>        
        <assigned_to>
          <user>
            <ref>123123</ref>
            <nickname>juanm</nickname>
            <name>Juan Martínez</name>
          </user>
          <team>
            <ref>1</ref>
            <name>Linkcare</name>
          </team>
          <role>
            <ref>24</ref>
            <name>Case manager</name>
          </role>
        </assigned_to>
      </comment/>
      <comment>...</comment>
    </comments>
    <closed_by>
      <ref/>
      <nickname/>
      <name_complete/>
    </closed_by>
    <follow_report>false</follow_report>
    <call_type>VOID</call_type>
    <modified>
      <date>2018-05-28</date>
      <user>
        <id>17474</id>
        <nickname>PEDRO SL</nickname>
        <name_complete>PEDRO SÁNCHEZ</name_complete>
      </user>
    </modified>
    <issued_by>
      <ref>17474</ref>
      <nickname>PEDRO SL</nickname>
      <name>PEDRO SÁNCHEZ</name>
      <date>2018-05-28 00:00:00</date>
      <type>POSTER</type>
      <description>Creator</description>
      <phone/>
    </issued_by>
    <admission>
      <ref>27851</ref>
      <version>3</version>
      <data>...</data>
    </admission>
    <case>
      <ref>14872</ref>
      <username>slpedro</username>
      ...
    </case>
    <forms>
      <form>
        <ref>106150</ref>
        <short_name>Multiple Sclerosis - Case evolution</short_name>
        <description>LinkCare Form Library</description>
        <date>2019-09-16 13:14:40</date>
        <editable>true</editable>
        <status>OPEN</status>
      </form>
    </forms>
    <tasks>
      <task>
        <class>TASK</class>
        <id>77358</id>
        <type>REP</type>
        <status>DONE</status>
        <date>2017-07-05</date>
        <hour>12:46:13</hour>
        <description>Spirometry report</description>
      </task>
    </tasks>
    <permissions>
      <edit>false</edit>
      <delete>false</delete>
      <allow_add_activiy>true</allow_add_activity>
    </permissions>
  </event>
</result>
<ErrorMsg></ErrorMsg>

Notes:


XML changes in API version 2.7.3 respect version 0.0.0

2.7.30.0.0Comments
  <event>  <event>
    <version>2.7.3</version>
New node to indicate the format version of the XML file
    <ref>10674</ref>    <ref>10674</ref>
    <type>    <type>
      <id>#EVENT:SOCIAL</id>      <id>#EVENT:SOCIAL</id>
      <desc>I need some help</desc>      <desc>I need some help</desc>
    </type>    </type>
    <status>OPEN</status>    <status>OPEN</status>
    <date>2017-11-21 00:00:00</date>

    <close_date>2017-11-21 00:00:00</close_date>

    <read_mark>true</read_mark>    <read_mark>true</read_mark>
    <phone_poster/>    <phone_poster/>
    <priority>NULL</priority>    <priority>NULL</priority>
    <event_code/>    <event_code/>
    <comments>    <comments>

      <open>-</open>

Old version only supported 2 comments (open and close)

This nodes have been replaced by multiple comment nodes


      <close/>
      <can_add>true</can_add)

      <comment>

        <order>1</order>

        <text>This is the text of the first comment</text>

        <editable>true</editable>

        <date>2018-05-28 00:00:00</date>

        <channel>

            <type>email</type>

        </channel>

        <user>

          <ref>123123</ref>

          <nickname>juanm</nickname>

          <name>Juan Martínez</name>

        </user>

        <assigned_to>

          <user>

            <ref>123123</ref>

            <nickname>juanm</nickname>

            <name>Juan Martínez</name>

          </user>

          <team>

            <ref>1</ref>

            <name>Linkcare</name>

          </team>

          <role>

            <ref>24</ref>

            <name>Case manager</name>

          </role>

        </assigned_to>

      <comment>

    </comments>    </comments>
    <closed_by>    <closed_by>
      <ref/>      <ref/>
      <nickname/>      <nickname/>
      <name_complete/>      <name_complete/>
    </closed_by>    </closed_by>

    <team>

      <ref/>

      <name/>

    </team>
    <follow_report>false</follow_report>    <follow_report>N</follow_report>contents changed from S/N to true/false
    <call_type>VOID</call_type>    <call_type>VOID</call_type>

    <posted_by>posted_by information is now enclosed in the first comment node

      <role>

        <id>24</id>

        <desc>Case Manager</desc>

      </role>

      <team>

        <id>1</id>

        <description>Linkcare</description>

      </team>

      <user_id>16761</user_id>

      <nickname>PEDRO SÁNCHEZ</nickname>

      <name_complete>PEDRO SÁNCHEZ</name_complete>

      <date>2018-05-28 00:00:00</date>

      <minutes/>

      <editable>false</editable>

      <channel>

          <type>email</type>

      </channel>

    </posted_by>

    <assigned_to>

assigned_to information is enclosed in the comment/assigned_to information.

Note that now there can be multiple comments and each one can be assigned to a different role/team/user


      <role>

        <id>24</id>

        <desc>Case Manager</desc>

      </role>

      <team>

        <id/>

        <description/>

      </team>

      <user_id/>

      <nickname/>

      <name_complete/>

      <date/>

      <minutes/>

      <editable>false</editable>

      <channel>

          <type></type>

      </channel>

    </assigned_to>
    <modified>    <modified>
      <date>2018-05-28 15:12:14</date>
Moved from modified/user node. Additionally, the date and time are represented together
      <user>      <user>
        <ref>17474</ref>        <id>17474</id>Node name changed from id to ref
        <nickname>PEDRO SÁNCHEZ</nickname>        <nickname>PEDRO SÁNCHEZ</nickname>
        <name>PEDRO SÁNCHEZ</name>        <name_complete>PEDRO SÁNCHEZ</name_complete>Node name changed from name_complete to name

        <date>2018-05-28</date>Moved to node modified

        <hour>15:12:14</hour>
      </user>      </user>
    </modified>    </modified>
    <issued_by>    <issued_by>
      <ref>17474</ref>
Moved from node person
      <nickname>slpedro</nickname>
      <name>PEDRO SÁNCHEZ</name>
      <date>2018-05-28 00:00:00</date>
      <type>POSTER</type>      <type>POSTER</type>
      <description>Creator</description>      <description>Creator</description>
      <phone/>      <phone/>

      <person>Moved to node issued_by

        <user_id>17474</user_id>

        <nickname>PEDRO SÁNCHEZ</nickname>

        <name_complete>PEDRO SÁNCHEZ</name_complete>

        <date>2018-05-28 00:00:00</date>

      </person>
    </issued_by>    </issued_by>
    <admission>    <admission>
      <ref>27851</ref>      <ref>27851</ref>
      <version>3</version>      <version>3</version>
      <data>...</data>      <data>...</data>
    </admission>    </admission>
    <case>    <case>
      ...      ...
    </case>    </case>
    <forms/>    <forms/>
    <tasks/>    <tasks/>
    <permissions>    <permissions>
      <edit>false</edit>      <edit>false</edit>
      <delete>false</delete>      <delete>false</delete>
    </permissions>    </permissions>
  </event>  </event>