Developers Getting Started With i2b2
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameValue
  • <request name>_REQUEST defines the request email generation parameters. 
  • Request email can be configured in PM_USER_DATA parameters to define the email address of the User.
<?xml version="1.0"?>
<ValueExporter>
  <Version>[...version number...]</Version>
  <CreationDateTime>08/09/2024 12:00:00</CreationDateTime>
  <RequestLetter>[...details sent to User on data request...]  </RequestLetter>
</ValueExporter>
  • <request name>_CSV defines the data export email parameters and the SQL to for the export file generation.   
  • The data export email has detailed info on the file location and access info.
  • The exported file is generated in a secure location on the local drive along with the data export email file in a zipped folder
  • Email content and export SQL are configurable in the XML entries for the request/export in the Value parameters.
<?xml version="1.0"?>
<ValueExporter>
  <Version>[...version number...]</Version>
  <CreationDateTime><date value></CreationDateTime>
  <RequesterEmailLetter>details sent to data Manager on data request</RequesterEmailLetter>
    <LetterFilename><name of the file></LetterFilename>
  <Letter> <letter content></Letter>
  <Table>
<Filename>filename</Filename>
<Query>[... SQL query to generate the data export content...]</Query>
      <SeparatorCharacter>[...file format seperator...]</SeparatorCharacter>
  </Table>

</ValueExporter>

...

Info

The data manager receives the Requester Email and the requester emails.( by detault if not configured with user email). Data Manager also receives the data export email confirmation -same as Request email ?? which can be forwarded to the User that initiated the request.

Email content and export SQL are configurable in the XML entries for the request/export definitions.


Example Request types

NAMEVALUE
PATIENT_MEDICATION_CSV<?xml version="1.0"?>
<ValueExporter>
<Version>3.02</Version>
<CreationDateTime>08/09/2024 12:00:00</CreationDateTime>
  <RequesterEmailLetter>Your request on {{{PROJECT_ID}}} requested i2b2 request
 entitled - "{{{QUERY_NAME}}}", submitted on {{{QUERY_STARTDATE}}}, with the query master of {{{QUERY_ID}}}</RequesterEmailLetter>
  <RequestLetter>This user {{{USER_NAME}}} in project {{{PROJECT_ID}}} requested i2b2 request
 entitled - "{{{QUERY_NAME}}}", submitted on {{{QUERY_STARTDATE}}}, with the query master of {{{QUERY_ID}}}.
  </RequestLetter>
  <LetterFilename>/{{{USER_NAME}}}/{{{QUERY_MASTER_ID}}}/Readme.txt</LetterFilename>
  <Letter>
Results of the i2b2 request entitled - "{{{QUERY_NAME}}}", submitted on {{{QUERY_STARTDATE}}}, are available.

Important notes about your data:
- Total number of patients returned in your data request: {{{PATIENT_COUNT}}}
- i2b2 reviewer:

Only persons specifically authorized and selected (as listed at the top of this letter) can download these files. If additional user access is needed, please ensure the person is listed on your project IRB protocol and contact the i2b2 team.

Specifically:
- Remove all PHI from computer, laptop, or mobile device after analysis is completed.
- Do NOT share PHI or PII with anyone who is not listed on the IRB protocol.

Your guideline for the storage of Protected Health Information can be found at: https://www.site.com/guidelines_for_protecting_and_storing_phi.pdf

*To download these files*
- You must be logged onto your site

These results are the data that was requested under the authority of the Institutional Review Board.  The query resulting in this identified patient data is included at the end of this letter.  A copy of this letter is kept on file and is available to the IRB in the event of an audit.

Thank you,

The i2b2 Team
</Letter>
  <Table>
<Filename>/{{{USER_NAME}}}/{{{QUERY_MASTER_ID}}}/Medication.csv</Filename>
<Query>SELECT to_char(a.PATIENT_NUM) as "I2B2_PATIENT_NUMBER"
        ,a.start_date as "START_DATE"
        ,a.start_date as "END_DATE"
        ,b.name_char as "MEDICATION_NAME"
        ,b.concept_cd as "NDC_CODE"
        ,a.units_cd as "UNIT"
        ,a.quantity_num as "DOSE_QUANTITY"       
        ,a.modifier_cd as "MODIFIER"
        ,m.name_char as "MODIFIER_NAME"
        ,a.instance_num as "INSTANCE_NUM"
        ,a.location_cd as "FACILITY"
        ,case v.inout_cd  when 'O' then 'Outpatient' when 'I' then 'Inpatient' else 'Unknown' end as "ENCOUNTER_TYPE"
        ,p.name_char as "PROVIDER"
        ,a.encounter_num as "ENCOUNTER_NUMBER"
    FROM observation_fact  a
    INNER  JOIN concept_dimension b on a.concept_cd = b.concept_cd and b.concept_path like '\i2b2\Medications\%'
    JOIN {{{DX}}} c on a.patient_num = c.patient_num
    LEFT OUTER JOIN provider_dimension p on a.provider_id = p.provider_id
    JOIN visit_dimension v on a.encounter_num = v.encounter_num and a.patient_num = v.patient_num
    LEFT OUTER JOIN modifier_dimension m on a.modifier_cd = m.modifier_cd</Query>
      <SeparatorCharacter>\t</SeparatorCharacter>
  </Table>

</ValueExporter>
PATIENT_MEDICATION_REQUEST<?xml version="1.0"?>
<ValueExporter>
  <Version>3.02</Version>
 <CreationDateTime>08/09/2024 12:00:00</CreationDateTime>
  <RequesterEmailLetter>Your request on {{{PROJECT_ID}}} requested i2b2 request entitled - "{{{QUERY_NAME}}}", submitted on {{{QUERY_STARTDATE}}}, with the query master of {{{QUERY_MASTER_ID}}}</RequesterEmailLetter>
  <RequestLetter>This user {{{USER_NAME}}} in project {{{PROJECT_ID}}} requested i2b2 request entitled - "{{{QUERY_NAME}}}", submitted on {{{QUERY_STARTDATE}}}, with the query master of {{{QUERY_MASTER_ID}}}.
  </RequestLetter>
</ValueExporter>

...