If supplied with at least a partner_id and name of the contact, create a new record for a partner contact in the database.
Usage
insert_contact(
name = NA,
partner_id = NA,
role = c("Site contact", "Chairperson", "Reporting person"),
email_address = NA,
phone_number = NA,
test_db = FALSE
)
Arguments
- name
The name of the partner contact that is being added to the database. The first name and surname of the contact should be provided.
- partner_id
The record ID of the partner for whom this individual a contact. The joins the contact to the
partners
table appropriately.- role
The role of this contact, either
Site contact
,Chairperson
, orReporting provider
. Note that multiple roles might be assigned to one individual, with a separate record incontacts
for each of these roles.- email_address
An optional email address for the contact. Ideally, either an email address or a telephone number should be provided (or both).
- phone_number
An optional phone number for the contact. Ideally, either an email address or a telephone number should be provided (or both).
- test_db
Is this connection to the test database (
TRUE
) or not (FALSE
)? Defaults toFALSE
.