encounterId. Then start recording.
Use sessionStatus for the session lifecycle, such as created or submitted.
Code example
React
Key implementation details
Step 1: Authentication
Step 1: Authentication
Use
useAuth to sign in. With autoRegister: true and loginOnMount: true, sign-in runs on mount. Pass providerName, providerOrgId, and providerSpecialty when auto-registration is on. Prefer specialty enum tokens such as FAMILY_MEDICINE. See Authentication hook.Step 2: Session Creation
Step 2: Session Creation
Call
session.create({ encounterId }) only after the user is signed in. encounterId is required. Wait for isSuccess before you use ambientSessionId. See Create ambient session.Step 3: Recording
Step 3: Recording
Pass
ambientSessionId into useAmbientSession. Use start, pause, resume, and submit. Use sessionStatus for lifecycle state, and a local phase for recording versus paused. See Manage ambient session.