PageSourceSearch

https://pro.lns.lu/_app/immutable/chunks/CiBx0YxO.js

js lns.lu collected 2026-10-02 10:47:07 UTC 7,947 bytes, 1 lines download raw bytes

1import{A as e,At as t,B as n,D as r,F as i,I as a,It as o,L as s,Lt as c,M as l,U as u,a as d,ct as f,dt as p,gt as m,ht as h,kt as g,lt as _,nt as v,o as y,pt as b,q as x,s as S,st as C,ut as w,w as T}from"./4jjA5GOO.js";import{n as E,t as D}from"./Ks2aCKWp.js";import"./xihTtKlq.js";import{i as O,jt as k,n as A,r as j}from"./BO0lEeLx.js";import{Ci as M,Fr as ee,Gr as N,Ir as P,Jr as te,Li as ne,Lr as re,Mr as ie,Nr as ae,Pr as oe,Ri as se,S as ce,Yr as le,Zr as ue,_i as de,b as fe,jr as pe,w as F,x as me,y as he}from"./CJ6VCVJN.js";import{n as ge,t as _e}from"./DKPnEUCD.js";import{r as I}from"./Eap1ZG7U.js";import{o as ve}from"./Cai5E6kb.js";import{a as ye,c as be,i as xe,n as Se,o as Ce,r as we,s as Te,t as Ee}from"./DO3plRO3.js";import{t as De}from"./KsFkIXzu.js";import{t as Oe}from"./BnLhyZn5.js";import{c as ke,t as L}from"./C-oMuZve.js";import{t as Ae}from"./lke2ptNa.js";import{t as je}from"./BREsp_kj.js";import{t as Me}from"./CviQhuI2.js";import{t as Ne}from"./m_ZGWAIE.js";var R=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pe(e,t){let n=y(t,R),r={name:`user-pen`,size:24,node:[[`path`,{d:`M11.5 15H7a4 4 0 0 0-4 4v2`}],[`path`,{d:`M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`}],[`circle`,{cx:`10`,cy:`7`,r:`4`}]]};A(e,S(()=>n,{get icon(){return r}}))}var Fe=s(`<div class="flex flex-col gap-1.5"><h3 id="patient-flow-panel-title" class="text-sm font-semibold"> </h3> <p class="text-sm text-muted-foreground"> </p> <!> <!></div> <div class="flex items-center gap-3 text-sm text-muted-foreground"><span class="h-px flex-1 bg-border"></span> <span class="h-px flex-1 bg-border"></span></div>`,1),Ie=s(`<h3 class="text-sm font-semibold"> </h3>`),Le=s(`<p class="text-xs text-destructive"> </p>`),z=s(`<!> `,1),Re=s(`<div class="flex flex-col gap-6"><!> <form class="flex flex-col gap-4"><!> <!> <div class="flex flex-col gap-1.5"><!> <!> <!></div> <!> <div class="flex justify-end"><!></div></form></div>`),ze=s(`<p class="text-sm text-muted-foreground"> </p>`),Be=s(`<div class="flex flex-col gap-3"><h3 class="text-sm font-semibold text-muted-foreground"> </h3> <!></div>`),Ve=s(`<h3 class="text-sm font-semibold text-muted-foreground"> </h3>`),He=s(`<div class="flex flex-col gap-3"><!> <!></div>`),Ue=s(`<div class="flex flex-col gap-6"><!> <!> <!> <div><!></div></div>`),B=s(`<!> <!>`,1);function V(s,y){t(y,!0);let S=d(y,`phase`,15,`search`),A=h(p([])),R=h(p([])),V=h(null),H=h(`create`),U=h(``),W=h(!1),G=h(null),We=m(()=>S()===`form`&&x(A).length===0&&x(R).length===0),K=h(!1),q=m(()=>x(U).trim()!==``&&!Me.test(x(U).trim())),J=h(!1);async function Ge(){if(b(J,!0),x(U).trim()&&!x(q)&&I.value){b(W,!0),b(G,null);try{let e=await fetch(`/api/v1/practice/${I.value}/patients/search?cnsId=${encodeURIComponent(x(U))}`);if(e.ok){let t=await e.json();b(A,t.filter(e=>e.portalId!=null),!0),b(R,t.filter(e=>e.portalId==null),!0),S(`results`)}else b(G,await k(e)??{title:F()},!0)}catch{b(G,{title:F()},!0)}finally{b(W,!1)}}}let Y=h(!1),X=h(null);async function Ke(e){if(I.value&&y.onExistingPatientSelect){b(Y,!0),b(X,null);try{let t=await fetch(`/api/v1/practice/${I.value}/patients/${encodeURIComponent(e.cnsId)}`);t.ok?y.onExistingPatientSelect(await t.json()):b(X,await k(t)??{title:F()},!0)}catch{b(X,{title:F()},!0)}finally{b(Y,!1)}}}function Z(e,t){b(V,e,!0),b(H,t,!0),S(`form`)}function qe(e){y.onSuccess?.(e)}function Je(){b(K,!0)}function Ye(){b(K,!1),S(x(We)?`search`:`results`),b(V,null)}let Xe=m(()=>x(U).trim().length>0&&!x(q)&&!x(W));var Q=B(),$=f(Q),Ze=t=>{var r=Re(),a=C(r),s=t=>{var n=Fe(),r=f(n),a=C(r),s=_(a,!0),u=w(a,2),d=_(u,!0),p=w(u,2);{let e=m(()=>ae()),t=m(()=>x(Y)||!I.value);Ne(p,{class:`bg-background`,get providerCode(){return I.value},get placeholder(){return x(e)},"aria-labelledby":`patient-flow-panel-title`,get disabled(){return x(t)},onSelect:Ke})}var h=w(p,2),g=e=>{L(e,{get problem(){return x(X)}})};e(h,e=>{x(X)&&e(g)}),c(r);var y=w(r,2),b=w(C(y));o(),c(y),v((e,t,n)=>{l(s,e),l(d,t),l(b,` ${n??``} `)},[()=>ie(),()=>oe(),()=>ee()]),i(t,n)};e(a,e=>{y.onExistingPatientSelect&&e(s)});var d=w(a,2),p=C(d),h=e=>{var t=Ie(),n=_(t,!0);v(e=>l(n,e),[()=>P()]),i(e,t)};e(p,e=>{y.onExistingPatientSelect&&e(h)});var g=w(p,2);{let e=m(()=>re());ke(g,{variant:`info`,get message(){return x(e)}})}var S=w(g,2),T=C(S);De(T,{for:`patient-flow-cns`,children:(e,t)=>{o();var r=n();v(e=>l(r,e),[()=>se()]),i(e,r)},$$slots:{default:!0}});var E=w(T,2);{let e=m(()=>x(J)&&x(q));ve(E,{id:`patient-flow-cns`,type:`text`,class:`bg-background`,placeholder:`1985102400999`,inputmode:`numeric`,maxlength:13,get disabled(){return x(W)},get"aria-invalid"(){return x(e)},onblur:()=>b(J,!0),get value(){return x(U)},set value(e){b(U,e,!0)}})}var D=w(E,2),O=e=>{var t=Le(),n=_(t,!0);v(e=>l(n,e),[()=>ne()]),i(e,t)};e(D,e=>{x(J)&&x(q)&&e(O)}),c(S);var k=w(S,2),A=e=>{L(e,{get problem(){return x(G)}})};e(k,e=>{x(G)&&e(A)});var M=w(k,2),N=C(M);{let e=m(()=>!x(Xe));j(N,{type:`submit`,get disabled(){return x(e)},children:(e,t)=>{var n=z(),r=f(n);Ae(r,{});var a=w(r);v(e=>l(a,` ${e??``}`),[()=>x(W)?me():ce()]),i(e,n)},$$slots:{default:!0}})}c(M),c(d),c(r),u(`submit`,d,e=>{e.preventDefault(),Ge()}),i(t,r)},Qe=t=>{var s=Ue(),u=C(s),d=e=>{var t=ze(),n=_(t,!0);v(e=>l(n,e),[()=>N()]),i(e,t)};e(u,e=>{x(A).length===0&&x(R).length===0&&e(d)});var p=w(u,2),h=t=>{var n=Be(),o=C(n),s=_(o,!0),u=w(o,2);r(u,17,()=>x(A),e=>e.cnsId,(t,n)=>{E(t,{get patient(){return x(n)},actions:t=>{var r=a(),o=f(r),s=e=>{let t=m(()=>y.selectPatientIcon??Oe);j(e,{size:`sm`,onclick:()=>y.onExistingPatientSelect(x(n)),children:(e,n)=>{var r=z(),a=f(r);T(a,()=>x(t),(e,t)=>{t(e,{})});var o=w(a);v(e=>l(o,` ${e??``}`),[()=>y.selectPatientLabel??pe()]),i(e,r)},$$slots:{default:!0}})},c=e=>{j(e,{variant:`outline`,size:`sm`,onclick:()=>Z(x(n),`edit`),children:(e,t)=>{var n=z(),r=f(n);Pe(r,{});var a=w(r);v(e=>l(a,` ${e??``}`),[()=>de()]),i(e,n)},$$slots:{default:!0}})};e(o,e=>{y.onExistingPatientSelect?e(s):e(c,-1)}),i(t,r)},$$slots:{actions:!0}})}),c(n),v(e=>l(s,e),[()=>ue()]),i(t,n)};e(p,e=>{x(A).length>0&&e(h)});var g=w(p,2),b=t=>{var n=He(),a=C(n),o=e=>{var t=Ve(),n=_(t,!0);v(e=>l(n,e),[()=>le()]),i(e,t)};e(a,e=>{x(A).length>0&&e(o)});var s=w(a,2);r(s,17,()=>x(R),e=>e.cnsId,(e,t)=>{E(e,{get patient(){return x(t)},actions:e=>{j(e,{size:`sm`,onclick:()=>Z(x(t),`create`),children:(e,t)=>{var n=z(),r=f(n);je(r,{});var a=w(r);v(e=>l(a,` ${e??``}`),[()=>y.createPatientLabel??M()]),i(e,n)},$$slots:{default:!0}})},$$slots:{actions:!0}})}
1),c(n),i(t,n)};e(g,e=>{x(R).length>0&&e(b)});var D=w(g,2),O=C(D);j(O,{variant:`outline`,onclick:()=>S(`search`),children:(e,t)=>{o();var r=n();v(e=>l(r,e),[()=>te()]),i(e,r)},$$slots:{default:!0}}),c(D),c(s),i(t,s)},$e=e=>{D(e,{get patient(){return x(V)},get mode(){return x(H)},onSuccess:qe,onCancel:Je})};e($,e=>{S()===`search`?e(Ze):S()===`results`?e(Qe,1):S()===`form`&&e($e,2)});var et=w($,2);T(et,()=>Ee,(e,t)=>{t(e,{get open(){return x(K)},set open(e){b(K,e,!0)},children:(e,t)=>{var r=a(),s=f(r);T(s,()=>Ce,(e,t)=>{t(e,{children:(e,t)=>{var r=B(),a=f(r);T(a,()=>we,(e,t)=>{t(e,{children:(e,t)=>{var r=B(),a=f(r);T(a,()=>Se,(e,t)=>{t(e,{children:(e,t)=>{o();var r=n();v(e=>l(r,e),[()=>he()]),i(e,r)},$$slots:{default:!0}})});var s=w(a,2);T(s,()=>ye,(e,t)=>{t(e,{children:(e,t)=>{o();var r=n();v(e=>l(r,e),[()=>fe()]),i(e,r)},$$slots:{default:!0}})}),i(e,r)},$$slots:{default:!0}})});var s=w(a,2);T(s,()=>xe,(e,t)=>{t(e,{children:(e,t)=>{var r=B(),a=f(r);T(a,()=>Te,(e,t)=>{t(e,{onclick:()=>b(K,!1),children:(e,t)=>{o();var r=n();v(e=>l(r,e),[()=>ge()]),i(e,r)},$$slots:{default:!0}})});var s=w(a,2);{let e=m(()=>O({variant:`caution`}));T(s,()=>be,(t,r)=>{r(t,{get class(){return x(e)},onclick:Ye,children:(e,t)=>{o();var r=n();v(e=>l(r,e),[()=>_e()]),i(e,r)},$$slots:{default:!0}})})}i(e,r)},$$slots:{default:!0}})}),i(e,r)},$$slots:{default:!0}})}),i(e,r)},$$slots:{default:!0}})}),i(s,Q),g()}export{V as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.