Compare commits
	
		
			2 Commits
		
	
	
		
			mvp
			...
			6d2a7818db
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 6d2a7818db | |||
| 6da6b70537 | 
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,20 +1,3 @@ | ||||
| # vistassh-py | ||||
|  | ||||
| Python-based web interface for VistA roll-and-scroll terminal | ||||
|  | ||||
| ## Getting started | ||||
|  | ||||
| You will need: | ||||
| - Python 3.10+ & pip | ||||
| - Node.js & npm | ||||
|  | ||||
| To install the dependencies and build the frontend, perform the following steps: | ||||
|  | ||||
| ```bash | ||||
| pip install -r requirements.txt | ||||
| cd frontend | ||||
| npm install | ||||
| npm run build | ||||
| ``` | ||||
|  | ||||
| To run, invoke `main.py`. | ||||
| Python-based web interface for VistA roll-and-scroll terminal | ||||
| @@ -1,8 +1,7 @@ | ||||
| export async function get_api_appointments({ fetch, clinics = [], date = 'T' } = {}) { | ||||
| 	if(clinics.constructor === Array) clinics = clinics.map(x => x.replace(/^\s+|\s+$/g, '').replace(/\s+/, ' ')).filter(x => x).join('^').replace(/\//g, '|'); | ||||
| 	else clinics = clinics.replace(/^\s+|\s+$/g, '').replace(/\s+/, ' ').replace(/\//g, '|'); | ||||
| 	if(clinics) return await (await (fetch || window.fetch)('/api/appointments/' + clinics + '/' + date)).json(); | ||||
| 	else return []; | ||||
| 	return await (await (fetch || window.fetch)('/api/appointments/' + clinics + '/' + date)).json(); | ||||
| } | ||||
|  | ||||
| export async function get_api_lookup({ fetch, query, ordinal, force = false } = {}) { | ||||
|   | ||||
| @@ -2,12 +2,7 @@ import { get_api_appointments } from '$lib/backend.js'; | ||||
|  | ||||
| /** @type {import('./$types').PageLoad} */ | ||||
| export async function load({ params, fetch }) { | ||||
| 	let clinics = []; | ||||
| 	try { | ||||
| 		clinics = await (await fetch('/api/config/user/clinics')).json(); | ||||
| 	} catch(ex) { | ||||
| 		console.error(ex, ex.stack); | ||||
| 	} | ||||
| 	let clinics = await (await fetch('/api/config/user/clinics')).json(); | ||||
| 	let appointments = await get_api_appointments({ fetch, clinics, date: 'T' }); | ||||
| 	appointments.sort((a, b) => a.time_scheduled < b.time_scheduled ? -1 : a.time_scheduled > b.time_scheduled ? 1 : 0); | ||||
| 	return { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user