First
This commit is contained in:
19
frontend/src/routes/chart/[mrn]/+layout.svelte
Normal file
19
frontend/src/routes/chart/[mrn]/+layout.svelte
Normal file
@@ -0,0 +1,19 @@
|
||||
<script>
|
||||
import { onDestroy } from 'svelte';
|
||||
import { navlinks } from '$lib/stores.js';
|
||||
|
||||
export let data;
|
||||
const links = navlinks.push({
|
||||
name: data.facesheet_data.name ? data.facesheet_data.name.split(',')[0].toLowerCase().replace(/(?:^|\s|["'([{])+\S/g, m => m.toUpperCase()) + ' ' + data.facesheet_data.ssn.split('-')[2] : 'Chart',
|
||||
href: '/chart/' + data.mrn,
|
||||
children: [
|
||||
{ name: 'Orders', href: '/chart/' + data.mrn + '/orders' },
|
||||
{ name: 'Labs', href: '/chart/' + data.mrn + '/labs' },
|
||||
{ name: 'Notes', href: '/chart/' + data.mrn + '/notes' },
|
||||
{ name: 'Flowsheet', href: '/chart/' + data.mrn + '/flowsheet' },
|
||||
]
|
||||
});
|
||||
onDestroy(() => navlinks.pop(links));
|
||||
</script>
|
||||
|
||||
<slot />
|
Reference in New Issue
Block a user