Skip to content

Instantly share code, notes, and snippets.

@ealvesss
Created March 30, 2023 13:44
Show Gist options
  • Save ealvesss/d9f9c8784ac2abe30898e40e869264c3 to your computer and use it in GitHub Desktop.
Save ealvesss/d9f9c8784ac2abe30898e40e869264c3 to your computer and use it in GitHub Desktop.
esquilo
---
import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";
---
<script
type="text/javascript"
src="https://integrations.memed.com.br/modulos/plataforma.sinapse-prescricao/build/sinapse-prescricao.min.js"
data-token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.WzQ3MzQ2LCJkMzNmOWQ4NjNhOTI3NTdiNmFjNmRhY2JmYzNiNDhmNSIsIjIwMjMtMDMtMzAiLCJzaW5hcHNlLnByZXNjcmljYW8iLCJwYXJ0bmVyLjMuNDI2MjMiXQ.jD3WEaAiCS1wiS7KFftzW1afxJAE6YekK1EmTMF2CHI">
MdSinapsePrescricao.event.add('core:moduleInit', (module) => {
if (module.name === 'plataforma.prescricao') {
/**
* Todos os comandos e eventos da Memed devem ser executados
* após a vefificação acima, pois garante que o script foi carregado.
*/
MdHub.command.send('plataforma.prescricao', 'setPaciente', {
external_id: patientId,
nome: 'José da Silva',
cpf: '87671504203',
telefone: '99999999999',
});
}
});
MdHub.module.show('plataforma.prescricao');
</script>
<Layout title="Welcome to Astro.">
<main>
<div id="memed-prescricao">div test</div>
</main>
</Layout>
<style>
main {
margin: auto;
padding: 1.5rem;
max-width: 60ch;
}
h1 {
font-size: 3rem;
font-weight: 800;
margin: 0;
}
.text-gradient {
background-image: var(--accent-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 400%;
background-position: 0%;
}
.instructions {
line-height: 1.6;
margin: 1rem 0;
border: 1px solid rgba(var(--accent), 25%);
background-color: white;
padding: 1rem;
border-radius: 0.4rem;
}
.instructions code {
font-size: 0.875em;
font-weight: bold;
background: rgba(var(--accent), 12%);
color: rgb(var(--accent));
border-radius: 4px;
padding: 0.3em 0.45em;
}
.instructions strong {
color: rgb(var(--accent));
}
.link-card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));
gap: 1rem;
padding: 0;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment