Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Ferlab-Ste-Justine/clin-frontend
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.11
Choose a base ref
...
head repository: Ferlab-Ste-Justine/clin-frontend
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 12 commits
  • 10 files changed
  • 8 contributors

Commits on Apr 22, 2022

  1. Copy the full SHA
    ad00369 View commit details
  2. Merge pull request #923 from Ferlab-Ste-Justine/fix/795-patient-builder

    fix: CLIN-795 - typo patient builder
    creativeyann17 authored Apr 22, 2022
    Copy the full SHA
    c694650 View commit details
  3. feat: CLIN-795 Activation du test skippé

    Karine St-Onge authored and Karine St-Onge committed Apr 22, 2022
    Copy the full SHA
    80b1e16 View commit details

Commits on Apr 27, 2022

  1. Copy the full SHA
    7dac5dc View commit details

Commits on Apr 28, 2022

  1. Merge pull request #924 from Ferlab-Ste-Justine/Test/CLIN-795_activat…

    …ion_test_skipped
    
    feat: CLIN-795 Activation du test skippé
    Karine St-Onge authored Apr 28, 2022
    Copy the full SHA
    9ec9cd3 View commit details
  2. Copy the full SHA
    9c84895 View commit details
  3. Merge pull request #930 from Ferlab-Ste-Justine/fix/stylePatientInfo

    fix: CLIN-813 titre patient info
    claudia1296 authored Apr 28, 2022
    Copy the full SHA
    ee47aa3 View commit details

Commits on Apr 29, 2022

  1. Copy the full SHA
    5607d8f View commit details
  2. Merge pull request #933 from Ferlab-Ste-Justine/fix/alignementHc

    fix: CLIN-929 alignement HC
    claudia1296 authored Apr 29, 2022
    Copy the full SHA
    b0f77af View commit details
  3. feat: CLIN-748 bidirectional bridge with clinfrontend and refetch pat…

    …ient data on change
    Francis Lavoie authored and francisl committed Apr 29, 2022
    Copy the full SHA
    5e34118 View commit details

Commits on May 5, 2022

  1. fix: CLIN-748 error with cross origin http

    Francis Lavoie authored and francisl committed May 5, 2022
    Copy the full SHA
    882cadc View commit details

Commits on Jun 8, 2022

  1. Copy the full SHA
    01c4d4f View commit details
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,10 @@
![](https://github.com/Ferlab-Ste-Justine/clin-frontend/workflows/Publish%20Image%20Using%20Commit%20Hash/badge.svg)
![](https://github.com/Ferlab-Ste-Justine/clin-frontend/workflows/Publish%20Image%20Using%20Tag/badge.svg)

# Deprecation

This service has been deprecated and will no longer be maintained.

# CLIN Frontend

## Available Scripts
11 changes: 9 additions & 2 deletions client/src/bridge/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { channel } from 'redux-saga';

import { StoreType } from 'store';

type CallBackType = (e: MessageEvent) => void;
@@ -28,6 +26,7 @@ type CallBackType = (e: MessageEvent) => void;
}, [iFrame])
*/

let clinUIChannel: HTMLIFrameElement;
export class Bridge {
private store: StoreType;
private channel: HTMLIFrameElement;
@@ -49,4 +48,12 @@ export class Bridge {
remove(callback: CallBackType): void {
this.channel.contentWindow?.removeEventListener('message', callback, false);
}

static setMainChannel(ref: HTMLIFrameElement): void {
clinUIChannel = ref;
}

static broadcastMessage(msg: string): void {
clinUIChannel?.contentWindow?.postMessage(msg, window.origin);
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React, { ReactNode } from 'react';
import { Typography } from 'antd';

type Props = { title: string; value?: string | ReactNode };

const { Text } = Typography;

const DetailsRow = ({ title, value }: Props): React.ReactElement => (
<div className="patient-section__col__details__row">
<span className="patient-section__col__details__row__title">{title}</span>
<Text className="patient-section__col__details__row__title">{title}</Text>
<span className="patient-section__col__details__row__info">{value || '--'}</span>
</div>
);
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@
&__title {
color: $gray-7;
font-weight: 500;
font-size: 12px;
}

&__info {
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from 'react';
import intl from 'react-intl-universal';
import { useSelector } from 'react-redux';
import {
Button, Modal, Typography,
} from 'antd';
import { Patient } from 'helpers/fhir/types';

import './styles.scss';
import { useSelector } from 'react-redux';
import { Patient } from '../../../../../helpers/fhir/types';

interface Props {
open: boolean
@@ -19,7 +20,7 @@ interface Props {
const I18N_PREFIX = 'screen.patient.creation.modal.';

const ResultModal: React.FC<Props> = ({
open, onClose, icon, description, actions, title,
actions, description, icon, onClose, open, title,
}) => {
const patient = useSelector((state: any) => state.patientCreation.patient) as Patient;

@@ -33,7 +34,7 @@ const ResultModal: React.FC<Props> = ({
displayedTitle += ` (${intl.get('screen.patient.creation.fetus').toLowerCase()})`;
}
return (
<Modal visible={open} footer={null} width={815} onCancel={() => onClose()}>
<Modal footer={null} onCancel={() => onClose()} visible={open} width={815}>
<div className="patient-creation__modal__content">
{ icon }

@@ -49,7 +50,7 @@ const ResultModal: React.FC<Props> = ({
{ actions }
</div>
<span>
<Button type="link" onClick={() => onClose()} className="patient-creation__modal__content__close-button" data-testid="CloseButton">
<Button className="patient-creation__modal__content__close-button" data-testid="CloseButton" onClick={() => onClose()} type="link">
{ intl.get(`${I18N_PREFIX}close`) }
</Button>
</span>
11 changes: 7 additions & 4 deletions client/src/components/screens/PatientVariant/styles.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.occurenceDrawer{
.description {
span[class$="-item-label"] {
width: 250px;
}
.description {
span[class$="-item-label"] {
width: 250px;
}
.hcCountLink{
height: 22px;
}
}
}
1 change: 1 addition & 0 deletions client/src/components/screens/search/index.tsx
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ const SearchScreen = ({ app }: SearchScreenProps): React.ReactElement => {
if (iFrame && iFrame.current) {
bridge = new Bridge(store, iFrame.current);
bridge.register('createNewPrescription', prescriptionModalCallback);
Bridge.setMainChannel(iFrame.current)
}

return function cleanup() {
3 changes: 1 addition & 2 deletions client/src/helpers/fhir/__tests/PatientBuilder.spec.ts
Original file line number Diff line number Diff line change
@@ -224,8 +224,7 @@ describe('PatientBuilder', () => {
})
})

//En attente de la correction de CLIN-795
describe.skip('withPatient', () => {
describe('withPatient', () => {
test('should build partial patient', () => {
const builder = new PatientBuilder()
const patient = mocks.PartialPatientMock as Partial<Patient>;
2 changes: 1 addition & 1 deletion client/src/helpers/fhir/builder/PatientBuilder.ts
Original file line number Diff line number Diff line change
@@ -155,7 +155,7 @@ export class PatientBuilder {
return this
.withId(patient.id)
.withFamily(get(patient, 'name[0].family'))
.withGiven(get(patient, '.name[0].given[0]'))
.withGiven(get(patient, 'name[0].given[0]'))
.withActive(patient.active)
.withBirthDate(moment(patient.birthDate).toDate())
.withGender(patient.gender)
2 changes: 2 additions & 0 deletions client/src/sagas/router.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Bridge } from 'bridge';
import { LOCATION_CHANGE,push } from 'connected-react-router';
import get from 'lodash/get';
import {
@@ -72,6 +73,7 @@ function* navigateToSubmissionScreenWithPatient() {
}

function* navigateToPatientSearchScreen() {
Bridge.broadcastMessage('clinFrontend:modalClose')
yield put(push(Routes.PatientSearch));
}