npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

carelynx-infection-form

v1.0.3

Published

Form to capture the Infection details of a Resident/Client.

Downloads

1

Readme

carelynx-infection-form

Form to capture the Infection details of a Resident/Client.

NPM JavaScript Style Guide

Install

npm install --save carelynx-infection-form

Usage

import React, { Component } from 'react';
import InfectionForm from 'carelynx-infection-form';

const App = () => {
  return <InfectionForm />;
};

Props

Special props:

| prop | type | description | required| | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |--- | | infection | object | Infection data object. |true| | questions | object | An object containing the questions which will be displayed as labels for the form elements. |true| | infectionTypes | array | Array of objects with properties label and value. This will be used to populate the dropdown used for the Infection Types form element. |true|true| | onInfectionTypeChange | func | Callback when there is a new value is selected for Infection Type. |true| | onFormInputChanges | func | Callback for rest of the form element changes. |true| | handleCancelForm | func | Callback when the Cancel button in the form is clicked. |true| | handleFormSubmit | func | Callback when the Save buttin in the form is clicked. |true| | isSubmitting | boolean | Value used to show/hide spinner. This value should be set to true when your app hit's the endpoint to POST/PUT the data. |true| | customStyling | object | To change the default appearance of the react-select component. This is used for the Infection Type form field. |optional| | formErrors | object | An object which is used to hide/show the form errors. The properties are boolean and they need to be set to true/false as per the validation rules set in your app. |optional| | attachmentComponent | HTML element | Your attachment component. This prop will be deprecated in the future updates as the Infection Form will have it's own Attachment Component. |optional|

Prop examples

infection

{
  attachments: [],
  infection_date: null,
  infection_type: {
    label: '',
    value: ''
  },
  infection_treatment: {
    antibiotics: false,
    antifungal: false,
    antiviral: false,
    hospitalisation: false,
    untreated: false,
    unsure: false
  },
  other_report_details: '',
  pathology_taken: null,
  reportable: null,
  reportable_to: '',
  services_interrupted: null
}

questions

{
    question_1: `What type of infection has the client been diagnosed with?`,
    question_2: 'Please specify initial date of infection',
    question_3: 'Has pathology been conducted to confirm the infection?',
    question_4: `Is the Client being treated for the infection?`,
    question_5: 'Is the infection reportable?',
    question_6: 'Have services been interrupted as a result of the incident?',
    question_7: 'Is there anything else about this infection you would like to report?',
    question_8: 'Please add relevant attachments e.g. pathology'
  }

infectionTypes

[
  {
    label: 'Cellulitis',
    value: 'Cellulitis'
  },
  {
    label: 'Chest',
    value: 'Chest'
  },
  {
    label: 'Conjunctivitis',
    value: 'Conjunctivitis'
  },
  {
    label: 'COVID-19',
    value: 'COVID-19'
  },
  {
    label: 'Ear',
    value: 'Ear'
  },
  {
    label: 'Eye',
    value: 'Eye'
  },
  {
    label: 'Fungal',
    value: 'Fungal'
  },
  {
    label: 'Gastroenteritis',
    value: 'Gastro'
  },
  {
    label: 'Influenza A or B',
    value: 'Influenza A or B'
  },
  {
    label: 'MRSA',
    value: 'MRSA'
  },
  {
    label: 'Parasite',
    value: 'Parasite'
  },
  {
    label: 'Pink Eye',
    value: 'Pink Eye'
  },
  {
    label: 'Rash',
    value: 'Rash'
  },
  {
    label: 'Scabies',
    value: 'Scabies'
  },
  {
    label: 'Skin - Bacterial',
    value: 'Skin - Bacterial'
  },
  {
    label: 'Throat',
    value: 'Throat URTI'
  },
  {
    label: 'Thrush - Oral',
    value: 'Thrush - Oral'
  },
  {
    label: 'Thrush - Vaginal',
    value: 'Thrush - Vaginal'
  },
  {
    label: 'URTI',
    value: 'URTI'
  },
  {
    label: 'UTI',
    value: 'Urinary Tract'
  },
  {
    label: 'UTI IDC',
    value: 'UTI with IDC'
  },
  {
    label: 'VRE',
    value: 'VRE'
  },
  {
    label: 'Wound',
    value: 'Wound'
  },
  {
    label: 'Other',
    value: 'Other'
  }
]

formErrors

{
  infection_date: false,
  infection_type: false,
  infection_treatment: false,
  pathology_taken: false,
  reportable: false,
  reportable_to: false,
  services_interrupted: false
}

customStyling

{
  selectInput: {
    colors: {
        primary: `${primary color}`,
        primary75: '#4ec758',
        primary50: '#88da8f',
        primary25: '#afe6b3',
        danger: `${error color}`,
        dangerLight: '#efa2a9',
        text: `${text color}`
    }
  }
}

License

MIT © Carelynx Developers