code: def _magic_json(self, action='', user_id='', app_name='', patient_id='',
                      token='', parameter1='', parameter2='',
                      parameter3='', parameter4='', parameter5='',
                      parameter6='', data=''):
          
          if not token:
              token = self._token.token
          if not app_name:
              app_name = self._app_name
          if not user_id:
              if self._ehr_username:
                  user_id = self._ehr_username
  
          return {
              'Action': action,
              'AppUserID': user_id,
              'Appname': app_name,
              'PatientID': patient_id,
              'Token': token,
              'Parameter1': parameter1,
              'Parameter2': parameter2,
              'Parameter3': parameter3,
              'Parameter4': parameter4,
              'Parameter5': parameter5,
              'Parameter6': parameter6,
              'Data': data
          }
docs: utility method to create a magic json object needed to invoke TouchWorks APIs
          :return: magic json