/** * HAIQ embedded checkout widget. * Expects wp_localize_script object `haiqCheckout`: * stripePublishableKey, edgeCreateCheckoutUrl, optional defaultPartner ('sac' | 'msc' | 'pdr'). */ ;(function () { 'use strict' var localized = typeof window.haiqCheckout !== 'undefined' && window.haiqCheckout !== null ? window.haiqCheckout : {} var STRIPE_PUBLISHABLE_KEY = localized.stripePublishableKey || '' var EDGE_FUNCTION_URL = localized.edgeCreateCheckoutUrl || '' if (window.createHaiqWidget) return window.__HAIQ_WIDGETS = [] window.__HAIQ_EMBEDDED_CHECKOUT__ = null window.destroyAllHaiqCheckouts = function () { if (window.__HAIQ_EMBEDDED_CHECKOUT__) { try { window.__HAIQ_EMBEDDED_CHECKOUT__.destroy() } catch (err) { /* ignore */ } window.__HAIQ_EMBEDDED_CHECKOUT__ = null } window.__HAIQ_WIDGETS.forEach(function (w) { w.reset() }) } window.createHaiqWidget = function (config) { var matchingElements = document.querySelectorAll('#' + config.containerId) var root = null for (var i = 0; i < matchingElements.length; i++) { if (!matchingElements[i].getAttribute('data-haiq-built')) { root = matchingElements[i] root.setAttribute('data-haiq-built', 'true') break } } if (!root) return var subtitleRaw = config.subtitle != null && String(config.subtitle).trim() !== '' ? String(config.subtitle).trim() : '' var subtitleBlock = subtitleRaw === '' ? '' : '

' + escapeHtml(subtitleRaw) + '

' root.innerHTML = '
' + '
' + '
' + '' + '' + '
' + '
' + '

' + escapeHtml(config.title) + '

' + subtitleBlock + '
' + '
' + escapeHtml(config.monthlyPrice) + '
' + '
Every month
' + '
' + '

' + escapeHtml(config.description) + '

' + '
' + '' + '
' + '
' + '

Opening secure checkout...

' + '
' + '
' + '' + '
' + '
' + '
' var activePlan = 'monthly' var PRODUCTS = { monthly: { priceText: config.monthlyPrice, suffix: 'Every month', term: 1, }, two_month: { priceText: config.twoMonthPrice, suffix: 'Every 2 months', term: 2, }, } var planBtns = root.querySelectorAll('.haiq-plan-btn') var priceEl = root.querySelector('.haiq-price') var suffixEl = root.querySelector('.haiq-price-suffix') var subscribeBtn = root.querySelector('.haiq-subscribe-btn') var checkoutSection = root.querySelector('.haiq-checkout-section') var loadingText = root.querySelector('.haiq-loading-text') var checkoutMountEl = root.querySelector('.haiq-checkout-container') var cancelBtn = root.querySelector('.haiq-cancel-btn') window.__HAIQ_WIDGETS.push({ reset: function () { checkoutSection.style.display = 'none' subscribeBtn.disabled = false subscribeBtn.style.opacity = '1' checkoutMountEl.innerHTML = '' }, }) function scrollCheckoutSectionIntoView(opts) { var snap = opts && opts.snap === true var b = snap ? 'auto' : 'smooth' window.requestAnimationFrame(function () { checkoutSection.scrollIntoView({ behavior: b, block: 'center', inline: 'nearest', }) }) } function renderPlan() { var cfg = PRODUCTS[activePlan] priceEl.textContent = cfg.priceText suffixEl.textContent = cfg.suffix planBtns.forEach(function (b) { var isActive = b.getAttribute('data-plan') === activePlan b.classList.toggle('is-active', isActive) b.setAttribute('aria-pressed', isActive ? 'true' : 'false') }) } function getPartner(config) { var partnerRaw = ( (config.partner != null ? String(config.partner) : '') || (localized.defaultPartner != null ? String(localized.defaultPartner) : '') ) .trim() .toLowerCase() if (partnerRaw === 'msc' || partnerRaw === 'sac' || partnerRaw === 'pdr') { return partnerRaw } return '' } async function openCheckout() { if (!STRIPE_PUBLISHABLE_KEY || !EDGE_FUNCTION_URL) { checkoutSection.style.display = 'block' loadingText.style.display = 'block' loadingText.textContent = 'Checkout is not configured. Please contact the site administrator.' subscribeBtn.disabled = false subscribeBtn.style.opacity = '1' scrollCheckoutSectionIntoView() return } window.destroyAllHaiqCheckouts() subscribeBtn.disabled = true subscribeBtn.style.opacity = '0.7' checkoutSection.style.display = 'block' loadingText.style.display = 'block' loadingText.textContent = 'Opening secure checkout...' scrollCheckoutSectionIntoView() try { if (!window.__HAIQ_SHARED_STRIPE__) { window.__HAIQ_SHARED_STRIPE__ = window.Stripe(STRIPE_PUBLISHABLE_KEY) } var stripe = window.__HAIQ_SHARED_STRIPE__ var requestPayload = { productKey: config.productKey, term: PRODUCTS[activePlan].term, source_url: window.location.href, source_page_title: document.title, } var partner = getPartner(config) if (partner !== '') { requestPayload.partner = partner } var response = await fetch(EDGE_FUNCTION_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(requestPayload), }) var data = await response.json().catch(function () { return {} }) if (!response.ok) { throw new Error(data && data.error ? data.error : 'Failed to create checkout.') } var checkout = await stripe.initEmbeddedCheckout({ clientSecret: data.clientSecret, }) window.__HAIQ_EMBEDDED_CHECKOUT__ = checkout loadingText.style.display = 'none' checkout.mount(checkoutMountEl) scrollCheckoutSectionIntoView() window.setTimeout(function () { scrollCheckoutSectionIntoView({ snap: true }) }, 400) } catch (err) { console.error(err) loadingText.textContent = err && err.message ? String(err.message) : 'Checkout unavailable right now.' subscribeBtn.disabled = false subscribeBtn.style.opacity = '1' scrollCheckoutSectionIntoView() } } planBtns.forEach(function (btn) { btn.addEventListener('click', function () { var newPlan = btn.getAttribute('data-plan') if (activePlan === newPlan) return activePlan = newPlan renderPlan() if (checkoutSection.style.display === 'block') { openCheckout() } }) }) subscribeBtn.addEventListener('click', function (e) { e.preventDefault() openCheckout() }) if (cancelBtn) { cancelBtn.addEventListener('click', function (e) { e.preventDefault() window.destroyAllHaiqCheckouts() root.scrollIntoView({ behavior: 'smooth', block: 'center' }) }) } renderPlan() } function escapeHtml(text) { if (text == null) return '' var div = document.createElement('div') div.textContent = String(text) return div.innerHTML } function bootWidgets() { var mounts = document.querySelectorAll('[data-haiq-widget]') mounts.forEach(function (el) { var raw = el.getAttribute('data-haiq-config') if (!raw) return try { var cfg = JSON.parse(raw) if (!cfg.containerId && el.id) { cfg.containerId = el.id } if (window.createHaiqWidget) { window.createHaiqWidget(cfg) } } catch (e) { console.error('HAIQ Checkout: invalid data-haiq-config', e) } }) } function runBoot() { bootWidgets() } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', runBoot, { once: true }) } else { runBoot() } })() Evaluating a Depressed Mood After a Traumatic Event | ProspectiveDoctor
USMLE Question of the Week

Evaluating a Depressed Mood After a Traumatic Event

In Episode 20 of Med School Question of the Week for USMLE, Alisa Khomutova, MedSchoolCoach expert tutor, answers this medical school question: A previously healthy 65-year-old woman sees her physician for a 1-month history of sleep disturbance and sadness, which started after her husband died in a car accident. She stays awake for multiple hours and has crying spells throughout the day and night. Several times she has been woken up by the sound of her husband calling her name. She has lost 2 kg (4.4 lb) over the past month. She has 2 children who she has been spending time with and regularly attends church services with her friends. She expresses feeling a great feeling of loss over the death of her husband. She has no suicidal ideation. She is alert and oriented. Neurological exam in benign. Which of the following is the most likely diagnosis for this patient’s symptoms?
  • Major Depressive Episode
  • Generalized Anxiety Disorder
  • Normal Bereavement
  • Acute Stress Disorder
  • Post-traumatic Stress Disorder
  • Adjustment Disorder with Depressed Mood
Click to Reveal the Correct Answer

Normal Bereavement

Alisa Khomutova

Alisa received her B.S. from University of California, Davis, and attended Oakland University William Beaumont School of Medicine. In 2020, she matched into Stony Brook Teaching Hospital practicing General Surgery for residency.

Related Articles

Back to top button