Skip to content

Commit

Permalink
feat: [IOCOM-922] Remove medical prescription (#5407)
Browse files Browse the repository at this point in the history
## Short description
This PR removes Medical prescription from the project

## List of changes proposed in this pull request
- removed Medical prescription related files
- removed translation keys

## How to test
Tests should be solved correctly

---------

Co-authored-by: Cristiano Tofani <[email protected]>
Co-authored-by: Andrea <[email protected]>
  • Loading branch information
3 people authored Jan 18, 2024
1 parent 3a476ba commit b68ed9d
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 4,345 deletions.
18 changes: 0 additions & 18 deletions locales/de/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1688,13 +1688,6 @@ messages:
expiredAlert:
block1: "Abgelaufen am "
block2: "um "
prescription:
expiringOrValidAlert:
block1: "Verfällt am "
block2: "um "
expiredAlert:
block1: "Abgelaufen am "
block2: "um "
pay: "Bezahle {{amount}} €"
onlyPay: "Bezahlen"
paid: "Bezahlt"
Expand Down Expand Up @@ -1740,17 +1733,6 @@ messages:
emptyMessage:
title: "Du hast keine Fälligkeiten."
subtitle: "Über die Schaltfläche oben kannst du die bereits abgelaufenen Fristen einsehen."
medical:
not_available: "N/A"
prescription: "Elektronische Verschreibung"
memo: "Erinnerung für die betreute Person"
nre: "Elektronische Verschreibungsnummer"
iup: "Eindeutige Buchungsnummer"
patient_fiscal_code: "Steuernummer der betreuten Person"
prescriber_fiscal_code: "Steuernummer des Arztes"
barcodes: "Barcodes"
nationalService: "Nationaler Gesundheitsdienst"
note: "ausgestellt im Sinne des Art. 11, Abs. 16 des Gesetzesdekretes vom 31. Mai 2010, Nr. 78 und des Art. 1, Abs. 4 des Ministerialdekretes vom 2 November 2011"
pagination:
migration:
started: "Bitte warte, wir aktualisieren den Mitteilungsbereich"
Expand Down
18 changes: 0 additions & 18 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1821,13 +1821,6 @@ messages:
expiredAlert:
block1: Expired on
block2: at
prescription:
expiringOrValidAlert:
block1: Expiring on
block2: at
expiredAlert:
block1: Expired on
block2: at
pay: Pay € {{amount}}
onlyPay: Pay
paid: Paid
Expand Down Expand Up @@ -1873,17 +1866,6 @@ messages:
emptyMessage:
title: You haven't any scheduled deadline.
subtitle: Use the button above to check out past deadlines.
medical:
not_available: "n/a"
prescription: Electronic prescription
memo: Reminder for the recipient
nre: Electronic prescription number
iup: Unique booking identifier
patient_fiscal_code: Patient's fiscal code
prescriber_fiscal_code: Doctor's fiscal code
barcodes: Barcodes
nationalService: National Health Service
note: "Rilasciato ai sensi dell'art.11, comma 16 del DL 31 mag 2010, n.78 e dell’art.1, comma 4 del DM 2 nov 2011"
pagination:
migration:
started: Please wait, we are updating the Messages section.
Expand Down
18 changes: 0 additions & 18 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1821,13 +1821,6 @@ messages:
expiredAlert:
block1: Scaduto il
block2: alle ore
prescription:
expiringOrValidAlert:
block1: Scade il
block2: alle
expiredAlert:
block1: Scaduta il
block2: alle
pay: Paga € {{amount}}
onlyPay: Paga
paid: Pagato
Expand Down Expand Up @@ -1873,17 +1866,6 @@ messages:
emptyMessage:
title: Non hai scadenze in programma.
subtitle: Usa il pulsante qui sopra per vedere le scadenze già trascorse.
medical:
not_available: "n/a"
prescription: Ricetta elettronica
memo: Promemoria per l'assistito
nre: Numero Ricetta Elettronica
iup: Identificativo Unico Prenotazione
patient_fiscal_code: Codice Fiscale dell'assistito
prescriber_fiscal_code: Codice fiscale del medico
barcodes: Codici a barre
nationalService: Servizio Sanitario Nazionale
note: "Rilasciato ai sensi dell'art.11, comma 16 del DL 31 mag 2010, n.78 e dell’art.1, comma 4 del DM 2 nov 2011"
pagination:
migration:
started: "Attendi, stiamo aggiornando la sezione messaggi"
Expand Down
1 change: 0 additions & 1 deletion scripts/api-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"paymentInvalidAfterDueDateWithExpiredDueDateCount": 1,
"paymentWithValidDueDateCount": 1,
"paymentWithExpiredDueDateCount": 1,
"medicalCount": 1,
"withCTA": true,
"withEUCovidCert": true,
"withValidDueDateCount": 1,
Expand Down
18 changes: 0 additions & 18 deletions ts/features/messages/__mocks__/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,6 @@ export const message_1: CreatedMessageWithContentAndAttachments = {
sender_service_id: service_1.service_id
};

export const medicalPrescription: CreatedMessageWithContentAndAttachments = {
created_at: "2021-11-23T13:29:49.771Z",
fiscal_code: "TAMMRA80A41H501I",
id: "00000000000000000000000013",
sender_service_id: "service2",
time_to_live: 3600,
content: {
subject: "💊 medical prescription - 1",
markdown:
"\n# H1 \n\n## H2 \n\n### H3 \n\n#### H4\n\n-----\n\n### an image\n![A cat](data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAkGBwgHBgkICAgKCgkLDhcPDg0NDhwUFREXIh4jIyEeICAlKjUtJScyKCAgLj8vMjc5PDw8JC1CRkE6RjU7PDn/2wBDAQoKCg4MDhsPDxs5JiAmOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTn/wAARCABYAIADASIAAhEBAxEB/8QAHAABAAIDAQEBAAAAAAAAAAAAAAUGAwQHAgEI/8QANRAAAgEDAgMGBQIFBQAAAAAAAQIDAAQRBSEGEhMiMUFRYXEHFIGRobHRFjJSwfAkQ5Ki4f/EABgBAQEBAQEAAAAAAAAAAAAAAAACAwEE/8QAHBEBAQEBAQEBAQEAAAAAAAAAAAERAiExEkED/9oADAMBAAIRAxEAPwDuNKUoFKUoFKUoFKhOMdUbStDmliblmkIijPkT4/bNVfhDW7mxlSC9uGlt5jgFzkxn9qm9SVU5tmuh0pSqSUpSgUpSgUpSgUpSgUpSgUpSgoPxOvY+rY2QZuop6rADOx2H6GoI3Ea2aqxO+4BXBFefi3qCRat0oMPduiRBeXORucf9qq4SWKErcutvkbhRkj6A1lb7W0k/Mdh4c4msLnTokub2COdBynqOF5seIzU3BqFlcPyQXlvK/wDSkis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35PttWXVs9a8/m+Iy51G5gumhlgvbiLYlJiiK4B2LcoyRt6DzrLq9svSttYktWhuJn5JSi47BB3IH03NWtLIzabbzTIeqBnnjcoRt64x7V94dWe8vF051adOpkSyHJCd5B86uX3Gd5yOhcNxNDoNjG4IYQrkH2qSr4BgAeVfa9DApSlBwrj3iy7mXkeUBX25TkLmuf2MU10xkAVxjuydz9azcRXUsupYYdUIM8hOMHO1ZrS3uY1LCNGc9ogtgb/wBqfXb4z9FxagGE5G4Zmya2ZislqiW4VkUktnxPt/etR55HuY3bmSNMqBnYms9vZ3Mj9SJwiMT2fDOf713XMebeMtIrAAAY7I7gfap2fktGttQxzQSxiOQ74HkTWpFCu4BGdlYY7z+tSFkcTSWU0QEMvaBHj5gVHVVzEZqNvPY3BvYFaYSDOBssfqPSpDR9Z6IOT1ebHO+chzWlNLNYXJ0+43ilYm3lLd3p9sVqRWXSlzas6qHzgnPiP88qxvWNZzroVpHpV8oLPEo5slW2qcMllHCFXMy52BO1UTTzz8vMAMHmIzkn99qsVuIukG5iFHdk1yf62+O3/ORtXa3d5Iih1EWQOmBjH1q4cPaLFpkJblHWbvPlUNwwIZb9AO0ApYHwq5Vrxz/WXd/hSlK0QUpSg/JOs4N0ZYeWVc/zLXubWJYVWND3gZZic59KUrt5w3WVZZp2jcIzyEbncAVK2cN5ykB+ntnbzpSsuquRJ2F0szNbTKqytsx7s+tfRcuoIORIh2YDfHt9KUqLVyPeqWx1fT0RWSKZCGQtnAPlioiG+vbWUwzWeGOVMnJzBj4fTupSol/i8Wq0Y5iiuQ0ySjKhVxg+tT0FtChZZWHIcEJn+X9xSlTJ67as3CkayXbSRKBFGpAx5mrXSlern483X0pSlU4UpSg//9k=)\n\n-----\n\n### item list\n\n- item1\n- item2 \n- item3 \n- item4 \n- item5 \n- item6 \n\n-----\n\n### enumerated list\n\n1. item1\n1. item2 \n1. item3 \n1. item4 \n1. item5 \n1. item6 \n\n-----\n\n### formatted text\nÈ universalmente **riconosciuto** che un _lettore_ che **osserva** il layout di una pagina viene distratto dal contenuto testuale se questo è leggibile. Lo scopo dell’utilizzo del Lorem Ipsum è che offre una normale distribuzione delle lettere (al contrario di quanto avviene se si utilizzano brevi frasi ripetute, ad esempio “testo qui”), apparendo come un normale blocco di testo leggibile. Molti software di impaginazione e di web design utilizzano Lorem Ipsum come testo modello. Molte versioni del testo sono state prodotte negli anni, a volte casualmente, a volte di proposito (ad esempio inserendo passaggi ironici).\n\n| copia e incolla il seguente link: `https://verylongurl.com/verylong_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_`\n\n-----\n\n### external links\n\na link must **always** include the protocol (`http://` or `https://`)\n\n[Google](https://www.google.it)\n\n[Invalid link -1](www.google.it)\n\n[Invalid link -2](google.it)\n\n-----\n\n### Internal navigation\n\n[BONUS_AVAILABLE_LIST](ioit://BONUS_AVAILABLE_LIST)\n\n[BONUS_CTA_ELIGILITY_START](ioit://BONUS_CTA_ELIGILITY_START)\n\n[MESSAGES_HOME](ioit://MESSAGES_HOME)\n\n[PROFILE_PREFERENCES_HOME](ioit://PROFILE_PREFERENCES_HOME)\n\n[SERVICES_HOME](ioit://SERVICES_HOME)\n\n[PROFILE_MAIN](ioit://PROFILE_MAIN)\n\n[PROFILE_PRIVACY](ioit://PROFILE_PRIVACY)\n\n[PROFILE_PRIVACY_MAIN](ioit://PROFILE_PRIVACY_MAIN)\n\n[WALLET_HOME](ioit://WALLET_HOME)\n\n[WALLET_LIST](ioit://WALLET_LIST)\n\n[PAYMENTS_HISTORY_SCREEN](ioit://PAYMENTS_HISTORY_SCREEN)\n\n[WALLET_HOME con parametri](ioit://WALLET_HOME?param1=a&param2=b&param3=c&param4=100)\n\n[SERVICE WEBVIEW](ioit://SERVICE_WEBVIEW?url=https://www.google.com)\n\n[LINK CORROTTO](ioit://WRONG&$)\n\n### Handled link\n[http - google](iohandledlink://http://www.google.com)\n\n[https - google](iohandledlink://https://www.google.com)\n\n[clipboard](iohandledlink://copy:textcopy)\n\n[sms](iohandledlink://sms:+123456789)\n\n[tel](iohandledlink://tel:+123456789)\n\n[mailto](iohandledlink://mailto:[email protected])\n\n",
prescription_data: {
nre: "050A00854698121",
iup: "0000X0NFM",
prescriber_fiscal_code: "TAMMRA80A41H501I"
}
}
} as any;

export const paymentValidInvalidAfterDueDate: CreatedMessageWithContentAndAttachments =
{
created_at: "2021-11-23T13:29:54.771Z",
Expand Down
4 changes: 0 additions & 4 deletions ts/features/messages/components/MessageDetail/CtaBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ const CtaBar = ({
}
}, [isPNOptIn, shoulCheckForPNOptInMessage]);

// in case of medical prescription, we shouldn't render the CtaBar
if (messageDetails.prescriptionData !== undefined) {
return null;
}
const expirationInfo = getPaymentExpirationInfo(messageDetails);

const paymentButton = renderPaymentButton(paymentData, messageDetails.id);
Expand Down
47 changes: 14 additions & 33 deletions ts/features/messages/components/MessageDetail/HeaderDueDateBar.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,26 @@
import * as React from "react";
import React from "react";
import { UIMessageDetails } from "../../types";
import { getPaymentExpirationInfo } from "../../utils";
import DueDateBar from "./DueDateBar";
import MedicalPrescriptionDueDateBar from "./MedicalPrescriptionDueDateBar";
import MedicalPrescriptionIdentifiersComponent from "./MedicalPrescriptionIdentifiersComponent";

type Props = {
type HeaderDueDateBarProps = {
messageDetails: UIMessageDetails;
hasPaidBadge: boolean;
};

/**
* Groups all the possible combination of DueDate bars based (or not) on the prescriptionData
* @param props
* @constructor
*/
export const HeaderDueDateBar = (props: Props): React.ReactElement => {
const paymentExpirationInfo = getPaymentExpirationInfo(props.messageDetails);
export const HeaderDueDateBar = ({
hasPaidBadge,
messageDetails
}: HeaderDueDateBarProps) => {
if (messageDetails.dueDate === undefined) {
return null;
}

return (
<>
{props.messageDetails.prescriptionData && (
<MedicalPrescriptionIdentifiersComponent
prescriptionData={props.messageDetails.prescriptionData}
/>
)}

{props.messageDetails.dueDate !== undefined &&
(props.messageDetails.prescriptionData === undefined ? (
<DueDateBar
dueDate={props.messageDetails.dueDate}
expirationInfo={paymentExpirationInfo}
isPaid={props.hasPaidBadge}
/>
) : (
<MedicalPrescriptionDueDateBar
dueDate={props.messageDetails.dueDate}
messageDetails={props.messageDetails}
paymentExpirationInfo={paymentExpirationInfo}
/>
))}
</>
<DueDateBar
dueDate={messageDetails.dueDate}
expirationInfo={getPaymentExpirationInfo(messageDetails)}
isPaid={hasPaidBadge}
/>
);
};

This file was deleted.

Loading

0 comments on commit b68ed9d

Please sign in to comment.