// HIPAA privacy notice
const { data: hipaa } = await clinik.consents.sign({
patientId: 'pt_abc123',
status: 'active',
scope: 'patient-privacy',
category: 'hipaa-notice',
policyUri: 'https://clinic.com/hipaa-notice',
policyRule: 'HIPAA-Auth',
verification: [{
verified: true,
verifiedWith: 'pt_abc123',
verificationDate: '2025-01-15T10:00:00Z',
}],
});
// Treatment consent with provisions and attestation
const { data: treatment } = await clinik.consents.sign({
patientId: 'pt_abc123',
status: 'active',
scope: 'treatment',
category: ['treatment-consent', 'surgical-consent'],
performerId: 'prac_def456',
organizationId: 'org_ghi789',
policies: [
{ authority: 'https://clinic.com', uri: 'https://clinic.com/treatment-policy' },
{ authority: 'https://clinic.com', uri: 'https://clinic.com/surgical-policy' },
],
provision: {
type: 'permit',
period: {
start: '2025-01-15',
end: '2025-07-15',
},
purpose: [
{ system: 'http://terminology.hl7.org/CodeSystem/v3-ActReason', code: 'TREAT', display: 'Treatment' },
],
action: [
{ code: 'access', display: 'Access' },
{ code: 'use', display: 'Use' },
],
},
});