Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sign prescriptions using encrypted private key #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeroenrinzema
Copy link
Member

This PR includes the ability to decode private keys passed by the client

@jeroenrinzema jeroenrinzema force-pushed the feat/sign-prescriptions branch from e681983 to 4eb3d54 Compare January 20, 2025 21:22
}

async function signPrescription(prescription: string): Promise<Signature> {
if (!wrapperKey && !privateKey) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check that privateKey is not provided? What happens if we get private key and no wrapper key? should we handle that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add a check for this case but an error should be thrown.

src/components/Prescription.svelte Show resolved Hide resolved
@@ -96,7 +98,7 @@
pharmacy = (await getPharmacy(patientId, selectedDrugId)) ?? null;
if (!pharmacy) {
pharmacyError =
"We were unable to find a mail order pharmacy for the given patient and selected medication";
"We were unable to find a mail order pharmacy for the gscriptatient and selected medication";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is gscriptatient correct?

src/components/Unlock.svelte Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants