|
14 | 14 |
|
15 | 15 | const resourceDispatch = createEventDispatcher<{ 'update-resources': ResourceRetrieveEvent }>();
|
16 | 16 |
|
17 |
| - let defaultUrl = "https://fhir.ips-demo.dev.cirg.uw.edu/fhir"; |
| 17 | + let selectedUrl = "https://qa-rr-fhir.maxmddirect.com"; |
18 | 18 | let processing = false;
|
19 | 19 | let fetchError = '';
|
20 | 20 |
|
21 | 21 | let mrn = '';
|
22 |
| - let first = ''; |
23 |
| - let last = ''; |
24 |
| - let dob = ''; |
| 22 | + let first = 'Betsy'; |
| 23 | + let last = 'Smith-Johnson'; |
| 24 | + let dob = '1950-11-15'; |
25 | 25 | let address1 = '';
|
26 | 26 | let address2 = '';
|
27 | 27 | let city = '';
|
|
51 | 51 |
|
52 | 52 | let summaryUrlValidated: URL | undefined = undefined;
|
53 | 53 | $: {
|
54 |
| - setSummaryUrlValidated(defaultUrl); |
| 54 | + setSummaryUrlValidated(selectedUrl); |
55 | 55 | }
|
56 | 56 |
|
57 | 57 | function setSummaryUrlValidated(url: string) {
|
|
108 | 108 | }
|
109 | 109 | ]
|
110 | 110 | };
|
111 |
| - |
| 111 | +
|
112 | 112 | return patient;
|
113 | 113 | }
|
114 | 114 |
|
|
124 | 124 | query += city ? `address-city=${city}&` : '';
|
125 | 125 | query += state ? `address-state=${state}&` : '';
|
126 | 126 | query += zip ? `address-postalcode=${zip}&` : '';
|
127 |
| - return query.substring(0, query.length - 1); |
| 127 | + query += 'active=true'; |
| 128 | + return query; |
128 | 129 | }
|
129 | 130 |
|
130 | 131 | async function fetchPatient(patient: any) {
|
131 | 132 | let result;
|
132 | 133 | try {
|
133 |
| - result = await fetch(`${defaultUrl}/Patient/$match`, { |
| 134 | + result = await fetch(`${selectedUrl}/Patient/$match`, { |
134 | 135 | method: 'POST',
|
135 | 136 | headers: { accept: 'application/json' },
|
136 | 137 | body: JSON.stringify(patient)
|
|
144 | 145 | });
|
145 | 146 | } catch (e) {
|
146 | 147 | let query = buildPatientSearchQuery();
|
147 |
| - result = await fetch(`${defaultUrl}/Patient${query}`, { |
| 148 | + result = await fetch(`${selectedUrl}/Patient${query}`, { |
148 | 149 | method: 'GET',
|
149 | 150 | headers: { accept: 'application/json' },
|
150 | 151 | }).then(function (response: any) {
|
|
172 | 173 |
|
173 | 174 | async function fetchAdvanceDirective(patient: any) {
|
174 | 175 | let query = buildAdvanceDirectiveSearchQuery(patient);
|
175 |
| - return result = await fetch(`${defaultUrl}/DocumentReference${query}`, { |
| 176 | + return result = await fetch(`${selectedUrl}/DocumentReference${query}`, { |
176 | 177 | method: 'GET',
|
177 | 178 | headers: { accept: 'application/json' }
|
178 | 179 | }).then(function (response: any) {
|
|
194 | 195 | const patient = await fetchPatient(constructPatient());
|
195 | 196 | const contentResponse = await fetchAdvanceDirective(patient.id);
|
196 | 197 | content = await contentResponse.json();
|
197 |
| - hostname = defaultUrl; |
| 198 | + hostname = selectedUrl; |
198 | 199 | processing = false;
|
199 | 200 | let resources = content.entry ? content.entry.map((e) => {
|
200 | 201 | return e.resource;
|
|
222 | 223 | <FormGroup>
|
223 | 224 | <Row>
|
224 | 225 | <Row class="mx-2">
|
225 |
| - <Input type="radio" bind:group={defaultUrl} value="https://fhir.ips-demo.dev.cirg.uw.edu/fhir" label="WA Verify+ Demo Server" /> |
| 226 | + <Input type="radio" bind:group={selectedUrl} value="https://qa-rr-fhir.maxmddirect.com" label="AD Vault" /> |
| 227 | + </Row> |
| 228 | + <Row class="mx-2"> |
| 229 | + <Input type="radio" bind:group={selectedUrl} value="https://fhir.ips-demo.dev.cirg.uw.edu/fhir" label="WA Verify+ Demo Server" /> |
226 | 230 | </Row>
|
227 | 231 | </Row>
|
228 | 232 | </FormGroup>
|
229 |
| - {#if defaultUrl} |
| 233 | + {#if selectedUrl} |
230 | 234 | <FormGroup>
|
231 | 235 | <Label>Enter your information to fetch an advance directive</Label>
|
232 | 236 | <p class="text-secondary"><em>WA Verify+ does not save this information</em></p>
|
|
0 commit comments