original_docstring: Create or update a participant to a Collection Protocol.
  
          This function can create a new participant or update an existing participant to an already existing
          Collection Protocol. To use this function one has to know either the Collection Protocoll id <cpId>,
          the title of the Collection Protocol <cpTitle> or the short title of the Collection Protocol <cpshorttitle> .
          Those values can be seen via GUI, extracted from the responses with the class collection_protocol in os_core or
          collection_protocol_util in os_util. To update a participant, one has to specify the unique ID of the participant.
          This Id can be searched via the function get_participant_matches in the os_core class participants.
  
          Parameters
          ----------
          params : string
              JSON formatted string with the parameters of the participant. The paramter participant is a JSON-formatted string itself,
              for creating a participant it can be left empty; for updating the ID of the participant is needed. The keys of the participant
              dict are id[mandatory for updating], firstName, middleName, lastName, uid, birthdate, vitalStatus, deathDate, gender,
              race, ethnicities, sexGenotype, pmis, mrn, siteName, empi.
  
          One of the following keys is mandatory to identify the protocol where the participant is created or updated cpId, cpTitle or cpShortTitle.
  
              The key ppid has to be left blank, if it is set to be autogenerated by the system and is mandatory, if it is created manually.
  
          registrationDate is a mandatory key, the date format is YYYY-MM-DD .
  
          Returns
          -------
          JSON-dict
              Details of the created or updated Participant or the OpenSpecimen error message as Dictionary.
          
docstring: Create or update a participant to a Collection Protocol.
  This function can create a new participant or update an existing participant to an already existing
  Collection Protocol. To use this function one has to know either the Collection Protocoll id ,
  the title of the Collection Protocol  or the short title of the Collection Protocol  .
  Those values can be seen via GUI, extracted from the responses with the class collection_protocol in os_core or
  collection_protocol_util in os_util. To update a participant, one has to specify the unique ID of the participant.
  This Id can be searched via the function get_participant_matches in the os_core class participants.
  
  Parameters
  
  params : string
  JSON formatted string with the parameters of the participant. The paramter participant is a JSON-formatted string itself,
  for creating a participant it can be left empty; for updating the ID of the participant is needed. The keys of the participant
  dict are id[mandatory for updating], firstName, middleName, lastName, uid, birthdate, vitalStatus, deathDate, gender,
  race, ethnicities, sexGenotype, pmis, mrn, siteName, empi.
  
  One of the following keys is mandatory to identify the protocol where the participant is created or updated cpId, cpTitle or cpShortTitle.
  
  The key ppid has to be left blank, if it is set to be autogenerated by the system and is mandatory, if it is created manually.
  
  registrationDate is a mandatory key, the date format is YYYY-MM-DD .
  
  Returns
  
  JSON-dict
  Details of the created or updated Participant or the OpenSpecimen error message as Dictionary.
docstring_tokens: Create or update a participant to a Collection Protocol . This function can create a new participant or update an existing participant to an already existing Collection Protocol . To use this function one has to know either the Collection Protocoll id the title of the Collection Protocol or the short title of the Collection Protocol . Those values can be seen via GUI extracted from the responses with the class collection_protocol in os_core or collection_protocol_util in os_util . To update a participant one has to specify the unique ID of the participant . This Id can be searched via the function get_participant_matches in the os_core class participants . Parameters params : string JSON formatted string with the parameters of the participant . The paramter participant is a JSON - formatted string itself for creating a participant it can be left empty ; for updating the ID of the participant is needed . The keys of the participant dict are id [ mandatory for updating ] firstName middleName lastName uid birthdate vitalStatus deathDate gender race ethnicities sexGenotype pmis mrn siteName empi . One of the following keys is mandatory to identify the protocol where the participant is created or updated cpId cpTitle or cpShortTitle . The key ppid has to be left blank if it is set to be autogenerated by the system and is mandatory if it is created manually . registrationDate is a mandatory key the date format is YYYY - MM - DD . Returns JSON - dict Details of the created or updated Participant or the OpenSpecimen error message as Dictionary .
code: def create_participant(self, params):
  
          """Create or update a participant to a Collection Protocol.
  
          This function can create a new participant or update an existing participant to an already existing
          Collection Protocol. To use this function one has to know either the Collection Protocoll id <cpId>,
          the title of the Collection Protocol <cpTitle> or the short title of the Collection Protocol <cpshorttitle> .
          Those values can be seen via GUI, extracted from the responses with the class collection_protocol in os_core or
          collection_protocol_util in os_util. To update a participant, one has to specify the unique ID of the participant.
          This Id can be searched via the function get_participant_matches in the os_core class participants.
  
          Parameters
          ----------
          params : string
              JSON formatted string with the parameters of the participant. The paramter participant is a JSON-formatted string itself,
              for creating a participant it can be left empty; for updating the ID of the participant is needed. The keys of the participant
              dict are id[mandatory for updating], firstName, middleName, lastName, uid, birthdate, vitalStatus, deathDate, gender,
              race, ethnicities, sexGenotype, pmis, mrn, siteName, empi.
  
          One of the following keys is mandatory to identify the protocol where the participant is created or updated cpId, cpTitle or cpShortTitle.
  
              The key ppid has to be left blank, if it is set to be autogenerated by the system and is mandatory, if it is created manually.
  
          registrationDate is a mandatory key, the date format is YYYY-MM-DD .
  
          Returns
          -------
          JSON-dict
              Details of the created or updated Participant or the OpenSpecimen error message as Dictionary.
          """
  
          url = self.base_url + '/'
          payload = params
          r = self.OS_request_gen.post_request(url, payload)
  
          return json.loads(r.text)
code_tokens: def create_participant ( self , params ) : url = self . base_url + '/' payload = params r = self . OS_request_gen . post_request ( url , payload ) return json . loads ( r . text )
short_docstring: Create or update a participant to a Collection Protocol.
short_docstring_tokens: Create or update a participant to a Collection Protocol .
comment: """Create or update a participant to a Collection Protocol.
  
          This function can create a new participant or update an existing participant to an already existing
          Collection Protocol. To use this function one has to know either the Collection Protocoll id <cpId>,
          the title of the Collection Protocol <cpTitle> or the short title of the Collection Protocol <cpshorttitle> .
          Those values can be seen via GUI, extracted from the responses with the class collection_protocol in os_core or
          collection_protocol_util in os_util. To update a participant, one has to specify the unique ID of the participant.
          This Id can be searched via the function get_participant_matches in the os_core class participants.
  
          Parameters
          ----------
          params : string
              JSON formatted string with the parameters of the participant. The paramter participant is a JSON-formatted string itself,
              for creating a participant it can be left empty; for updating the ID of the participant is needed. The keys of the participant
              dict are id[mandatory for updating], firstName, middleName, lastName, uid, birthdate, vitalStatus, deathDate, gender,
              race, ethnicities, sexGenotype, pmis, mrn, siteName, empi.
  
          One of the following keys is mandatory to identify the protocol where the participant is created or updated cpId, cpTitle or cpShortTitle.
  
              The key ppid has to be left blank, if it is set to be autogenerated by the system and is mandatory, if it is created manually.
  
          registrationDate is a mandatory key, the date format is YYYY-MM-DD .
  
          Returns
          -------
          JSON-dict
              Details of the created or updated Participant or the OpenSpecimen error message as Dictionary.
          """