1.0.0 • Published 2 years ago
signservice v1.0.0
Scriptum
Microservicio ambda
Este microservicio tiene por objetivo la creación de documentos pdf basado en plantillas html. Este microservicio es una imagen de docker custom para ser ejecutada dentro de lambda.
docker file:
ARG FUNCTION_DIR="/function"
# Mainlayer
FROM node:14-buster as build-image
ARG FUNCTION_DIR
RUN mkdir -p /usr/share/man/man1
RUN touch /var/log/package-install.log
RUN echo 'deb http://ftp.debian.org/debian stretch-backports main' | tee /etc/apt/sources.list.d/stretch-backports.list
RUN apt-get update
RUN apt-get install -y \
g++ \
make \
cmake \
unzip \
libcurl4-openssl-dev \
tar \
bzip2
ENV JAVA_OPTS="-Xms50M -Xmx50M"
RUN mkdir -p ${FUNCTION_DIR}
COPY . ${FUNCTION_DIR}
# Dependency layer
FROM build-image as dependencies
ARG FUNCTION_DIR
WORKDIR ${FUNCTION_DIR}
RUN npm install
RUN npm install aws-lambda-ric
# Release layer
FROM node:14-buster-slim
ARG FUNCTION_DIR
WORKDIR ${FUNCTION_DIR}
ADD aws-lambda-rie /usr/local/bin/aws-lambda-rie
COPY --from=dependencies ${FUNCTION_DIR} ${FUNCTION_DIR}
RUN apt-get update && apt-get install -y libfontconfig1
# openjdk-11-jdk
RUN chmod +x ${FUNCTION_DIR}/entry_script.sh
RUN chmod +x /usr/local/bin/aws-lambda-rie
RUN touch ${FUNCTION_DIR}/app.log
RUN chmod 777 ${FUNCTION_DIR}/app.log
ENTRYPOINT [ "./entry_script.sh" ]
CMD ["index.handler"]
Payload
{
"professional": {
"_id": "60dcf344cf139944eefbebfe",
"specialities": [
"60dcfbbdcf139944eefbec00"
],
"identificationData": {
"passport": "",
"isForeign": true,
"null": null
},
"personalData": {
"name": "Asistente",
"lastName": "Virtual",
"secondLastName": "",
"gender": "male",
"phoneNumber": "",
"email": "mediktor@email.com",
"birthdate": "31/12/1999"
},
"addressData": {
"uf": "",
"city": "",
"zipcode": "",
"street": ""
},
"professionalData": {
"professionalTitle": "Asistente Virtual",
"university": "",
"biography": "",
"asyncInterconsultationEnabled": true,
"syncInterconsultationEnabled": true,
"professionalRegistry": [],
"prefix": null,
"nrColegio": ""
},
"userData":
{
"_id": "60dcf42fcf139944eefbebff",
"isEmailConfirmed": true,
"isBlockedByAdmin": false,
"isDeleted": false,
"administrativeData": [
{
"_id": "60ae0cece80d9a3c583d0f9c",
"clinic": "5f236fc966fbb0054894b780",
"profile": "5f2066fd8faa873bcc889eed"
}
]
}
},
"patient": {
"_id": "6112fc3c05eea825341adbf0",
"identificationData": {
"passport": "123",
"isForeign": true,
"nrConvenio": ""
},
"personalData": {
"name": "paciente",
"email": "pacienteporcoordinador01@yopmail.com",
"gender": "female",
"phoneNumber": "123",
"lastName": "paciente",
"secondLastName": "paciente",
"healthInsurance": "6001fd70eb69bb33a2ae4322",
"birthdate": "02/08/1974",
"municipalityBirth": null,
"nacionality": "6001fd6deb69bb33a2ae41cb",
"isTutor": true
},
"addressData": {
"uf": "5fb5865cd9a0435aed39d2ce",
"city": "5fb58603d9a0435ad738db12",
"street": "123",
"complement": "123",
"zipcode": "123",
"streetNumber": 123
},
"userId": "6112fc3c05eea825341adbec",
"medicalRecordId": "6112fc3c05eea825341adbee",
"createdAt": "2021-08-10T22:22:53.143Z",
"updatedAt": "2021-08-10T22:22:53.143Z",
"__v": 0,
"score": 15
},
"clinic": {
"email": "hols@hola.cl",
"phoneNumber": "8439039489",
"address": "New St 88394",
"timezone": "America/Santiago"
},
"recipeData": [
{
"medicine": "string",
"concentration": 2,
"concentrationMeasurement": "string",
"pharmaceuticalWay": "string",
"medicineRoute": "string",
"dose": 22,
"doseMeasurement": "string",
"frequency": "string",
"frequencyMeasurement": "string",
"duration": 543,
"durationMeasurement": "string",
"quantity": 43,
"quantityText": "string",
"quantityMeasurement": "string",
"recommendation": "string",
"procedure": "string",
"description": "string"
}
],
"documentData": {
"emissionDate": "2021.01.26",
"city": "La Serena",
"hash": "34534534534534534534",
"code128": "string",
"clinicLogo": "drue-logo.png",
"type": "prescription"
},
"cie10Data": [
{
"code": "83892389",
"diagnostic": "Fractura hombro derecho"
}
]
}
1.0.0
2 years ago